Java 类java.awt.peer.MenuItemPeer 实例源码

项目:OpenJSharp    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:OpenJSharp    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:OpenJSharp    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:OpenJSharp    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:OpenJSharp    文件:MenuItem.java   
void deleteShortcut(MenuShortcut s) {
    if (s.equals(shortcut)) {
        shortcut = null;
        MenuItemPeer peer = (MenuItemPeer)this.peer;
        if (peer != null) {
            peer.setLabel(label);
        }
    }
}
项目:OpenJSharp    文件:CMenu.java   
@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());
        }
    }
}
项目:jdk8u-jdk    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:jdk8u-jdk    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:jdk8u-jdk    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:jdk8u-jdk    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:jdk8u-jdk    文件:MenuItem.java   
void deleteShortcut(MenuShortcut s) {
    if (s.equals(shortcut)) {
        shortcut = null;
        MenuItemPeer peer = (MenuItemPeer)this.peer;
        if (peer != null) {
            peer.setLabel(label);
        }
    }
}
项目:jdk8u-jdk    文件:CMenu.java   
@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());
        }
    }
}
项目:openjdk-jdk10    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:openjdk-jdk10    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:openjdk-jdk10    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:openjdk-jdk10    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:openjdk-jdk10    文件:MenuItem.java   
void deleteShortcut(MenuShortcut s) {
    if (s.equals(shortcut)) {
        shortcut = null;
        MenuItemPeer peer = (MenuItemPeer)this.peer;
        if (peer != null) {
            peer.setLabel(label);
        }
    }
}
项目:openjdk-jdk10    文件:CMenu.java   
@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());
        }
    }
}
项目:openjdk9    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:openjdk9    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:openjdk9    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:openjdk9    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:openjdk9    文件:MenuItem.java   
void deleteShortcut(MenuShortcut s) {
    if (s.equals(shortcut)) {
        shortcut = null;
        MenuItemPeer peer = (MenuItemPeer)this.peer;
        if (peer != null) {
            peer.setLabel(label);
        }
    }
}
项目:openjdk9    文件:CMenu.java   
@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());
        }
    }
}
项目:Java8CN    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:Java8CN    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:Java8CN    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:Java8CN    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:Java8CN    文件:MenuItem.java   
void deleteShortcut(MenuShortcut s) {
    if (s.equals(shortcut)) {
        shortcut = null;
        MenuItemPeer peer = (MenuItemPeer)this.peer;
        if (peer != null) {
            peer.setLabel(label);
        }
    }
}
项目:jdk8u_jdk    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:jdk8u_jdk    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:jdk8u_jdk    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:jdk8u_jdk    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:jdk8u_jdk    文件:MenuItem.java   
void deleteShortcut(MenuShortcut s) {
    if (s.equals(shortcut)) {
        shortcut = null;
        MenuItemPeer peer = (MenuItemPeer)this.peer;
        if (peer != null) {
            peer.setLabel(label);
        }
    }
}
项目:jdk8u_jdk    文件:CMenu.java   
@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());
        }
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:MenuItem.java   
/**
 * @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);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:MenuItem.java   
/**
 * 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);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:MenuItem.java   
void deleteShortcut(MenuShortcut s) {
    if (s.equals(shortcut)) {
        shortcut = null;
        MenuItemPeer peer = (MenuItemPeer)this.peer;
        if (peer != null) {
            peer.setLabel(label);
        }
    }
}