本文整理汇总了Java中java.awt.peer.MenuItemPeer类的典型用法代码示例。如果您正苦于以下问题:Java MenuItemPeer类的具体用法?Java MenuItemPeer怎么用?Java MenuItemPeer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MenuItemPeer类属于java.awt.peer包,在下文中一共展示了MenuItemPeer类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setLabel
import java.awt.peer.MenuItemPeer; //导入依赖的package包/类
/**
* Sets the label for this menu item to the specified label.
* @param label the new label, or <code>null</code> for no label.
* @see java.awt.MenuItem#getLabel
* @since JDK1.0
*/
public synchronized void setLabel(String label) {
this.label = label;
MenuItemPeer peer = (MenuItemPeer)this.peer;
if (peer != null) {
peer.setLabel(label);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:MenuItem.java
示例2: enable
import java.awt.peer.MenuItemPeer; //导入依赖的package包/类
/**
* @deprecated As of JDK version 1.1,
* replaced by <code>setEnabled(boolean)</code>.
*/
@Deprecated
public synchronized void enable() {
enabled = true;
MenuItemPeer peer = (MenuItemPeer)this.peer;
if (peer != null) {
peer.setEnabled(true);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:MenuItem.java
示例3: disable
import java.awt.peer.MenuItemPeer; //导入依赖的package包/类
/**
* @deprecated As of JDK version 1.1,
* replaced by <code>setEnabled(boolean)</code>.
*/
@Deprecated
public synchronized void disable() {
enabled = false;
MenuItemPeer peer = (MenuItemPeer)this.peer;
if (peer != null) {
peer.setEnabled(false);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:MenuItem.java
示例4: deleteShortcut
import java.awt.peer.MenuItemPeer; //导入依赖的package包/类
/**
* Delete any <code>MenuShortcut</code> object associated
* with this menu item.
* @since JDK1.1
*/
public void deleteShortcut() {
shortcut = null;
MenuItemPeer peer = (MenuItemPeer)this.peer;
if (peer != null) {
peer.setLabel(label);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:MenuItem.java
示例5: setEnabled
import java.awt.peer.MenuItemPeer; //导入依赖的package包/类
@Override
public final void setEnabled(final boolean b) {
super.setEnabled(b);
final Menu target = (Menu) getTarget();
final int count = target.getItemCount();
for (int i = 0; i < count; ++i) {
MenuItem item = target.getItem(i);
MenuItemPeer p = (MenuItemPeer) LWCToolkit.targetToPeer(item);
if (p != null) {
p.setEnabled(b && item.isEnabled());
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:CMenu.java
示例6: setLabel
import java.awt.peer.MenuItemPeer; //导入依赖的package包/类
/**
* Sets the label for this menu item to the specified label.
* @param label the new label, or {@code null} for no label.
* @see java.awt.MenuItem#getLabel
* @since 1.0
*/
public synchronized void setLabel(String label) {
this.label = label;
MenuItemPeer peer = (MenuItemPeer)this.peer;
if (peer != null) {
peer.setLabel(label);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:MenuItem.java
示例7: enable
import java.awt.peer.MenuItemPeer; //导入依赖的package包/类
/**
* @deprecated As of JDK version 1.1,
* replaced by {@code setEnabled(boolean)}.
*/
@Deprecated
public synchronized void enable() {
enabled = true;
MenuItemPeer peer = (MenuItemPeer)this.peer;
if (peer != null) {
peer.setEnabled(true);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:MenuItem.java
示例8: disable
import java.awt.peer.MenuItemPeer; //导入依赖的package包/类
/**
* @deprecated As of JDK version 1.1,
* replaced by {@code setEnabled(boolean)}.
*/
@Deprecated
public synchronized void disable() {
enabled = false;
MenuItemPeer peer = (MenuItemPeer)this.peer;
if (peer != null) {
peer.setEnabled(false);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:MenuItem.java
示例9: deleteShortcut
import java.awt.peer.MenuItemPeer; //导入依赖的package包/类
/**
* Delete any {@code MenuShortcut} object associated
* with this menu item.
* @since 1.1
*/
public void deleteShortcut() {
shortcut = null;
MenuItemPeer peer = (MenuItemPeer)this.peer;
if (peer != null) {
peer.setLabel(label);
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:MenuItem.java
注:本文中的java.awt.peer.MenuItemPeer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论