Java Code Examples for sun.awt.SunToolkit#insertTargetMapping()
The following examples show how to use
sun.awt.SunToolkit#insertTargetMapping() .
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: TrayIcon.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private TrayIcon() throws UnsupportedOperationException, HeadlessException, SecurityException { SystemTray.checkSystemTrayAllowed(); if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } if (!SystemTray.isSupported()) { throw new UnsupportedOperationException(); } SunToolkit.insertTargetMapping(this, AppContext.getAppContext()); }
Example 2
Source File: TrayIcon.java From jdk-1.7-annotated with Apache License 2.0 | 5 votes |
private TrayIcon() throws UnsupportedOperationException, HeadlessException, SecurityException { SystemTray.checkSystemTrayAllowed(); if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } if (!SystemTray.isSupported()) { throw new UnsupportedOperationException(); } SunToolkit.insertTargetMapping(this, AppContext.getAppContext()); }
Example 3
Source File: TrayIcon.java From Java8CN with Apache License 2.0 | 5 votes |
private TrayIcon() throws UnsupportedOperationException, HeadlessException, SecurityException { SystemTray.checkSystemTrayAllowed(); if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } if (!SystemTray.isSupported()) { throw new UnsupportedOperationException(); } SunToolkit.insertTargetMapping(this, AppContext.getAppContext()); }
Example 4
Source File: TrayIcon.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private TrayIcon() throws UnsupportedOperationException, HeadlessException, SecurityException { SystemTray.checkSystemTrayAllowed(); if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } if (!SystemTray.isSupported()) { throw new UnsupportedOperationException(); } SunToolkit.insertTargetMapping(this, AppContext.getAppContext()); }
Example 5
Source File: TrayIcon.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
private TrayIcon() throws UnsupportedOperationException, HeadlessException, SecurityException { SystemTray.checkSystemTrayAllowed(); if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } if (!SystemTray.isSupported()) { throw new UnsupportedOperationException(); } SunToolkit.insertTargetMapping(this, AppContext.getAppContext()); }
Example 6
Source File: TrayIcon.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private TrayIcon() throws UnsupportedOperationException, HeadlessException, SecurityException { SystemTray.checkSystemTrayAllowed(); if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } if (!SystemTray.isSupported()) { throw new UnsupportedOperationException(); } SunToolkit.insertTargetMapping(this, AppContext.getAppContext()); }
Example 7
Source File: TrayIcon.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private TrayIcon() throws UnsupportedOperationException, HeadlessException, SecurityException { SystemTray.checkSystemTrayAllowed(); if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } if (!SystemTray.isSupported()) { throw new UnsupportedOperationException(); } SunToolkit.insertTargetMapping(this, AppContext.getAppContext()); }
Example 8
Source File: TrayIcon.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private TrayIcon() throws UnsupportedOperationException, HeadlessException, SecurityException { SystemTray.checkSystemTrayAllowed(); if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } if (!SystemTray.isSupported()) { throw new UnsupportedOperationException(); } SunToolkit.insertTargetMapping(this, AppContext.getAppContext()); }
Example 9
Source File: TrayIcon.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private TrayIcon() throws UnsupportedOperationException, HeadlessException, SecurityException { SystemTray.checkSystemTrayAllowed(); if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } if (!SystemTray.isSupported()) { throw new UnsupportedOperationException(); } SunToolkit.insertTargetMapping(this, AppContext.getAppContext()); }
Example 10
Source File: TrayIcon.java From JDKSourceCode1.8 with MIT License | 5 votes |
private TrayIcon() throws UnsupportedOperationException, HeadlessException, SecurityException { SystemTray.checkSystemTrayAllowed(); if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } if (!SystemTray.isSupported()) { throw new UnsupportedOperationException(); } SunToolkit.insertTargetMapping(this, AppContext.getAppContext()); }
Example 11
Source File: TrayIcon.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private TrayIcon() throws UnsupportedOperationException, HeadlessException, SecurityException { SystemTray.checkSystemTrayAllowed(); if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } if (!SystemTray.isSupported()) { throw new UnsupportedOperationException(); } SunToolkit.insertTargetMapping(this, AppContext.getAppContext()); }
Example 12
Source File: TrayIcon.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private TrayIcon() throws UnsupportedOperationException, HeadlessException, SecurityException { SystemTray.checkSystemTrayAllowed(); if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } if (!SystemTray.isSupported()) { throw new UnsupportedOperationException(); } SunToolkit.insertTargetMapping(this, AppContext.getAppContext()); }
Example 13
Source File: XSelection.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private boolean convertAndStore(long requestor, long format, long property) { int dataFormat = 8; /* Can choose between 8,16,32. */ byte[] byteData = null; long nativeDataPtr = 0; int count = 0; try { SunToolkit.insertTargetMapping(this, appContext); byteData = DataTransferer.getInstance().convertData(this, contents, format, formatMap, XToolkit.isToolkitThread()); } catch (IOException ioe) { return false; } if (byteData == null) { return false; } count = byteData.length; try { if (count > 0) { if (count <= MAX_PROPERTY_SIZE) { nativeDataPtr = Native.toData(byteData); } else { // Initiate incremental data transfer. new IncrementalDataProvider(requestor, property, format, 8, byteData); nativeDataPtr = XlibWrapper.unsafe.allocateMemory(XAtom.getAtomSize()); Native.putLong(nativeDataPtr, (long)count); format = XDataTransferer.INCR_ATOM.getAtom(); dataFormat = 32; count = 1; } } XToolkit.awtLock(); try { XlibWrapper.XChangeProperty(XToolkit.getDisplay(), requestor, property, format, dataFormat, XConstants.PropModeReplace, nativeDataPtr, count); } finally { XToolkit.awtUnlock(); } } finally { if (nativeDataPtr != 0) { XlibWrapper.unsafe.freeMemory(nativeDataPtr); nativeDataPtr = 0; } } return true; }
Example 14
Source File: XSelection.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private boolean convertAndStore(long requestor, long format, long property) { int dataFormat = 8; /* Can choose between 8,16,32. */ byte[] byteData = null; long nativeDataPtr = 0; int count = 0; try { SunToolkit.insertTargetMapping(this, appContext); byteData = DataTransferer.getInstance().convertData(this, contents, format, formatMap, XToolkit.isToolkitThread()); } catch (IOException ioe) { return false; } if (byteData == null) { return false; } count = byteData.length; try { if (count > 0) { if (count <= MAX_PROPERTY_SIZE) { nativeDataPtr = Native.toData(byteData); } else { // Initiate incremental data transfer. new IncrementalDataProvider(requestor, property, format, 8, byteData); nativeDataPtr = XlibWrapper.unsafe.allocateMemory(XAtom.getAtomSize()); Native.putLong(nativeDataPtr, (long)count); format = XDataTransferer.INCR_ATOM.getAtom(); dataFormat = 32; count = 1; } } XToolkit.awtLock(); try { XlibWrapper.XChangeProperty(XToolkit.getDisplay(), requestor, property, format, dataFormat, XConstants.PropModeReplace, nativeDataPtr, count); } finally { XToolkit.awtUnlock(); } } finally { if (nativeDataPtr != 0) { XlibWrapper.unsafe.freeMemory(nativeDataPtr); nativeDataPtr = 0; } } return true; }
Example 15
Source File: XSelection.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
private boolean convertAndStore(long requestor, long format, long property) { int dataFormat = 8; /* Can choose between 8,16,32. */ byte[] byteData = null; long nativeDataPtr = 0; int count = 0; try { SunToolkit.insertTargetMapping(this, appContext); byteData = DataTransferer.getInstance().convertData(this, contents, format, formatMap, XToolkit.isToolkitThread()); } catch (IOException ioe) { return false; } if (byteData == null) { return false; } count = byteData.length; try { if (count > 0) { if (count <= MAX_PROPERTY_SIZE) { nativeDataPtr = Native.toData(byteData); } else { // Initiate incremental data transfer. new IncrementalDataProvider(requestor, property, format, 8, byteData); nativeDataPtr = XlibWrapper.unsafe.allocateMemory(XAtom.getAtomSize()); Native.putLong(nativeDataPtr, (long)count); format = XDataTransferer.INCR_ATOM.getAtom(); dataFormat = 32; count = 1; } } XToolkit.awtLock(); try { XlibWrapper.XChangeProperty(XToolkit.getDisplay(), requestor, property, format, dataFormat, XConstants.PropModeReplace, nativeDataPtr, count); } finally { XToolkit.awtUnlock(); } } finally { if (nativeDataPtr != 0) { XlibWrapper.unsafe.freeMemory(nativeDataPtr); nativeDataPtr = 0; } } return true; }
Example 16
Source File: XSelection.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private boolean convertAndStore(long requestor, long format, long property) { int dataFormat = 8; /* Can choose between 8,16,32. */ byte[] byteData = null; long nativeDataPtr = 0; int count = 0; try { SunToolkit.insertTargetMapping(this, appContext); byteData = DataTransferer.getInstance().convertData(this, contents, format, formatMap, XToolkit.isToolkitThread()); } catch (IOException ioe) { return false; } if (byteData == null) { return false; } count = byteData.length; try { if (count > 0) { if (count <= MAX_PROPERTY_SIZE) { nativeDataPtr = Native.toData(byteData); } else { // Initiate incremental data transfer. new IncrementalDataProvider(requestor, property, format, 8, byteData); nativeDataPtr = XlibWrapper.unsafe.allocateMemory(XAtom.getAtomSize()); Native.putLong(nativeDataPtr, (long)count); format = XDataTransferer.INCR_ATOM.getAtom(); dataFormat = 32; count = 1; } } XToolkit.awtLock(); try { XlibWrapper.XChangeProperty(XToolkit.getDisplay(), requestor, property, format, dataFormat, XConstants.PropModeReplace, nativeDataPtr, count); } finally { XToolkit.awtUnlock(); } } finally { if (nativeDataPtr != 0) { XlibWrapper.unsafe.freeMemory(nativeDataPtr); nativeDataPtr = 0; } } return true; }
Example 17
Source File: XSelection.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private boolean convertAndStore(long requestor, long format, long property) { int dataFormat = 8; /* Can choose between 8,16,32. */ byte[] byteData = null; long nativeDataPtr = 0; int count = 0; try { SunToolkit.insertTargetMapping(this, appContext); byteData = DataTransferer.getInstance().convertData(this, contents, format, formatMap, XToolkit.isToolkitThread()); } catch (IOException ioe) { return false; } if (byteData == null) { return false; } count = byteData.length; try { if (count > 0) { if (count <= MAX_PROPERTY_SIZE) { nativeDataPtr = Native.toData(byteData); } else { // Initiate incremental data transfer. new IncrementalDataProvider(requestor, property, format, 8, byteData); nativeDataPtr = XlibWrapper.unsafe.allocateMemory(XAtom.getAtomSize()); Native.putLong(nativeDataPtr, (long)count); format = XDataTransferer.INCR_ATOM.getAtom(); dataFormat = 32; count = 1; } } XToolkit.awtLock(); try { XlibWrapper.XChangeProperty(XToolkit.getDisplay(), requestor, property, format, dataFormat, XConstants.PropModeReplace, nativeDataPtr, count); } finally { XToolkit.awtUnlock(); } } finally { if (nativeDataPtr != 0) { XlibWrapper.unsafe.freeMemory(nativeDataPtr); nativeDataPtr = 0; } } return true; }
Example 18
Source File: XSelection.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
private boolean convertAndStore(long requestor, long format, long property) { int dataFormat = 8; /* Can choose between 8,16,32. */ byte[] byteData = null; long nativeDataPtr = 0; int count = 0; try { SunToolkit.insertTargetMapping(this, appContext); byteData = DataTransferer.getInstance().convertData(this, contents, format, formatMap, XToolkit.isToolkitThread()); } catch (IOException ioe) { return false; } if (byteData == null) { return false; } count = byteData.length; try { if (count > 0) { if (count <= MAX_PROPERTY_SIZE) { nativeDataPtr = Native.toData(byteData); } else { // Initiate incremental data transfer. new IncrementalDataProvider(requestor, property, format, 8, byteData); nativeDataPtr = XlibWrapper.unsafe.allocateMemory(XAtom.getAtomSize()); Native.putLong(nativeDataPtr, (long)count); format = XDataTransferer.INCR_ATOM.getAtom(); dataFormat = 32; count = 1; } } XToolkit.awtLock(); try { XlibWrapper.XChangeProperty(XToolkit.getDisplay(), requestor, property, format, dataFormat, XConstants.PropModeReplace, nativeDataPtr, count); } finally { XToolkit.awtUnlock(); } } finally { if (nativeDataPtr != 0) { XlibWrapper.unsafe.freeMemory(nativeDataPtr); nativeDataPtr = 0; } } return true; }
Example 19
Source File: XSelection.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
private boolean convertAndStore(long requestor, long format, long property) { int dataFormat = 8; /* Can choose between 8,16,32. */ byte[] byteData = null; long nativeDataPtr = 0; int count = 0; try { SunToolkit.insertTargetMapping(this, appContext); byteData = DataTransferer.getInstance().convertData(this, contents, format, formatMap, XToolkit.isToolkitThread()); } catch (IOException ioe) { return false; } if (byteData == null) { return false; } count = byteData.length; try { if (count > 0) { if (count <= MAX_PROPERTY_SIZE) { nativeDataPtr = Native.toData(byteData); } else { // Initiate incremental data transfer. new IncrementalDataProvider(requestor, property, format, 8, byteData); nativeDataPtr = XlibWrapper.unsafe.allocateMemory(XAtom.getAtomSize()); Native.putLong(nativeDataPtr, (long)count); format = XDataTransferer.INCR_ATOM.getAtom(); dataFormat = 32; count = 1; } } XToolkit.awtLock(); try { XlibWrapper.XChangeProperty(XToolkit.getDisplay(), requestor, property, format, dataFormat, XConstants.PropModeReplace, nativeDataPtr, count); } finally { XToolkit.awtUnlock(); } } finally { if (nativeDataPtr != 0) { XlibWrapper.unsafe.freeMemory(nativeDataPtr); nativeDataPtr = 0; } } return true; }
Example 20
Source File: XSelection.java From hottub with GNU General Public License v2.0 | 4 votes |
private boolean convertAndStore(long requestor, long format, long property) { int dataFormat = 8; /* Can choose between 8,16,32. */ byte[] byteData = null; long nativeDataPtr = 0; int count = 0; try { SunToolkit.insertTargetMapping(this, appContext); byteData = DataTransferer.getInstance().convertData(this, contents, format, formatMap, XToolkit.isToolkitThread()); } catch (IOException ioe) { return false; } if (byteData == null) { return false; } count = byteData.length; try { if (count > 0) { if (count <= MAX_PROPERTY_SIZE) { nativeDataPtr = Native.toData(byteData); } else { // Initiate incremental data transfer. new IncrementalDataProvider(requestor, property, format, 8, byteData); nativeDataPtr = XlibWrapper.unsafe.allocateMemory(XAtom.getAtomSize()); Native.putLong(nativeDataPtr, (long)count); format = XDataTransferer.INCR_ATOM.getAtom(); dataFormat = 32; count = 1; } } XToolkit.awtLock(); try { XlibWrapper.XChangeProperty(XToolkit.getDisplay(), requestor, property, format, dataFormat, XConstants.PropModeReplace, nativeDataPtr, count); } finally { XToolkit.awtUnlock(); } } finally { if (nativeDataPtr != 0) { XlibWrapper.unsafe.freeMemory(nativeDataPtr); nativeDataPtr = 0; } } return true; }