Class Swing
java.lang.Object
com.inductiveautomation.snap.swing.Swing
This class helps to load and manage panels of UI components in the form of a UI file, which is a simple
 XML description of UI controls.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanRuns runnable later in Swing if thread not swing.static IconcreateIcon(String aName, Class aClass) Creates the named icon - tries to load from given owner class resource directory or current directory.static ImagecreateImage(String aName, Class aClass) Creates the named image - tries to load from given owner class resource directory or current directory.static JComponentThis method loads a UI file from a byte source.static SwingHelperLegacy.static JComponentHprgetHelper(JComponent aComponent) Legacy.static IconReturns the named icon - tries to load from given owner class resource directory or current directory.static ImageReturns the named image - tries to load from given owner class resource directory or current directory.static InputStreamgetInputStream(String aName, Class aClass) Returns an input stream for the given name - tries to load from given owner class resource dir or current dir.static voidinit()Initializes Snap Swing functionality (installs an event queue and configures helper map).static booleanReturns whether the alt key is down for the current input event.static booleanReturns whether the meta key is down for the current input event.static booleanReturns whether mouse is pressed in mouse drag loop.static booleanRuns runnable later in Swing if thread not swing.static voidsendEvent(EventObject anEvent) Sends Event for the given EventObject.static voidsendEvent(EventObject anEvent, JComponent aComp) Sends Event for the given EventObject and component.
- 
Constructor Details- 
Swingpublic Swing()
 
- 
- 
Method Details- 
initpublic static void init()Initializes Snap Swing functionality (installs an event queue and configures helper map). This is called automatically when Ribs class is first touched.
- 
createUIThis method loads a UI file from a byte source.
- 
getImageReturns the named image - tries to load from given owner class resource directory or current directory.
- 
createImageCreates the named image - tries to load from given owner class resource directory or current directory.
- 
getIconReturns the named icon - tries to load from given owner class resource directory or current directory.
- 
createIconCreates the named icon - tries to load from given owner class resource directory or current directory.
- 
getInputStreamReturns an input stream for the given name - tries to load from given owner class resource dir or current dir.
- 
isAltDownpublic static boolean isAltDown()Returns whether the alt key is down for the current input event.
- 
isMetaDownpublic static boolean isMetaDown()Returns whether the meta key is down for the current input event.
- 
isMouseDownpublic static boolean isMouseDown()Returns whether mouse is pressed in mouse drag loop.
- 
sendEventSends Event for the given EventObject.
- 
sendEventSends Event for the given EventObject and component.
- 
getHelperLegacy.
- 
getHelperLegacy.
- 
runSwingRuns runnable later in Swing if thread not swing.
- 
callSwingRuns runnable later in Swing if thread not swing.
 
-