Class SwingOwner

    • Constructor Detail

      • SwingOwner

        public SwingOwner()
    • Method Detail

      • getUI

        public javax.swing.JComponent getUI()
        Returns the main UI node.
        Overrides:
        getUI in class UIOwner<SwingEvent,​javax.swing.JComponent>
      • createUI

        protected javax.swing.JComponent createUI()
        Creates the UI panel.
        Specified by:
        createUI in class UIOwner<SwingEvent,​javax.swing.JComponent>
      • createUI

        protected javax.swing.JComponent createUI​(java.lang.Class aClass)
        Creates the UI panel.
      • getNode

        public javax.swing.JComponent getNode​(java.lang.String aName)
        Override to include Window MenuBar.
        Overrides:
        getNode in class UIOwner<SwingEvent,​javax.swing.JComponent>
      • getNode

        public <T extends javax.swing.JComponent> T getNode​(java.lang.String aName,
                                                            java.lang.Class<T> aClass)
        Returns the specific UI child node with the given name as the given class.
        Overrides:
        getNode in class UIOwner<SwingEvent,​javax.swing.JComponent>
      • requestFocus

        public void requestFocus​(java.lang.Object anObj)
        Focuses given component.
        Specified by:
        requestFocus in class UIOwner<SwingEvent,​javax.swing.JComponent>
      • requestFocusImpl

        protected void requestFocusImpl​(java.lang.Object anObj)
        Actual request focus implementation.
      • addKeyActionEvent

        public void addKeyActionEvent​(java.lang.String aName,
                                      java.lang.String aKey)
        Configures an ActionEvent to be sent to owner for given name and key description (in KeyStroke string format).
        Specified by:
        addKeyActionEvent in class UIOwner<SwingEvent,​javax.swing.JComponent>
        See Also:
        KeyStroke
      • getWindow

        public SwingWindow getWindow()
        Returns the SwingWindow to manage this SwingOwner's window.
      • createWindow

        protected SwingWindow createWindow()
        Creates a window for this panel from window class.
      • isWindowVisible

        public boolean isWindowVisible()
        Returns whether window is visible.
      • setWindowVisible

        public void setWindowVisible​(boolean aValue)
        Sets whether window is visible.
      • getTimer

        public SwingTimer getTimer​(java.lang.String aName)
        Returns a timer for given name.
      • getTimer

        public SwingTimer getTimer​(java.lang.String aName,
                                   int aPeriod)
        Returns a timer for given name and interval (in milliseconds).
      • createTimer

        protected SwingTimer createTimer()
        Override to return SwingTimer.
      • runLater

        public void runLater​(java.lang.Runnable aRunnable)
        Runs the given runnable in the next event.
        Specified by:
        runLater in class UIOwner<SwingEvent,​javax.swing.JComponent>
      • isEventThread

        protected boolean isEventThread()
        Returns whether current thread is event thread.
        Specified by:
        isEventThread in class UIOwner<SwingEvent,​javax.swing.JComponent>
      • sendEvent

        public void sendEvent​(java.lang.Object anObj)
        Sends an event for a component.
        Specified by:
        sendEvent in class UIOwner<SwingEvent,​javax.swing.JComponent>