Java 类com.intellij.ui.border.IdeaTitledBorder 实例源码

项目:livingdoc-intellij    文件:GuiUtils.java   
/**
 * Returns a title with the following format (e.g): 'title'_____________________
 *
 * @param title String
 * @return {@link IdeaTitledBorder}
 */
@NotNull
public static IdeaTitledBorder createTitledBorder(@NotNull final String title) {
    return IdeBorderFactory.createTitledBorder(title, true,
            new Insets(IdeBorderFactory.TITLED_BORDER_TOP_INSET,
                    5,
                    IdeBorderFactory.TITLED_BORDER_BOTTOM_INSET,
                    IdeBorderFactory.TITLED_BORDER_RIGHT_INSET));
}
项目:intellij-ce-playground    文件:WizardStep.java   
@Override
public JComponent getComponent(){
  if (myComponent == null) {
    myComponent = createComponent();
    final IdeaTitledBorder border = IdeBorderFactory.createTitledBorder(myDescription, false);
    myComponent.setBorder(border);
  }
  return myComponent;
}
项目:tools-idea    文件:WizardStep.java   
@Override
public JComponent getComponent(){
  if (myComponent == null) {
    myComponent = createComponent();
    final IdeaTitledBorder border = IdeBorderFactory.createTitledBorder(myDescription, false);
    myComponent.setBorder(border);
  }
  return myComponent;
}
项目:intellij-ce-playground    文件:IdeBorderFactory.java   
@Deprecated
public static IdeaTitledBorder createTitledBorder(String title, boolean hasBoldFont, boolean hasIndent, boolean hasSmallFont) {
  return createTitledBorder(title, hasIndent);
}
项目:intellij-ce-playground    文件:IdeBorderFactory.java   
@Deprecated
public static IdeaTitledBorder createTitledBorder(String title, boolean hasBoldFont, boolean hasIndent, boolean hasSmallFont, Insets insets) {
  return createTitledBorder(title, hasIndent, insets);
}
项目:intellij-ce-playground    文件:IdeBorderFactory.java   
public static IdeaTitledBorder createTitledBorder(String title, boolean hasIndent) {
  Insets insets = new Insets(TITLED_BORDER_TOP_INSET, TITLED_BORDER_LEFT_INSET, TITLED_BORDER_BOTTOM_INSET, TITLED_BORDER_RIGHT_INSET);
  return createTitledBorder(title, hasIndent, insets);
}
项目:intellij-ce-playground    文件:IdeBorderFactory.java   
public static IdeaTitledBorder createTitledBorder(String title, boolean hasIndent, Insets insets) {
  int indent = hasIndent ? TITLED_BORDER_INDENT : 0;
  return new IdeaTitledBorder(title, indent, insets);
}
项目:intellij-ce-playground    文件:IdeBorderFactory.java   
@Deprecated
// Don't remove, used in TeamCity plugin.
public static TitledBorder createTitledHeaderBorder(String title) {
  return new IdeaTitledBorder(title, 10, new Insets(5, 0, 10, 0));
}
项目:intellij-ce-playground    文件:OptionGroup.java   
public JPanel createPanel() {
  JPanel panel = new JPanel();
  panel.setLayout(new GridBagLayout());

  for (int i = 0; i < myOptions.size(); i++) {
    final int leftInset = Boolean.TRUE.equals(myIsShifted.get(i)) ? IdeBorderFactory.TITLED_BORDER_INDENT : 0;
    final int topInset = i == 0 ? 0 : UIUtil.DEFAULT_VGAP;
    final int rightInset = UIUtil.DEFAULT_HGAP;
    final Object option = myOptions.get(i);
    if (option instanceof JComponent) {
      JComponent component = (JComponent)option;
      panel.add(component,
                new GridBagConstraints(0, i, GridBagConstraints.REMAINDER, 1, 1, 0, GridBagConstraints.WEST, getFill(component),
                                       new Insets(topInset, leftInset, 0, 0), 0, 0));
    }
    else {
      Pair pair = (Pair)option;
      JComponent firstComponent = (JComponent)pair.first;
      panel.add(firstComponent,
                new GridBagConstraints(0, i, 1, 1, 1, 0, GridBagConstraints.WEST, getFill(firstComponent),
                                       new Insets(topInset, leftInset, 0, 0), 0, 0));
      JComponent secondComponent = (JComponent)pair.second;
      panel.add(secondComponent,
                new GridBagConstraints(1, i, 1, 1, 1, 0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL,
                                       new Insets(topInset, rightInset, 0, 0), 0, 0));
    }
  }
  JPanel p = new JPanel();
  p.setPreferredSize(new Dimension(0, 0));
  panel.add(p,
            new GridBagConstraints(0, myOptions.size(), GridBagConstraints.REMAINDER, 1, 0, 1,
                                   GridBagConstraints.NORTH, GridBagConstraints.NONE,
                                   new Insets(0, 0, 0, 0), 0, 0));

  if (myTitle != null) {
    IdeaTitledBorder titledBorder = IdeBorderFactory.createTitledBorder(myTitle, true);
    panel.setBorder(titledBorder);
    titledBorder.acceptMinimumSize(panel);
  }

  return panel;
}
项目:intellij-ce-playground    文件:DataViewsConfigurableUi.java   
private void createUIComponents() {
  myEditorSettingsPanel = new JPanel();
  IdeaTitledBorder titledBorder = IdeBorderFactory.createTitledBorder("Editor", false);
  myEditorSettingsPanel.setBorder(titledBorder);
  titledBorder.acceptMinimumSize(myEditorSettingsPanel);
}
项目:intellij-ce-playground    文件:WizardStep.java   
protected void setStepTitle(String title){
  final IdeaTitledBorder border = IdeBorderFactory.createTitledBorder(title, false);
  getComponent().setBorder(border);
}
项目:tools-idea    文件:IdeBorderFactory.java   
@Deprecated
public static IdeaTitledBorder createTitledBorder(String title, boolean hasBoldFont, boolean hasIndent, boolean hasSmallFont) {
  return createTitledBorder(title, hasIndent);
}
项目:tools-idea    文件:IdeBorderFactory.java   
@Deprecated
public static IdeaTitledBorder createTitledBorder(String title, boolean hasBoldFont, boolean hasIndent, boolean hasSmallFont, Insets insets) {
  return createTitledBorder(title, hasIndent, insets);
}
项目:tools-idea    文件:IdeBorderFactory.java   
public static IdeaTitledBorder createTitledBorder(String title, boolean hasIndent) {
  Insets insets = new Insets(TITLED_BORDER_TOP_INSET, TITLED_BORDER_LEFT_INSET, TITLED_BORDER_BOTTOM_INSET, TITLED_BORDER_RIGHT_INSET);
  return createTitledBorder(title, hasIndent, insets);
}
项目:tools-idea    文件:IdeBorderFactory.java   
public static IdeaTitledBorder createTitledBorder(String title, boolean hasIndent, Insets insets) {
  int indent = hasIndent ? TITLED_BORDER_INDENT : 0;
  return new IdeaTitledBorder(title, indent, insets);
}
项目:tools-idea    文件:IdeBorderFactory.java   
@Deprecated
// Don't remove, used in TeamCity plugin.
public static TitledBorder createTitledHeaderBorder(String title) {
  return new IdeaTitledBorder(title, 10, new Insets(5, 0, 10, 0));
}
项目:tools-idea    文件:OptionGroup.java   
public JPanel createPanel() {
  JPanel panel = new JPanel();
  panel.setLayout(new GridBagLayout());

  for (int i = 0; i < myOptions.size(); i++) {
    final int leftInset = Boolean.TRUE.equals(myIsShifted.get(i)) ? IdeBorderFactory.TITLED_BORDER_INDENT : 0;
    final int topInset = i == 0 ? 0 : UIUtil.DEFAULT_VGAP;
    final int rightInset = UIUtil.DEFAULT_HGAP;
    final Object option = myOptions.get(i);
    if (option instanceof JComponent) {
      JComponent component = (JComponent)option;
      panel.add(component,
                new GridBagConstraints(0, i, GridBagConstraints.REMAINDER, 1, 1, 0, GridBagConstraints.WEST, getFill(component),
                                       new Insets(topInset, leftInset, 0, 0), 0, 0));
    }
    else {
      Pair pair = (Pair)option;
      JComponent firstComponent = (JComponent)pair.first;
      panel.add(firstComponent,
                new GridBagConstraints(0, i, 1, 1, 1, 0, GridBagConstraints.WEST, getFill(firstComponent),
                                       new Insets(topInset, leftInset, 0, 0), 0, 0));
      JComponent secondComponent = (JComponent)pair.second;
      panel.add(secondComponent,
                new GridBagConstraints(1, i, 1, 1, 1, 0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL,
                                       new Insets(topInset, rightInset, 0, 0), 0, 0));
    }
  }
  JPanel p = new JPanel();
  p.setPreferredSize(new Dimension(0, 0));
  panel.add(p,
            new GridBagConstraints(0, myOptions.size(), GridBagConstraints.REMAINDER, 1, 0, 1,
                                   GridBagConstraints.NORTH, GridBagConstraints.NONE,
                                   new Insets(0, 0, 0, 0), 0, 0));

  if (myTitle != null) {
    IdeaTitledBorder titledBorder = IdeBorderFactory.createTitledBorder(myTitle, true);
    panel.setBorder(titledBorder);
    titledBorder.acceptMinimumSize(panel);
  }

  return panel;
}
项目:tools-idea    文件:WizardStep.java   
protected void setStepTitle(String title){
  final IdeaTitledBorder border = IdeBorderFactory.createTitledBorder(title, false);
  getComponent().setBorder(border);
}
项目:consulo    文件:IdeBorderFactory.java   
@Deprecated
public static IdeaTitledBorder createTitledBorder(String title, boolean hasBoldFont, boolean hasIndent, boolean hasSmallFont) {
  return createTitledBorder(title, hasIndent);
}
项目:consulo    文件:IdeBorderFactory.java   
@Deprecated
public static IdeaTitledBorder createTitledBorder(String title, boolean hasBoldFont, boolean hasIndent, boolean hasSmallFont, Insets insets) {
  return createTitledBorder(title, hasIndent, insets);
}
项目:consulo    文件:IdeBorderFactory.java   
public static IdeaTitledBorder createTitledBorder(String title, boolean hasIndent) {
  Insets insets = new Insets(TITLED_BORDER_TOP_INSET, TITLED_BORDER_LEFT_INSET, TITLED_BORDER_BOTTOM_INSET, TITLED_BORDER_RIGHT_INSET);
  return createTitledBorder(title, hasIndent, insets);
}
项目:consulo    文件:IdeBorderFactory.java   
public static IdeaTitledBorder createTitledBorder(String title, boolean hasIndent, Insets insets) {
  int indent = hasIndent ? TITLED_BORDER_INDENT : 0;
  return new IdeaTitledBorder(title, indent, insets);
}
项目:consulo    文件:IdeBorderFactory.java   
@Deprecated
// Don't remove, used in TeamCity plugin.
public static TitledBorder createTitledHeaderBorder(String title) {
  return new IdeaTitledBorder(title, 10, new Insets(5, 0, 10, 0));
}
项目:consulo    文件:OptionGroup.java   
public JPanel createPanel() {
  JPanel panel = new JPanel();
  panel.setLayout(new GridBagLayout());

  for (int i = 0; i < myOptions.size(); i++) {
    final int leftInset = Boolean.TRUE.equals(myIsShifted.get(i)) ? IdeBorderFactory.TITLED_BORDER_INDENT : 0;
    final int topInset = i == 0 ? 0 : UIUtil.DEFAULT_VGAP;
    final int rightInset = UIUtil.DEFAULT_HGAP;
    final Object option = myOptions.get(i);
    if (option instanceof JComponent) {
      JComponent component = (JComponent)option;
      panel.add(component,
                new GridBagConstraints(0, i, GridBagConstraints.REMAINDER, 1, 1, 0, GridBagConstraints.WEST, getFill(component),
                                       new Insets(topInset, leftInset, 0, 0), 0, 0));
    }
    else {
      Pair pair = (Pair)option;
      JComponent firstComponent = (JComponent)pair.first;
      panel.add(firstComponent,
                new GridBagConstraints(0, i, 1, 1, 1, 0, GridBagConstraints.WEST, getFill(firstComponent),
                                       new Insets(topInset, leftInset, 0, 0), 0, 0));
      JComponent secondComponent = (JComponent)pair.second;
      panel.add(secondComponent,
                new GridBagConstraints(1, i, 1, 1, 1, 0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL,
                                       new Insets(topInset, rightInset, 0, 0), 0, 0));
    }
  }
  JPanel p = new JPanel();
  p.setPreferredSize(new Dimension(0, 0));
  panel.add(p,
            new GridBagConstraints(0, myOptions.size(), GridBagConstraints.REMAINDER, 1, 0, 1,
                                   GridBagConstraints.NORTH, GridBagConstraints.NONE,
                                   new Insets(0, 0, 0, 0), 0, 0));

  if (myTitle != null) {
    IdeaTitledBorder titledBorder = IdeBorderFactory.createTitledBorder(myTitle, true);
    panel.setBorder(titledBorder);
    titledBorder.acceptMinimumSize(panel);
  }

  return panel;
}
项目:consulo    文件:DataViewsConfigurableUi.java   
private void createUIComponents() {
  myEditorSettingsPanel = new JPanel();
  IdeaTitledBorder titledBorder = IdeBorderFactory.createTitledBorder("Editor", false);
  myEditorSettingsPanel.setBorder(titledBorder);
  titledBorder.acceptMinimumSize(myEditorSettingsPanel);
}