Interface WindowData

  • All Known Implementing Classes:
    DialogTag, FrameTag, InternalFrameTag, WindowBaseTag

    public interface WindowData

    Definition of an interface for providing (platform-independent) information about a window to be created.

    This interface is used in communication with the WindowManager implementation. The methods it defines can be called to extract all information necessary for creating a new window object. Usually an implementation of this interface is created and initialized by tag handler classes of the window builder tag library.

    Version:
    $Id: WindowData.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int UNDEFINED
      Constant for an undefined coordinate or size information.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ComponentBuilderData getComponentBuilderData()
      Returns the current ComponentBuilderData object.
      Object getController()
      Returns the new window's controller.
      int getHeight()
      Returns the height of the new window.
      Object getIcon()
      Returns an icon for the new window.
      Object getMenuBar()
      Returns the menu bar for the new window.
      String getTitle()
      Returns the window's title.
      int getWidth()
      Returns the width of the new window.
      int getXPos()
      Returns the X position of the new window.
      int getYPos()
      Returns the Y position of the new window.
      boolean isAutoClose()
      Returns a flag whether auto-close is active for the new window.
      boolean isCenter()
      Returns a flag whether the new window should be centered on the screen.
      boolean isClosable()
      Returns a flag whether the new window should have a close icon.
      boolean isCloseOnEsc()
      Returns a flag whether the window should close itself if the user presses the ESCAPE key.
      boolean isIconifiable()
      Returns a flag whether the new window should be iconifiable.
      boolean isMaximizable()
      Returns a flag whether the new window should be maximizable.
      boolean isResizable()
      Returns a flag whether the new window should be resizable.
    • Field Detail

      • UNDEFINED

        static final int UNDEFINED
        Constant for an undefined coordinate or size information.
        See Also:
        Constant Field Values
    • Method Detail

      • getXPos

        int getXPos()
        Returns the X position of the new window.
        Returns:
        the window's X position or UNDEFINED if this is not defined
      • getYPos

        int getYPos()
        Returns the Y position of the new window.
        Returns:
        the window's Y position or UNDEFINED if this is not defined
      • getWidth

        int getWidth()
        Returns the width of the new window.
        Returns:
        the window's width or UNDEFINED if this is not defined
      • getHeight

        int getHeight()
        Returns the height of the new window.
        Returns:
        the window's height or UNDEFINED if this is not defined
      • isCenter

        boolean isCenter()
        Returns a flag whether the new window should be centered on the screen. If this flag is set, eventually set X and Y coordinates are ignored, and the window manager will itself determine appropriate coordinates.
        Returns:
        the center flag
      • getTitle

        String getTitle()
        Returns the window's title.
        Returns:
        the window's title
      • getIcon

        Object getIcon()
        Returns an icon for the new window.
        Returns:
        the window's icon (can be null)
      • isResizable

        boolean isResizable()
        Returns a flag whether the new window should be resizable.
        Returns:
        the resizable flag
      • isMaximizable

        boolean isMaximizable()
        Returns a flag whether the new window should be maximizable. Note that this flag might not be supported for all platforms and window types.
        Returns:
        the maximizable flag
      • isIconifiable

        boolean isIconifiable()
        Returns a flag whether the new window should be iconifiable. Note that this flag might not be supported for all platforms and window types.
        Returns:
        the iconifiable flag
      • isClosable

        boolean isClosable()
        Returns a flag whether the new window should have a close icon. If set to false, the user can not close the window directly. Note that this flag might not be supported for all platforms and window types.
        Returns:
        the closable flag
      • isAutoClose

        boolean isAutoClose()
        Returns a flag whether auto-close is active for the new window. If set to true, the window should automatically close itself when the user clicks the closing icon. Otherwise, the developer has to handle the close operation manually.
        Returns:
        the auto-close flag
      • isCloseOnEsc

        boolean isCloseOnEsc()
        Returns a flag whether the window should close itself if the user presses the ESCAPE key. This is especially useful for dialog windows. Note: Windows making use of this flag should also define a cancel button; this button is triggered as a reaction on the ESCAPE key.
        Returns:
        a flag whether the ESCAPE key should close the window
      • getMenuBar

        Object getMenuBar()
        Returns the menu bar for the new window. The object returned by this method must be compatible with the platform specific window manager implementation, i.e. must represent a valid menu bar for this platform. This should be the case if it was constructed by the action builder library.
        Returns:
        the window's menu bar (can be null if the window does not have a menu bar)
      • getController

        Object getController()
        Returns the new window's controller. This object is not really evaluated by the window manager, but should be passed to the platform specific implementation of the Window interface, so that the window's controller can be queried by application code.
        Returns:
        the window's controller object (can be null)
      • getComponentBuilderData

        ComponentBuilderData getComponentBuilderData()
        Returns the current ComponentBuilderData object. This object can be queried by a WindowManager implementation to obtain context information needed for the creation of a window.
        Returns:
        the current ComponentBuilderData object