Search in sources :

Example 6 with MenuItemPeer

use of java.awt.peer.MenuItemPeer in project jdk8u_jdk by JetBrains.

the class MenuItem method disable.

/**
     * @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);
    }
}
Also used : MenuItemPeer(java.awt.peer.MenuItemPeer)

Example 7 with MenuItemPeer

use of java.awt.peer.MenuItemPeer in project jdk8u_jdk by JetBrains.

the class MenuItem method enable.

/**
     * @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);
    }
}
Also used : MenuItemPeer(java.awt.peer.MenuItemPeer)

Aggregations

MenuItemPeer (java.awt.peer.MenuItemPeer)7 Menu (java.awt.Menu)1 MenuItem (java.awt.MenuItem)1