protected void setPlaceholderContent(boolean toCenter, JComponent component) { myLabelPlaceholder.removeAll(); if (toCenter) { final Centerizer center = new Centerizer(component); myLabelPlaceholder.setContent(center); } else { myLabelPlaceholder.setContent(component); } myCentered = toCenter; }
public void setAlignmentToCenter(boolean toCenter) { if (myCentered == toCenter && myLabel.getParent() != null) return; myLabelPlaceholder.removeAll(); if (toCenter) { final Centerizer center = new Centerizer(myLabel); myLabelPlaceholder.setContent(center); } else { myLabelPlaceholder.setContent(myLabel); } myCentered = toCenter; }