本文整理汇总了Java中com.intellij.util.ui.JBInsets.create方法的典型用法代码示例。如果您正苦于以下问题:Java JBInsets.create方法的具体用法?Java JBInsets.create怎么用?Java JBInsets.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.ui.JBInsets
的用法示例。
在下文中一共展示了JBInsets.create方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: IdeaTitledBorder
import com.intellij.util.ui.JBInsets; //导入方法依赖的package包/类
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);
}
示例2: getDrawingRect
import com.intellij.util.ui.JBInsets; //导入方法依赖的package包/类
protected Rectangle getDrawingRect() {
final JTextComponent c = myTextField;
final JBInsets i = JBInsets.create(c.getInsets());
final int x = i.right - JBUI.scale(4) - JBUI.scale(16);
final int y = i.top - 3;
final int w = c.getWidth() - i.width() + JBUI.scale(16*2 +7*2 - 5);
int h = c.getBounds().height - i.height() + JBUI.scale(4*2 - 3);
if (h%2==1) h++;
return new Rectangle(x, y, w, h);
}
示例3: getDrawingRect
import com.intellij.util.ui.JBInsets; //导入方法依赖的package包/类
protected Rectangle getDrawingRect() {
final JTextComponent c = myTextField;
final JBInsets i = JBInsets.create(c.getInsets());
final int x = i.right - JBUI.scale(4) - JBUI.scale(16);
final int y = i.top - JBUI.scale(3);
final int w = c.getWidth() - i.width() + JBUI.scale(16 * 2 + 7 * 2 - 5);
int h = c.getBounds().height - i.height() + JBUI.scale(4 * 2 - 3);
if (h % 2 == 1) {
h++;
}
return new Rectangle(x, y, w, h);
}
示例4: getDrawingRect
import com.intellij.util.ui.JBInsets; //导入方法依赖的package包/类
private Rectangle getDrawingRect() {
JComponent c = passwordField;
final JBInsets i = JBInsets.create(c.getInsets());
final int x = i.right - JBUI.scale(4) - JBUI.scale(16 * 2);
final int y = i.top - JBUI.scale(3);
final int w = c.getWidth() - i.width() + JBUI.scale(16 * 2 + 7 * 2 - 5);
int h = c.getBounds().height - i.height() + JBUI.scale(4 * 2 - 3);
if (h % 2 == 1) {
h++;
}
return new Rectangle(x, y, w, h);
}
示例5: getDrawingRect
import com.intellij.util.ui.JBInsets; //导入方法依赖的package包/类
protected Rectangle getDrawingRect() {
final JTextComponent c = getComponent();
final JBInsets i = JBInsets.create(c.getInsets());
final int x = i.right - 4 - 16;
final int y = i.top - 3;
final int w = c.getWidth() - i.width() + 16*2 +7*2 - 5;
int h = c.getBounds().height - i.height() + 4*2 - 3;
if (h%2==1) h++;
return new Rectangle(x, y, w, h);
}
示例6: createEmptyBorder
import com.intellij.util.ui.JBInsets; //导入方法依赖的package包/类
public static Border createEmptyBorder(Insets insets) {
return new EmptyBorder(JBInsets.create(insets));
}