Package io.guise.framework.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
,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 usingContentComponent.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 descendantInputFocusableComponent
s to have the focus.- Author:
- Garret Wilson
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description 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.-
Nested classes/interfaces inherited from interface io.guise.framework.component.Component
Component.FlyoverStrategy<S extends Component>
-
-
Field Summary
Fields Modifier and Type Field Description 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 io.guise.framework.component.Component
BOOKMARK_ENABLED_PROPERTY, CONSTRAINTS_PROPERTY, DRAG_ENABLED_PROPERTY, DROP_ENABLED_PROPERTY, FLYOVER_ENABLED_PROPERTY, FLYOVER_STRATEGY_PROPERTY, INPUT_STRATEGY_PROPERTY, NAME_PROPERTY, NOTIFICATION_PROPERTY, ORIENTATION_PROPERTY, THEME_APPLIED_PROPERTY, VALID_PROPERTY
-
Fields inherited from interface io.guise.framework.component.ContentComponent
CONTENT_PROPERTY
-
Fields inherited from interface io.guise.framework.model.Displayable
DISPLAYED_PROPERTY
-
Fields inherited from interface io.guise.framework.model.InfoModel
DESCRIPTION_CONTENT_TYPE_PROPERTY, DESCRIPTION_PROPERTY, INFO_CONTENT_TYPE_PROPERTY, INFO_PROPERTY
-
Fields inherited from interface io.guise.framework.component.InputFocusGroupComponent
INPUT_FOCUS_STRATEGY_PROPERTY, INPUT_FOCUSED_COMPONENT_PROPERTY
-
Fields inherited from interface io.guise.framework.model.LabelModel
GLYPH_URI_PROPERTY, LABEL_CONTENT_TYPE_PROPERTY, LABEL_PROPERTY
-
Fields inherited from interface io.guise.framework.component.ModalComponent
MODE_PROPERTY
-
Fields inherited from interface io.guise.framework.model.ui.PresentationModel
BACKGROUND_COLOR_PROPERTY, BORDER_LINE_FAR_COLOR_PROPERTY, BORDER_LINE_FAR_EXTENT_PROPERTY, BORDER_LINE_FAR_STYLE_PROPERTY, BORDER_LINE_NEAR_COLOR_PROPERTY, BORDER_LINE_NEAR_EXTENT_PROPERTY, BORDER_LINE_NEAR_STYLE_PROPERTY, BORDER_PAGE_FAR_COLOR_PROPERTY, BORDER_PAGE_FAR_EXTENT_PROPERTY, BORDER_PAGE_FAR_STYLE_PROPERTY, BORDER_PAGE_NEAR_COLOR_PROPERTY, BORDER_PAGE_NEAR_EXTENT_PROPERTY, BORDER_PAGE_NEAR_STYLE_PROPERTY, CORNER_LINE_FAR_PAGE_FAR_ARC_SIZE_PROPERTY, CORNER_LINE_FAR_PAGE_NEAR_ARC_SIZE_PROPERTY, CORNER_LINE_NEAR_PAGE_FAR_ARC_SIZE_PROPERTY, CORNER_LINE_NEAR_PAGE_NEAR_ARC_SIZE_PROPERTY, CURSOR_PROPERTY, FONT_FAMILIES_PROPERTY, FONT_SIZE_PROPERTY, FONT_STYLE_PROPERTY, FONT_WEIGHT_BOLD, FONT_WEIGHT_NORMAL, FONT_WEIGHT_PROPERTY, LABEL_FONT_FAMILIES_PROPERTY, LABEL_FONT_SIZE_PROPERTY, LABEL_FONT_STYLE_PROPERTY, LABEL_FONT_WEIGHT_PROPERTY, LABEL_TEXT_COLOR_PROPERTY, LINE_EXTENT_PROPERTY, MARGIN_LINE_FAR_EXTENT_PROPERTY, MARGIN_LINE_NEAR_EXTENT_PROPERTY, MARGIN_PAGE_FAR_EXTENT_PROPERTY, MARGIN_PAGE_NEAR_EXTENT_PROPERTY, OPACITY_PROPERTY, PADDING_LINE_FAR_EXTENT_PROPERTY, PADDING_LINE_NEAR_EXTENT_PROPERTY, PADDING_PAGE_FAR_EXTENT_PROPERTY, PADDING_PAGE_NEAR_EXTENT_PROPERTY, PAGE_EXTENT_PROPERTY, ROUNDED_CORNER_ARC_SIZE, STYLE_ID_PROPERTY, TEXT_COLOR_PROPERTY, TOOLTIP_ENABLED_PROPERTY, VISIBLE_PROPERTY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 io.guise.framework.component.Component
addCommandListener, addExportStrategy, addImportStrategy, addKeyListener, addMouseListener, addNotificationListener, addPreferenceProperty, applyTheme, applyTheme, dispatchInputEvent, exportTransfer, fireInputEvent, getAncestor, getComponentOrientation, getConstraints, getDepictor, getFlyoverStrategy, getInputStrategy, getName, getNotification, getOrientation, getParent, getPreferenceProperties, getTheme, hasCommandListeners, hasKeyListeners, hasMouseListeners, importTransfer, initialize, isDragEnabled, isDropEnabled, isFlyoverEnabled, isPreferenceProperty, isThemeApplied, isValid, loadPreferences, notify, removeCommandListener, removeExportStrategy, removeImportStrategy, removeKeyListener, removeMouseListener, removeNotificationListener, removePreferenceProperty, resetTheme, savePreferences, setConstraints, setDragEnabled, setDropEnabled, setFlyoverEnabled, setFlyoverStrategy, setInputStrategy, setName, setNotification, setOrientation, setParent, setThemeApplied, updateTheme, validate
-
Methods inherited from interface io.guise.framework.component.CompositeComponent
addCompositeComponentListener, getChildComponents, hasChildComponents, removeCompositeComponentListener
-
Methods inherited from interface io.guise.framework.component.ContentComponent
getContent, setContent
-
Methods inherited from interface io.guise.framework.platform.DepictedObject
depict, getDepictID, getSession, processEvent
-
Methods inherited from interface io.guise.framework.model.InfoModel
getDescription, getDescriptionContentType, getInfo, getInfoContentType, setDescription, setDescriptionContentType, setInfo, setInfoContentType
-
Methods inherited from interface io.guise.framework.component.InputFocusGroupComponent
getInputFocusedComponent, getInputFocusStrategy, setInputFocusedComponent, setInputFocusStrategy
-
Methods inherited from interface io.guise.framework.model.LabelModel
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType
-
Methods inherited from interface io.guise.framework.component.ModalComponent
getMode, setMode
-
Methods inherited from interface io.guise.framework.model.ui.PresentationModel
BorderLineFarColor, BorderLineFarExtent, BorderLineFarStyle, BorderLineNearColor, BorderLineNearExtent, BorderLineNearStyle, BorderPageFarColor, BorderPageFarExtent, BorderPageFarStyle, BorderPageNearColor, BorderPageNearExtent, BorderPageNearStyle, getBackgroundColor, getBorderColor, getBorderExtent, getBorderStyle, getCornerArcSize, getCornerLineFarPageFarArcSize, getCornerLineFarPageNearArcSize, getCornerLineNearPageFarArcSize, getCornerLineNearPageNearArcSize, getCursor, getExtent, getFontFamilies, getFontSize, getFontStyle, getFontWeight, getLabelFontFamilies, getLabelFontSize, getLabelFontStyle, getLabelFontWeight, getLabelTextColor, getLineExtent, getMarginExtent, getMarginLineFarExtent, getMarginLineNearExtent, getMarginPageFarExtent, getMarginPageNearExtent, getOpacity, getPaddingExtent, getPaddingLineFarExtent, getPaddingLineNearExtent, getPaddingPageFarExtent, getPaddingPageNearExtent, getPageExtent, getSession, getStyleID, getTextColor, isDisplayed, isTooltipEnabled, isVisible, setBackgroundColor, setBorderColor, setBorderColor, setBorderExtent, setBorderExtent, setBorderLineFarColor, setBorderLineFarExtent, setBorderLineFarStyle, setBorderLineNearColor, setBorderLineNearExtent, setBorderLineNearStyle, setBorderPageFarColor, setBorderPageFarExtent, setBorderPageFarStyle, setBorderPageNearColor, setBorderPageNearExtent, setBorderPageNearStyle, setBorderStyle, setBorderStyle, setCornerArcSize, setCornerArcSize, setCornerLineFarPageFarArcSize, setCornerLineFarPageNearArcSize, setCornerLineNearPageFarArcSize, setCornerLineNearPageNearArcSize, setCursor, setDisplayed, setExtent, setFontFamilies, setFontSize, setFontStyle, setFontWeight, setLabelFontFamilies, setLabelFontSize, setLabelFontStyle, setLabelFontWeight, setLabelTextColor, setLineExtent, setMarginExtent, setMarginExtent, setMarginLineFarExtent, setMarginLineNearExtent, setMarginPageFarExtent, setMarginPageNearExtent, setOpacity, setPaddingExtent, setPaddingExtent, setPaddingLineFarExtent, setPaddingLineNearExtent, setPaddingPageFarExtent, setPaddingPageNearExtent, setPageExtent, setStyleID, setTextColor, setTooltipEnabled, setVisible
-
-
-
-
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, ornull
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 typeBoolean
.- Parameters:
newModal
-true
if the frame should be modal, elsefalse
.- 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 typeBoolean
.- Parameters:
newMovable
-true
if the frame should be movable, elsefalse
.- 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 typeBoolean
.- Parameters:
newResizable
-true
if the frame can be resized, elsefalse
.- 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, ornull
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, ornull
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 typeBoolean
.- Parameters:
newTitleVisible
-true
if the title bar should be visible, elsefalse
.- 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, ornull
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:
newOpenEffect
- The new effect used for opening the frame, ornull
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, ornull
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 theModalComponent.MODE_PROPERTY
change listener usingPropertyBindable.addPropertyChangeListener(String, PropertyChangeListener)
and then callsopen(boolean)
with a value oftrue
.- 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, elsefalse
.- See Also:
getState()
,STATE_PROPERTY
-
canClose
boolean canClose()
Determines whether the frame should be allowed to close. This method is called fromclose()
.- 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
-
-