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


Java MenuItemUI类代码示例

本文整理汇总了Java中javax.swing.plaf.MenuItemUI的典型用法代码示例。如果您正苦于以下问题:Java MenuItemUI类的具体用法?Java MenuItemUI怎么用?Java MenuItemUI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MenuItemUI类属于javax.swing.plaf包,在下文中一共展示了MenuItemUI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isSynthUI

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public static boolean isSynthUI(final MenuItemUI ui) {
  Class<?> aClass = ui.getClass();

  while (aClass != null && aClass.getSimpleName().contains("Synth")) {
    final Class<?>[] interfaces = aClass.getInterfaces();
    for (int i = 0, length = interfaces.length; i < length; i++) {
      final Class<?> anInterface = interfaces[i];
      if (V6_SYNTH_UI_CLASS.equals(anInterface.getName()) || V7_SYNTH_UI_CLASS.equals(anInterface.getName())) {
        return true;
      }
    }
    aClass = aClass.getSuperclass();
  }

  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:GtkPaintingUtil.java

示例2: setUI

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
/**
 * Maps {@code JMenuItem.setUI(MenuItemUI)} through queue
 */
public void setUI(final MenuItemUI menuItemUI) {
    runMapping(new MapVoidAction("setUI") {
        @Override
        public void map() {
            ((JMenuItem) getSource()).setUI(menuItemUI);
        }
    });
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:JMenuItemOperator.java

示例3: getSynthContext

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public static SynthContext getSynthContext(final MenuItemUI ui, final JComponent item) {
  assert Patches.USE_REFLECTION_TO_ACCESS_JDK7;
  try {
    final Method getContext = ui.getClass().getMethod("getContext", JComponent.class);
    getContext.setAccessible(true);
    return (SynthContext)getContext.invoke(ui, item);
  }
  catch (Exception e) {
    throw new RuntimeException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:GtkPaintingUtil.java

示例4: updateUI

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
@Override
public void updateUI() {
    setUI((MenuItemUI) UIManager.getUI(this));

    if(popupMenu != null) {
        popupMenu.setUI((PopupMenuUI) UIManager.getUI(popupMenu));
    }
}
 
开发者ID:P15,项目名称:jailer,代码行数:9,代码来源:JScrollC2Menu.java

示例5: updateUI

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
@Override
public void updateUI() {
	setUI((MenuItemUI) UIManager.getUI(this));

	if (popupMenu != null) {
		popupMenu.setUI((PopupMenuUI) UIManager.getUI(popupMenu));
	}
}
 
开发者ID:P15,项目名称:jailer,代码行数:9,代码来源:JScrollMenu.java

示例6: setUI

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public void setUI(MenuItemUI ui) {
	super.setUI(ui);
}
 
开发者ID:javalovercn,项目名称:j2se_for_android,代码行数:4,代码来源:JMenuItem.java

示例7: updateUI

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
/**
 * This method sets this menuItem's UI to the UIManager's default for the
 * current look and feel.
 */
public void updateUI()
{
  setUI((MenuItemUI) UIManager.getUI(this));
}
 
开发者ID:vilie,项目名称:javify,代码行数:9,代码来源:JMenu.java

示例8: setUI

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
@Override
public void setUI(final MenuItemUI ui) {
  final MenuItemUI newUi = !myTopLevel && UIUtil.isUnderGTKLookAndFeel() && GtkMenuUI.isUiAcceptable(ui) ? new GtkMenuUI(ui) : ui;
  super.setUI(newUi);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ActionMenu.java

示例9: setUI

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
@Override
public void setUI(final MenuItemUI ui) {
  final MenuItemUI newUi = UIUtil.isUnderGTKLookAndFeel() && GtkMenuItemUI.isUiAcceptable(ui) ? new GtkMenuItemUI(ui) : ui;
  super.setUI(newUi);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ActionMenuItem.java

示例10: GtkMenuUI

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public GtkMenuUI(final MenuItemUI originalUI) {
  assert isUiAcceptable(originalUI) : originalUI;
  myOriginalUI = (BasicMenuUI)originalUI;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GtkMenuUI.java

示例11: isUiAcceptable

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public static boolean isUiAcceptable(final MenuItemUI ui) {
  return ui instanceof BasicMenuUI && GtkPaintingUtil.isSynthUI(ui);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:GtkMenuUI.java

示例12: IconWrapper

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public IconWrapper(final Icon icon, final MenuItemUI originalUI) {
  myIcon = icon;
  myOriginalUI = originalUI;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:IconWrapper.java

示例13: GtkMenuItemUI

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public GtkMenuItemUI(final MenuItemUI originalUI) {
  assert isUiAcceptable(originalUI) : originalUI;
  myOriginalUI = (BasicMenuItemUI)originalUI;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GtkMenuItemUI.java

示例14: isUiAcceptable

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public static boolean isUiAcceptable(final MenuItemUI ui) {
  return ui instanceof BasicMenuItemUI && GtkPaintingUtil.isSynthUI(ui);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:GtkMenuItemUI.java

示例15: setUI

import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public void setUI(final MenuItemUI ui) {
    super.setUI(ui);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:4,代码来源:JMenuItem.java


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