Java 类com.intellij.util.ui.Centerizer 实例源码

项目:intellij-ce-playground    文件:TabLabel.java   
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;
}
项目:tools-idea    文件:TabLabel.java   
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;
}
项目:jediterm    文件:TabLabel.java   
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;
}
项目:consulo    文件:TabLabel.java   
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;
}