javax.swing.JMenuItem.getInsets()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(142)

本文整理了Java中javax.swing.JMenuItem.getInsets()方法的一些代码示例,展示了JMenuItem.getInsets()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenuItem.getInsets()方法的具体详情如下:
包路径:javax.swing.JMenuItem
类名称:JMenuItem
方法名:getInsets

JMenuItem.getInsets介绍

暂无

代码示例

代码示例来源:origin: com.github.insubstantial/substance

Insets ins = menuItem.getInsets();
MenuLayoutMetrics popupMetrics = MenuUtilities.getPopupLayoutMetrics(
    menuItem, false);

代码示例来源:origin: org.java.net.substance/substance

Insets ins = menuItem.getInsets();
MenuLayoutMetrics popupMetrics = MenuUtilities.getPopupLayoutMetrics(
    menuItem, false);

代码示例来源:origin: khuxtable/seaglass

public static void paint(SynthContext context, SynthContext accContext, Graphics g, Icon checkIcon, Icon arrowIcon,
  String acceleratorDelimiter, int defaultTextIconGap, String propertyPrefix) {
  JMenuItem mi = (JMenuItem) context.getComponent();
  SynthStyle style = context.getStyle();
  g.setFont(style.getFont(context));
  Rectangle viewRect = new Rectangle(0, 0, mi.getWidth(), mi.getHeight());
  boolean leftToRight = SeaGlassLookAndFeel.isLeftToRight(mi);
  applyInsets(viewRect, mi.getInsets(), leftToRight);
  SeaGlassMenuItemLayoutHelper lh = new SeaGlassMenuItemLayoutHelper(context, accContext, mi, checkIcon, arrowIcon, viewRect,
    defaultTextIconGap, acceleratorDelimiter, leftToRight, MenuItemLayoutHelper.useCheckAndArrow(mi), propertyPrefix);
  MenuItemLayoutHelper.LayoutResult lr = lh.layoutMenuItem();
  paintMenuItem(g, lh, lr);
}

代码示例来源:origin: com.jidesoft/jide-oss

iconRect.x = menuItem.getInsets().left;
textRect.x = iconRect.x + iconRect.width + textIconGap;
textRect.x = menuItem.getInsets().left;

代码示例来源:origin: com.jidesoft/jide-oss

Insets insets = isDownArrowVisible(menuItem.getParent()) ? new Insets(0, 0, 0, 0) : menuItem.getInsets();

代码示例来源:origin: com.github.insubstantial/substance

MenuLayoutMetrics popupMetrics = MenuUtilities.getPopupLayoutMetrics(
    menuItem, true);
Insets i = menuItem.getInsets();
if (popupMetrics != null) {
  MenuGutterFillKind gutterFillKind = SubstanceCoreUtilities

代码示例来源:origin: org.java.net.substance/substance

MenuLayoutMetrics popupMetrics = MenuUtilities.getPopupLayoutMetrics(
    menuItem, true);
Insets i = menuItem.getInsets();
if (popupMetrics != null) {
  MenuGutterFillKind gutterFillKind = SubstanceCoreUtilities

代码示例来源:origin: com.github.insubstantial/substance

Icon arrowIcon, int defaultTextIconGap) {
Insets i = menuItem.getInsets();

代码示例来源:origin: org.java.net.substance/substance

Icon arrowIcon, int defaultTextIconGap) {
Insets i = menuItem.getInsets();

代码示例来源:origin: com.jidesoft/jide-oss

Insets insets = b.getInsets();

代码示例来源:origin: khuxtable/seaglass

Insets insets = lh.getMenuItem().getInsets();
if (insets != null) {
  result.width += insets.left + insets.right;

代码示例来源:origin: com.jidesoft/jide-oss

Insets insets = b.getInsets();
if (insets != null) {
  r.width += insets.left + insets.right;

代码示例来源:origin: com.jidesoft/jide-oss

r.width += textIconGap;
Insets insets = b.getInsets();
if (useCheckAndArrow()) {
  insets = UIDefaultsLookup.getInsets("MenuItem.margin");

代码示例来源:origin: khuxtable/seaglass

JMenuItem b = (JMenuItem) c;
ButtonModel model = b.getModel();
Insets i = b.getInsets();

代码示例来源:origin: khuxtable/seaglass

Insets insets = b.getInsets();
if (insets != null) {
  r.width += insets.left + insets.right;

相关文章

JMenuItem类方法