Java Code Examples for java.awt.peer.MenuItemPeer#setEnabled()
The following examples show how to use
java.awt.peer.MenuItemPeer#setEnabled() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MenuItem.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 2
Source File: MenuItem.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 3
Source File: CMenu.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@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()); } } }
Example 4
Source File: MenuItem.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 5
Source File: MenuItem.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 6
Source File: MenuItem.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 7
Source File: MenuItem.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 8
Source File: MenuItem.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 9
Source File: MenuItem.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * @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); } }
Example 10
Source File: MenuItem.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 11
Source File: MenuItem.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * @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); } }
Example 12
Source File: MenuItem.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 13
Source File: CMenu.java From hottub with GNU General Public License v2.0 | 5 votes |
@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()); } } }
Example 14
Source File: MenuItem.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 15
Source File: MenuItem.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 16
Source File: MenuItem.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 17
Source File: CMenu.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@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()); } } }
Example 18
Source File: MenuItem.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 19
Source File: MenuItem.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * @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); } }
Example 20
Source File: MenuItem.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * @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); } }