com.guiseframework.component
Interface Frame

All Superinterfaces:
Component, CompositeComponent, ContentComponent, DepictedObject, Displayable, InfoModel, InputFocusableComponent, InputFocusGroupComponent, LabelModel, ModalComponent<Frame.Mode>, Model, PresentationModel, com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable
All Known Subinterfaces:
ApplicationFrame, DialogFrame<V>, FlyoverFrame, ModalFrame<R>, OptionDialogFrame<O>
All Known Implementing Classes:
AbstractApplicationFrame, AbstractDialogFrame, AbstractFlyoverFrame, AbstractFrame, AbstractModalFrame, AbstractOptionDialogFrame, CalendarDialogFrame, DefaultApplicationFrame, DefaultDialogFrame, DefaultFlyoverFrame, DefaultFrame, DefaultModalFrame, HomePanel.TestFrame, MessageOptionDialogFrame, NotificationOptionDialogFrame

public interface Frame
extends ContentComponent, ModalComponent<Frame.Mode>, InputFocusGroupComponent

A root-level component such as a window or an HTML page. The frame's contents are specified using ContentComponent.setContent(Component).

The title is specified by the frame model's label.

A frame like other components is by default visible, but is not actually shown until its open(boolean) method is called.

A frame is a InputFocusGroupComponent, allowing descendant InputFocusableComponents to have the focus.

Author:
Garret Wilson

Nested Class Summary
static class Frame.Mode
          The mode of this component; whether the frame is in exclusive interaction with the user.
static class Frame.State
          The state of the frame.
 
Field Summary
static java.lang.String CLOSE_ACTION_CONTROL_PROPERTY
          The close action control bound property.
static java.lang.String MENU_PROPERTY
          The bound property of the frame menu.
static java.lang.String MODAL_PROPERTY
          The bound property of whether the frame is modal if and when it is open.
static java.lang.String MOVABLE_PROPERTY
          The bound property of whether the component is movable.
static java.lang.String OPEN_EFFECT_PROPERTY
          The open effect bound property.
static java.lang.String RELATED_COMPONENT_PROPERTY
          The bound property of the related component.
static java.lang.String RESIZABLE_PROPERTY
          The bound property of whether the frame can be resized.
static java.lang.String STATE_PROPERTY
          The bound state property.
static java.lang.String TITLE_BACKGROUND_COLOR_PROPERTY
          The bound property of the title background color.
static java.lang.String TITLE_VISIBLE_PROPERTY
          The bound property of whether the title bar is visible.
static java.lang.String TOOLBAR_PROPERTY
          The bound property of the frame toolbar.
 
Fields inherited from interface com.guiseframework.component.ContentComponent
CONTENT_PROPERTY
 
Fields inherited from interface com.guiseframework.component.ModalComponent
MODE_PROPERTY
 
Fields inherited from interface com.guiseframework.component.InputFocusGroupComponent
INPUT_FOCUS_STRATEGY_PROPERTY, INPUT_FOCUSED_COMPONENT_PROPERTY
 
Method Summary
 boolean canClose()
          Determines whether the frame should be allowed to close.
 void close()
          Closes the frame.
 ActionControl getCloseActionControl()
           
 ActionPrototype getCloseActionPrototype()
           
 Menu getMenu()
           
 Effect getOpenEffect()
           
 Component getRelatedComponent()
           
 Frame.State getState()
           
 Color getTitleBackgroundColor()
           
 Toolbar getToolbar()
           
 boolean isModal()
           
 boolean isMovable()
           
 boolean isResizable()
           
 boolean isTitleVisible()
           
 void open()
          Opens the frame with the currently set modality.
 void open(boolean modal)
          Opens the frame, specifying modality.
 void open(com.globalmentor.beans.GenericPropertyChangeListener<Frame.Mode> modeChangeListener)
          Opens the frame as modal and installs the given property change listener to listen for the mode changing.
 void setCloseActionControl(ActionControl newCloseActionControl)
          Sets the action control for closing the frame.
 void setMenu(Menu newMenu)
          Sets the frame menu.
 void setModal(boolean newModal)
          Sets whether the frame is modal if and when it is open.
 void setMovable(boolean newMovable)
          Sets whether the frame is movable.
 void setOpenEffect(Effect newOpenEffect)
          Sets the effect used for opening the frame.
 void setRelatedComponent(Component newRelatedComponent)
          Sets the related component This is a bound property.
 void setResizable(boolean newResizable)
          Sets whether the frame can be resized.
 void setTitleBackgroundColor(Color newTitleBackgroundColor)
          Sets the background color of the title.
 void setTitleVisible(boolean newTitleVisible)
          Sets whether the title bar is visible.
 void setToolbar(Toolbar newToolbar)
          Sets the frame toolbar.
 
Methods inherited from interface com.guiseframework.component.ContentComponent
getContent, setContent
 
Methods inherited from interface com.guiseframework.component.CompositeComponent
addCompositeComponentListener, getChildComponents, hasChildComponents, removeCompositeComponentListener
 
Methods inherited from interface com.guiseframework.component.ModalComponent
getMode, setMode
 
Methods inherited from interface com.guiseframework.component.InputFocusGroupComponent
getInputFocusedComponent, getInputFocusStrategy, setInputFocusedComponent, setInputFocusStrategy
 

Field Detail

CLOSE_ACTION_CONTROL_PROPERTY

static final java.lang.String CLOSE_ACTION_CONTROL_PROPERTY
The close action control bound property.


MENU_PROPERTY

static final java.lang.String MENU_PROPERTY
The bound property of the frame menu.


MODAL_PROPERTY

static final java.lang.String MODAL_PROPERTY
The bound property of whether the frame is modal if and when it is open.


MOVABLE_PROPERTY

static final java.lang.String MOVABLE_PROPERTY
The bound property of whether the component is movable.


OPEN_EFFECT_PROPERTY

static final java.lang.String OPEN_EFFECT_PROPERTY
The open effect bound property.


RELATED_COMPONENT_PROPERTY

static final java.lang.String RELATED_COMPONENT_PROPERTY
The bound property of the related component.


RESIZABLE_PROPERTY

static final java.lang.String RESIZABLE_PROPERTY
The bound property of whether the frame can be resized.


STATE_PROPERTY

static final java.lang.String STATE_PROPERTY
The bound state property.


TITLE_BACKGROUND_COLOR_PROPERTY

static final java.lang.String TITLE_BACKGROUND_COLOR_PROPERTY
The bound property of the title background color.


TITLE_VISIBLE_PROPERTY

static final java.lang.String TITLE_VISIBLE_PROPERTY
The bound property of whether the title bar is visible.


TOOLBAR_PROPERTY

static final java.lang.String TOOLBAR_PROPERTY
The bound property of the frame toolbar.

Method Detail

getState

Frame.State getState()
Returns:
The state of the frame.

getMenu

Menu getMenu()
Returns:
The frame menu, or null if this frame does not have a menu.

setMenu

void setMenu(Menu newMenu)
Sets the frame menu. This is a bound property.

Parameters:
newMenu - The frame menu, or null if this frame does not have a menu.
See Also:
MENU_PROPERTY

isModal

boolean isModal()
Returns:
Whether the frame is modal if and when it is open.

setModal

void setModal(boolean newModal)
Sets whether the frame is modal if and when it is open. This is a bound property of type Boolean.

Parameters:
newModal - true if the frame should be modal, else false.
See Also:
MODAL_PROPERTY

isMovable

boolean isMovable()
Returns:
Whether the frame is movable.

setMovable

void setMovable(boolean newMovable)
Sets whether the frame is movable. This is a bound property of type Boolean.

Parameters:
newMovable - true if the frame should be movable, else false.
See Also:
MOVABLE_PROPERTY

isResizable

boolean isResizable()
Returns:
Whether the frame can be resized.

setResizable

void setResizable(boolean newResizable)
Sets whether the frame can be resized. This is a bound property of type Boolean.

Parameters:
newResizable - true if the frame can be resized, else false.
See Also:
RESIZABLE_PROPERTY

getRelatedComponent

Component getRelatedComponent()
Returns:
The related component such as a popup source, or null if the frame is not related to another component.

setRelatedComponent

void setRelatedComponent(Component newRelatedComponent)
Sets the related component This is a bound property.

Parameters:
newRelatedComponent - The new related component, or null if the frame is not related to another component.
See Also:
RELATED_COMPONENT_PROPERTY

getTitleBackgroundColor

Color getTitleBackgroundColor()
Returns:
The background color of the title, or null if no background color is specified for the title.

setTitleBackgroundColor

void setTitleBackgroundColor(Color newTitleBackgroundColor)
Sets the background color of the title. This is a bound property.

Parameters:
newTitleBackgroundColor - The background color of the title, or null if the default background color should be used.
See Also:
TITLE_BACKGROUND_COLOR_PROPERTY

isTitleVisible

boolean isTitleVisible()
Returns:
Whether the title bar is visible.

setTitleVisible

void setTitleVisible(boolean newTitleVisible)
Sets whether the title bar is visible. This is a bound property of type Boolean.

Parameters:
newTitleVisible - true if the title bar should be visible, else false.
See Also:
TITLE_VISIBLE_PROPERTY

getToolbar

Toolbar getToolbar()
Returns:
The frame toolbar, or null if this frame does not have a toolbar.

setToolbar

void setToolbar(Toolbar newToolbar)
Sets the frame toolbar. This is a bound property.

Parameters:
newToolbar - The frame toolbar, or null if this frame does not have a toolbar.
See Also:
TOOLBAR_PROPERTY

getOpenEffect

Effect getOpenEffect()
Returns:
The effect used for opening the frame, or null if there is no open effect.

setOpenEffect

void setOpenEffect(Effect newOpenEffect)
Sets the effect used for opening the frame. This is a bound property.

Parameters:
newEffect - The new effect used for opening the frame, or null if there should be no open effect.
See Also:
OPEN_EFFECT_PROPERTY

getCloseActionPrototype

ActionPrototype getCloseActionPrototype()
Returns:
The action prototype for closing the frame.

getCloseActionControl

ActionControl getCloseActionControl()
Returns:
The action control for closing the frame, or null if this frame does not have a close action control.

setCloseActionControl

void setCloseActionControl(ActionControl newCloseActionControl)
Sets the action control for closing the frame. This is a bound property.

Parameters:
newCloseActionControl - The action control for closing the frame, or null if this frame does not have a close action control.
See Also:
CLOSE_ACTION_CONTROL_PROPERTY

open

void open()
Opens the frame with the currently set modality. Opening the frame registers the frame with the application frame. If the frame is already open, no action occurs.

See Also:
getState(), STATE_PROPERTY

open

void open(com.globalmentor.beans.GenericPropertyChangeListener<Frame.Mode> modeChangeListener)
Opens the frame as modal and installs the given property change listener to listen for the mode changing. This is a convenience method that adds the ModalComponent.MODE_PROPERTY change listener using PropertyBindable.addPropertyChangeListener(String, PropertyChangeListener) and then calls open(boolean) with a value of true.

Parameters:
modeChangeListener - The mode property change listener to add.
See Also:
ModalComponent.MODE_PROPERTY

open

void open(boolean modal)
Opens the frame, specifying modality. Opening the frame registers the frame with the session. If the frame is already open, no action occurs.

Parameters:
modal - true if the frame should be opened as a modal frame, else false.
See Also:
getState(), STATE_PROPERTY

canClose

boolean canClose()
Determines whether the frame should be allowed to close. This method is called from close().

Returns:
true if the frame should be allowed to close.

close

void close()
Closes the frame. Closing the frame unregisters the frame with the session. If the frame is already closed, no action occurs.

See Also:
getState(), STATE_PROPERTY


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.