本文整理汇总了Java中com.intellij.util.ui.JBUI.emptyInsets方法的典型用法代码示例。如果您正苦于以下问题:Java JBUI.emptyInsets方法的具体用法?Java JBUI.emptyInsets怎么用?Java JBUI.emptyInsets使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.ui.JBUI
的用法示例。
在下文中一共展示了JBUI.emptyInsets方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBorderInsets
import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Insets getBorderInsets(Component c) {
return JBUI.emptyInsets();
}
示例2: newWallpaperPainter
import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
private static AbstractPainter newWallpaperPainter(@NotNull final String propertyName) {
return new ImagePainter() {
Image image;
float alpha;
Insets insets;
FillType fillType;
String current;
@Override
public void executePaint(Component component, Graphics2D g) {
String value = StringUtil.notNullize(System.getProperty(propertyName), propertyName + ".png");
if (!Comparing.equal(value, current)) {
current = value;
image = scaled = null;
insets = JBUI.emptyInsets();
String[] parts = value.split(",");
try {
alpha = StringUtil.parseInt(parts.length > 1 ? parts[1]: "", 10) / 100f;
try {
fillType = FillType.valueOf(parts.length > 2 ? parts[2].toUpperCase(Locale.ENGLISH) : "");
}
catch (IllegalArgumentException e) {
fillType = FillType.SCALE;
}
String filePath = parts[0];
URL url = filePath.contains("://") ? new URL(filePath) :
(FileUtil.isAbsolutePlatformIndependent(filePath)
? new File(filePath)
: new File(PathManager.getConfigPath(), filePath)).toURI().toURL();
image = ImageLoader.loadFromUrl(url);
}
catch (Exception ignored) {
}
}
if (image == null) return;
executePaint(g, component, image, fillType, alpha, insets);
}
};
}
示例3: getBorderInsets
import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@NotNull
@Override
public Insets getBorderInsets(Component c) {
return JBUI.emptyInsets();
}
示例4: MacComboBoxBorder
import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
public MacComboBoxBorder() {
super(JBUI.emptyInsets());
}
示例5: getBorderInsets
import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Insets getBorderInsets(Component c) {
return JBUI.emptyInsets();
}
示例6: getElementIpad
import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Insets getElementIpad(boolean isPopupElement) {
return isPopupElement ? JBUI.insets(1, 2) : JBUI.emptyInsets();
}