本文整理汇总了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;
}
示例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);
}
});
}
示例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);
}
}
示例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));
}
}
示例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));
}
}
示例6: setUI
import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public void setUI(MenuItemUI ui) {
super.setUI(ui);
}
示例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));
}
示例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);
}
示例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);
}
示例10: GtkMenuUI
import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public GtkMenuUI(final MenuItemUI originalUI) {
assert isUiAcceptable(originalUI) : originalUI;
myOriginalUI = (BasicMenuUI)originalUI;
}
示例11: isUiAcceptable
import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public static boolean isUiAcceptable(final MenuItemUI ui) {
return ui instanceof BasicMenuUI && GtkPaintingUtil.isSynthUI(ui);
}
示例12: IconWrapper
import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public IconWrapper(final Icon icon, final MenuItemUI originalUI) {
myIcon = icon;
myOriginalUI = originalUI;
}
示例13: GtkMenuItemUI
import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public GtkMenuItemUI(final MenuItemUI originalUI) {
assert isUiAcceptable(originalUI) : originalUI;
myOriginalUI = (BasicMenuItemUI)originalUI;
}
示例14: isUiAcceptable
import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public static boolean isUiAcceptable(final MenuItemUI ui) {
return ui instanceof BasicMenuItemUI && GtkPaintingUtil.isSynthUI(ui);
}
示例15: setUI
import javax.swing.plaf.MenuItemUI; //导入依赖的package包/类
public void setUI(final MenuItemUI ui) {
super.setUI(ui);
}