Class AppWindow

  • All Implemented Interfaces:
    AbstractWindow

    public class AppWindow
    extends java.lang.Object
    implements AbstractWindow
    Common functionality for all application windows. This class provides means for storing and recalling window bounds in preferences. All subclass windows will get a copy of the main menubar as well.
    • Field Detail

      • classPrefs

        protected java.util.prefs.Preferences classPrefs
      • jif

        protected final javax.swing.JInternalFrame jif
      • ownMenuBar

        protected final boolean ownMenuBar
      • borrowMenuBar

        protected final boolean borrowMenuBar
      • bar

        protected javax.swing.JMenuBar bar
      • active

        protected boolean active
      • initialized

        protected boolean initialized
      • tempFloating

        protected final boolean tempFloating
      • tempFloatingTimer

        protected javax.swing.Timer tempFloatingTimer
    • Constructor Detail

      • AppWindow

        public AppWindow​(int flags)
      • AppWindow

        protected AppWindow​(java.awt.Dialog wrap)
    • Method Detail

      • stringToDimension

        protected static java.awt.Dimension stringToDimension​(java.lang.String value)
      • stringToPoint

        protected static java.awt.Point stringToPoint​(java.lang.String value)
      • pointToString

        protected static java.lang.String pointToString​(java.awt.Point value)
      • dimensionToString

        public static java.lang.String dimensionToString​(java.awt.Dimension value)
      • lookAndFeelUpdate

        public static void lookAndFeelUpdate()
        Updates Swing component tree for all frames after a look-and-feel change
      • alwaysPackSize

        protected boolean alwaysPackSize()
        Queries whether this frame's bounds should be packed automatically to the preferred size independent of concurrent preference settings
        Returns:
        true, if the frame wishes to be packed each time a custom setSize() would be applied in the course of a preference recall. The default value of true can be modified by subclasses by overriding this method.
        See Also:
        Window.pack()
      • restoreVisibility

        protected boolean restoreVisibility()
      • autoUpdatePrefs

        protected boolean autoUpdatePrefs()
      • getPreferredLocation

        protected java.awt.geom.Point2D getPreferredLocation()
      • init

        public void init()
        Subclasses should call this after having constructed their GUI. Then this method will attach a copy of the main menu from root.menuFactory and restore bounds from preferences.
        Specified by:
        init in interface AbstractWindow
      • getClassPrefs

        protected java.util.prefs.Preferences getClassPrefs()
      • addDynamicListening

        protected void addDynamicListening​(DynamicListening l)
      • dispose

        public void dispose()
        Frees resources, clears references
        Specified by:
        dispose in interface AbstractWindow
      • setSize

        public void setSize​(java.awt.Dimension d)
        Specified by:
        setSize in interface AbstractWindow
      • setBounds

        public void setBounds​(java.awt.Rectangle r)
        Specified by:
        setBounds in interface AbstractWindow
      • setPreferredSize

        public void setPreferredSize​(java.awt.Dimension d)
      • setTitle

        public void setTitle​(java.lang.String title)
        Specified by:
        setTitle in interface AbstractWindow
      • getInputMap

        public javax.swing.InputMap getInputMap​(int condition)
        Specified by:
        getInputMap in interface AbstractWindow