Java Code Examples for com.intellij.util.ui.JBInsets#create()

The following examples show how to use com.intellij.util.ui.JBInsets#create() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IdeaTitledBorder.java    From consulo with Apache License 2.0 5 votes vote down vote up
public IdeaTitledBorder(String title, int indent, Insets insets) {
  super(title);
  titledSeparator = new TitledSeparator(title);
  titledSeparator.setText(title);
  DialogUtil.registerMnemonic(titledSeparator.getLabel(), null);

  outsideInsets = JBInsets.create(insets);
  insideInsets = new JBInsets(TitledSeparator.BOTTOM_INSET, indent, 0, 0);
}
 
Example 2
Source File: IdeBorderFactory.java    From consulo with Apache License 2.0 4 votes vote down vote up
public static Border createEmptyBorder(Insets insets) {
  return new EmptyBorder(JBInsets.create(insets));
}
 
Example 3
Source File: AbstractNavBarUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public Insets getElementIpad(boolean isPopupElement) {
  return isPopupElement ? JBInsets.create(1, 2) : JBUI.emptyInsets();
}
 
Example 4
Source File: DarculaComboBoxUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public Insets getBorderInsets(Component c) {
  return DarculaUIUtil.isTableCellEditor(c) || isCompact(c) ? JBInsets.create(2, 3) : getDefaultComboBoxInsets();
}
 
Example 5
Source File: DarculaTextFieldUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
protected Insets getDefaultMargins() {
  Component c = getComponent();
  return DarculaUIUtil.isCompact(c) || isTableCellEditor(c) ? JBInsets.create(0, 3) : JBInsets.create(2, 6);
}
 
Example 6
Source File: ModernTextFieldUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
protected Insets getDefaultMargins() {
  Component c = getComponent();
  return DarculaUIUtil.isCompact(c) || DarculaUIUtil.isTableCellEditor(c) ? JBInsets.create(0, 3) : JBInsets.create(2, 6);
}