当前位置: 首页>>代码示例>>Java>>正文


Java JBInsets.create方法代码示例

本文整理汇总了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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:IdeaTitledBorder.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:DarculaTextFieldUI.java

示例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);
}
 
开发者ID:ChrisRM,项目名称:material-theme-jetbrains,代码行数:13,代码来源:MTTextFieldUI.java

示例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);
}
 
开发者ID:ChrisRM,项目名称:material-theme-jetbrains,代码行数:13,代码来源:MTPasswordFieldUI.java

示例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);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:DarculaTextFieldUI.java

示例6: createEmptyBorder

import com.intellij.util.ui.JBInsets; //导入方法依赖的package包/类
public static Border createEmptyBorder(Insets insets) {
  return new EmptyBorder(JBInsets.create(insets));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:IdeBorderFactory.java


注:本文中的com.intellij.util.ui.JBInsets.create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。