Class TrackedWindowProxy

    • Constructor Summary

      Constructors 
      Constructor Description
      TrackedWindowProxy​(java.lang.String windowTitle)
      Creates a new proxy for a tracked window.
      TrackedWindowProxy​(java.lang.String windowTitle, javax.swing.Icon windowIcon)
      Creates a new proxy for a tracked window.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.Object createWindow()
      This method is called to create the dialog or window being tracked.
      void dispose()
      Disposes of the underlying window or frame if it has been created.
      javax.swing.Icon getIcon()  
      java.lang.String getTitle()
      Returns the window title.
      boolean isVisible()
      Returns whether the window is visible if it has been created, otherwise returns false.
      boolean requestFocusInWindow()
      Requests that the window be given focus, if it is focusable.
      void setVisible​(boolean visible)
      Makes the tracked window visible or invisible.
      void toFront()
      Moves the tracked window to the front; only called after the window is made visible.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TrackedWindowProxy

        public TrackedWindowProxy​(java.lang.String windowTitle)
        Creates a new proxy for a tracked window.
        Parameters:
        windowTitle - the non-null window title
      • TrackedWindowProxy

        public TrackedWindowProxy​(java.lang.String windowTitle,
                                  javax.swing.Icon windowIcon)
        Creates a new proxy for a tracked window.
        Parameters:
        windowTitle - the non-null window title
        windowIcon - the icon to use for the menu item (may be null)
    • Method Detail

      • createWindow

        public abstract java.lang.Object createWindow()
        This method is called to create the dialog or window being tracked. It must return either a JWindow, a JFrame, or a modeless JDialog.
        Returns:
        the window that this is acting as a proxy for
      • getTitle

        public java.lang.String getTitle()
        Description copied from interface: TrackedWindow
        Returns the window title.
        Specified by:
        getTitle in interface TrackedWindow
        Returns:
        the title of the window, as shown in the menu
      • setVisible

        public void setVisible​(boolean visible)
        Description copied from interface: TrackedWindow
        Makes the tracked window visible or invisible.
        Specified by:
        setVisible in interface TrackedWindow
        Parameters:
        visible - whether the window should be made visible
      • toFront

        public void toFront()
        Description copied from interface: TrackedWindow
        Moves the tracked window to the front; only called after the window is made visible.
        Specified by:
        toFront in interface TrackedWindow
      • requestFocusInWindow

        public boolean requestFocusInWindow()
        Description copied from interface: TrackedWindow
        Requests that the window be given focus, if it is focusable.
        Specified by:
        requestFocusInWindow in interface TrackedWindow
        Returns:
        false if the request will certainly fail
      • getIcon

        public javax.swing.Icon getIcon()
        Specified by:
        getIcon in interface IconProvider
      • dispose

        public void dispose()
        Disposes of the underlying window or frame if it has been created.
      • isVisible

        public boolean isVisible()
        Returns whether the window is visible if it has been created, otherwise returns false.
        Returns:
        true if the window is visible