Interface WindowData
-
- All Known Implementing Classes:
DialogTag,FrameTag,InternalFrameTag,WindowBaseTag
public interface WindowDataDefinition of an interface for providing (platform-independent) information about a window to be created.
This interface is used in communication with the
WindowManagerimplementation. 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 intUNDEFINEDConstant for an undefined coordinate or size information.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ComponentBuilderDatagetComponentBuilderData()Returns the currentComponentBuilderDataobject.ObjectgetController()Returns the new window's controller.intgetHeight()Returns the height of the new window.ObjectgetIcon()Returns an icon for the new window.ObjectgetMenuBar()Returns the menu bar for the new window.StringgetTitle()Returns the window's title.intgetWidth()Returns the width of the new window.intgetXPos()Returns the X position of the new window.intgetYPos()Returns the Y position of the new window.booleanisAutoClose()Returns a flag whether auto-close is active for the new window.booleanisCenter()Returns a flag whether the new window should be centered on the screen.booleanisClosable()Returns a flag whether the new window should have a close icon.booleanisCloseOnEsc()Returns a flag whether the window should close itself if the user presses theESCAPEkey.booleanisIconifiable()Returns a flag whether the new window should be iconifiable.booleanisMaximizable()Returns a flag whether the new window should be maximizable.booleanisResizable()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
UNDEFINEDif this is not defined
-
getYPos
int getYPos()
Returns the Y position of the new window.- Returns:
- the window's Y position or
UNDEFINEDif this is not defined
-
getWidth
int getWidth()
Returns the width of the new window.- Returns:
- the window's width or
UNDEFINEDif this is not defined
-
getHeight
int getHeight()
Returns the height of the new window.- Returns:
- the window's height or
UNDEFINEDif 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 theESCAPEkey. 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 theESCAPEkey.- Returns:
- a flag whether the
ESCAPEkey 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 theWindowinterface, 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 currentComponentBuilderDataobject. This object can be queried by aWindowManagerimplementation to obtain context information needed for the creation of a window.- Returns:
- the current
ComponentBuilderDataobject
-
-