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


Java MenuItemPeer.setLabel方法代码示例

本文整理汇总了Java中java.awt.peer.MenuItemPeer.setLabel方法的典型用法代码示例。如果您正苦于以下问题:Java MenuItemPeer.setLabel方法的具体用法?Java MenuItemPeer.setLabel怎么用?Java MenuItemPeer.setLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.peer.MenuItemPeer的用法示例。


在下文中一共展示了MenuItemPeer.setLabel方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例3: 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

示例4: 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

示例5: setLabel

import java.awt.peer.MenuItemPeer; //导入方法依赖的package包/类
/**
  * This method sets the label for this menu to the specified value.
  *
  * @param label The new label for this menu item.
  */
public synchronized void
setLabel(String label)
{
  this.label = label;
  if (peer != null)
    {
      MenuItemPeer mp = (MenuItemPeer) peer;
      mp.setLabel (label);
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:16,代码来源:MenuItem.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</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:jgaltidor,项目名称:VarJ,代码行数:14,代码来源:MenuItem.java

示例7: 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:jgaltidor,项目名称:VarJ,代码行数:13,代码来源:MenuItem.java

示例8: setShortcut

import java.awt.peer.MenuItemPeer; //导入方法依赖的package包/类
/**
 * Set the <code>MenuShortcut</code> object associated with this
 * menu item. If a menu shortcut is already associated with
 * this menu item, it is replaced.
 * @param       s  the menu shortcut to associate
 *                           with this menu item.
 * @see         java.awt.MenuItem#getShortcut
 * @since       JDK1.1
 */
public void setShortcut(MenuShortcut s) {
    shortcut = s;
    MenuItemPeer peer = (MenuItemPeer)this.peer;
    if (peer != null) {
        peer.setLabel(label);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:MenuItem.java

示例9: setShortcut

import java.awt.peer.MenuItemPeer; //导入方法依赖的package包/类
/**
 * Set the {@code MenuShortcut} object associated with this
 * menu item. If a menu shortcut is already associated with
 * this menu item, it is replaced.
 * @param       s  the menu shortcut to associate
 *                           with this menu item.
 * @see         java.awt.MenuItem#getShortcut
 * @since       1.1
 */
public void setShortcut(MenuShortcut s) {
    shortcut = s;
    MenuItemPeer peer = (MenuItemPeer)this.peer;
    if (peer != null) {
        peer.setLabel(label);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:MenuItem.java

示例10: setShortcut

import java.awt.peer.MenuItemPeer; //导入方法依赖的package包/类
/**
    * Set the <code>MenuShortcut</code> object associated with this
    * menu item. If a menu shortcut is already associated with
    * this menu item, it is replaced.
    * @param       s  the menu shortcut to associate
    *                           with this menu item.
    * @see         java.awt.MenuItem#getShortcut
    * @since       JDK1.1
    */
   public void setShortcut(MenuShortcut s) {
       shortcut = s;
MenuItemPeer peer = (MenuItemPeer)this.peer;
if (peer != null) {
    peer.setLabel(label);
}
   }
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:17,代码来源:MenuItem.java


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