Java Code Examples for java.awt.MenuBar#getPeer()
The following examples show how to use
java.awt.MenuBar#getPeer() .
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: XFramePeer.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public void setMenuBar(MenuBar mb) { // state_lock should always be the second after awt_lock XToolkit.awtLock(); try { synchronized(getStateLock()) { if (mb == menubar) return; if (mb == null) { if (menubar != null) { menubarPeer.xSetVisible(false); menubar = null; menubarPeer.dispose(); menubarPeer = null; } } else { menubar = mb; menubarPeer = (XMenuBarPeer) mb.getPeer(); if (menubarPeer != null) { menubarPeer.init((Frame)target); } } } } finally { XToolkit.awtUnlock(); } reshapeMenubarPeer(); }
Example 2
Source File: XFramePeer.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void setMenuBar(MenuBar mb) { // state_lock should always be the second after awt_lock XToolkit.awtLock(); try { synchronized(getStateLock()) { if (mb == menubar) return; if (mb == null) { if (menubar != null) { menubarPeer.xSetVisible(false); menubar = null; menubarPeer.dispose(); menubarPeer = null; } } else { menubar = mb; menubarPeer = (XMenuBarPeer) mb.getPeer(); if (menubarPeer != null) { menubarPeer.init((Frame)target); } } } } finally { XToolkit.awtUnlock(); } reshapeMenubarPeer(); }
Example 3
Source File: XFramePeer.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public void setMenuBar(MenuBar mb) { // state_lock should always be the second after awt_lock XToolkit.awtLock(); try { synchronized(getStateLock()) { if (mb == menubar) return; if (mb == null) { if (menubar != null) { menubarPeer.xSetVisible(false); menubar = null; menubarPeer.dispose(); menubarPeer = null; } } else { menubar = mb; menubarPeer = (XMenuBarPeer) mb.getPeer(); if (menubarPeer != null) { menubarPeer.init((Frame)target); } } } } finally { XToolkit.awtUnlock(); } reshapeMenubarPeer(); }
Example 4
Source File: XFramePeer.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public void setMenuBar(MenuBar mb) { // state_lock should always be the second after awt_lock XToolkit.awtLock(); try { synchronized(getStateLock()) { if (mb == menubar) return; if (mb == null) { if (menubar != null) { menubarPeer.xSetVisible(false); menubar = null; menubarPeer.dispose(); menubarPeer = null; } } else { menubar = mb; menubarPeer = (XMenuBarPeer) mb.getPeer(); if (menubarPeer != null) { menubarPeer.init((Frame)target); } } } } finally { XToolkit.awtUnlock(); } reshapeMenubarPeer(); }
Example 5
Source File: XFramePeer.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public void setMenuBar(MenuBar mb) { // state_lock should always be the second after awt_lock XToolkit.awtLock(); try { synchronized(getStateLock()) { if (mb == menubar) return; if (mb == null) { if (menubar != null) { menubarPeer.xSetVisible(false); menubar = null; menubarPeer.dispose(); menubarPeer = null; } } else { menubar = mb; menubarPeer = (XMenuBarPeer) mb.getPeer(); if (menubarPeer != null) { menubarPeer.init((Frame)target); } } } } finally { XToolkit.awtUnlock(); } reshapeMenubarPeer(); }
Example 6
Source File: XFramePeer.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void setMenuBar(MenuBar mb) { // state_lock should always be the second after awt_lock XToolkit.awtLock(); try { synchronized(getStateLock()) { if (mb == menubar) return; if (mb == null) { if (menubar != null) { menubarPeer.xSetVisible(false); menubar = null; menubarPeer.dispose(); menubarPeer = null; } } else { menubar = mb; menubarPeer = (XMenuBarPeer) mb.getPeer(); if (menubarPeer != null) { menubarPeer.init((Frame)target); } } } } finally { XToolkit.awtUnlock(); } reshapeMenubarPeer(); }
Example 7
Source File: XFramePeer.java From hottub with GNU General Public License v2.0 | 5 votes |
public void setMenuBar(MenuBar mb) { // state_lock should always be the second after awt_lock XToolkit.awtLock(); try { synchronized(getStateLock()) { if (mb == menubar) return; if (mb == null) { if (menubar != null) { menubarPeer.xSetVisible(false); menubar = null; menubarPeer.dispose(); menubarPeer = null; } } else { menubar = mb; menubarPeer = (XMenuBarPeer) mb.getPeer(); if (menubarPeer != null) { menubarPeer.init((Frame)target); } } } } finally { XToolkit.awtUnlock(); } reshapeMenubarPeer(); }
Example 8
Source File: XFramePeer.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void setMenuBar(MenuBar mb) { // state_lock should always be the second after awt_lock XToolkit.awtLock(); try { synchronized(getStateLock()) { if (mb == menubar) return; if (mb == null) { if (menubar != null) { menubarPeer.xSetVisible(false); menubar = null; menubarPeer.dispose(); menubarPeer = null; } } else { menubar = mb; menubarPeer = (XMenuBarPeer) mb.getPeer(); if (menubarPeer != null) { menubarPeer.init((Frame)target); } } } } finally { XToolkit.awtUnlock(); } reshapeMenubarPeer(); }
Example 9
Source File: XFramePeer.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void setMenuBar(MenuBar mb) { // state_lock should always be the second after awt_lock XToolkit.awtLock(); try { synchronized(getStateLock()) { if (mb == menubar) return; if (mb == null) { if (menubar != null) { menubarPeer.xSetVisible(false); menubar = null; menubarPeer.dispose(); menubarPeer = null; } } else { menubar = mb; menubarPeer = (XMenuBarPeer) mb.getPeer(); if (menubarPeer != null) { menubarPeer.init((Frame)target); } } } } finally { XToolkit.awtUnlock(); } reshapeMenubarPeer(); }
Example 10
Source File: XFramePeer.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public void setMenuBar(MenuBar mb) { // state_lock should always be the second after awt_lock XToolkit.awtLock(); try { synchronized(getStateLock()) { if (mb == menubar) return; if (mb == null) { if (menubar != null) { menubarPeer.xSetVisible(false); menubar = null; menubarPeer.dispose(); menubarPeer = null; } } else { menubar = mb; menubarPeer = (XMenuBarPeer) mb.getPeer(); if (menubarPeer != null) { menubarPeer.init((Frame)target); } } } } finally { XToolkit.awtUnlock(); } reshapeMenubarPeer(); }
Example 11
Source File: XFramePeer.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void setMenuBar(MenuBar mb) { // state_lock should always be the second after awt_lock XToolkit.awtLock(); try { synchronized(getStateLock()) { if (mb == menubar) return; if (mb == null) { if (menubar != null) { menubarPeer.xSetVisible(false); menubar = null; menubarPeer.dispose(); menubarPeer = null; } } else { menubar = mb; menubarPeer = (XMenuBarPeer) mb.getPeer(); if (menubarPeer != null) { menubarPeer.init((Frame)target); } } } } finally { XToolkit.awtUnlock(); } reshapeMenubarPeer(); }
Example 12
Source File: XFramePeer.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public void setMenuBar(MenuBar mb) { // state_lock should always be the second after awt_lock XToolkit.awtLock(); try { synchronized(getStateLock()) { if (mb == menubar) return; if (mb == null) { if (menubar != null) { menubarPeer.xSetVisible(false); menubar = null; menubarPeer.dispose(); menubarPeer = null; } } else { menubar = mb; menubarPeer = (XMenuBarPeer) mb.getPeer(); if (menubarPeer != null) { menubarPeer.init((Frame)target); } } } } finally { XToolkit.awtUnlock(); } reshapeMenubarPeer(); }