Package snap.swing
Class SwingViewEnv
java.lang.Object
snap.view.ViewEnv
snap.swing.SwingViewEnv
A ViewEnv subclass for Swing.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activateApp
(View aView) Activates the App giving focus to given node.createEvent
(View aView, Object anEvent, ViewEvent.Type aType, String aName) Creates an event for a UI node.createHelper
(View aView) Returns a new ViewHelper for given native component.static SwingViewEnv
get()
Returns a shared instance.Returns the system clipboard.Returns the clipboard for drag and drop.Returns the screen bounds inset to usable area.boolean
Returns whether current thread is event thread.void
Run later.static void
set()
Sets the Swing Node Env.Methods inherited from class snap.view.ViewEnv
complain, getEnv, getUISource, runDelayed, runIntervals, runLaterAndWait, runLaterOnce, runLaterOnce, stopIntervals
-
Constructor Details
-
SwingViewEnv
public SwingViewEnv()Creates a new SwingViewEnv.
-
-
Method Details
-
isEventThread
public boolean isEventThread()Returns whether current thread is event thread.- Specified by:
isEventThread
in classViewEnv
-
runLater
Run later. -
getClipboard
Returns the system clipboard.- Overrides:
getClipboard
in classViewEnv
-
getClipboardDrag
Returns the clipboard for drag and drop.- Overrides:
getClipboardDrag
in classViewEnv
-
createHelper
Returns a new ViewHelper for given native component.- Overrides:
createHelper
in classViewEnv
-
createEvent
Creates an event for a UI node.- Specified by:
createEvent
in classViewEnv
-
getScreenBoundsInset
Returns the screen bounds inset to usable area.- Overrides:
getScreenBoundsInset
in classViewEnv
-
activateApp
Activates the App giving focus to given node.- Overrides:
activateApp
in classViewEnv
-
get
Returns a shared instance. -
set
public static void set()Sets the Swing Node Env.
-