/* * Called from native code when we have been dragged onto another screen. */ void draggedToNewScreen() { SunToolkit.executeOnEventHandlerThread( (Component) target, new Runnable() { public void run() { displayChanged(); } }); }
public void setXEmbedDropTarget() { // Register a drop site on the top level. Runnable r = new Runnable() { public void run() { target.setDropTarget(new XEmbedDropTarget()); } }; SunToolkit.executeOnEventHandlerThread(target, r); }
public void removeXEmbedDropTarget() { // Unregister a drop site on the top level. Runnable r = new Runnable() { public void run() { if (target.getDropTarget() instanceof XEmbedDropTarget) { target.setDropTarget(null); } } }; SunToolkit.executeOnEventHandlerThread(target, r); }
/** Returns true if the GraphicsDevice has been changed, false otherwise. */ public boolean updateGraphicsDevice() { GraphicsDevice newGraphicsDevice = platformWindow.getGraphicsDevice(); synchronized (getStateLock()) { if (graphicsDevice == newGraphicsDevice) { return false; } graphicsDevice = newGraphicsDevice; } final GraphicsConfiguration newGC = newGraphicsDevice.getDefaultConfiguration(); if (!setGraphicsConfig(newGC)) return false; SunToolkit.executeOnEventHandlerThread( getTarget(), new Runnable() { public void run() { AWTAccessor.getComponentAccessor().setGraphicsConfiguration(getTarget(), newGC); } }); return true; }