public class CGridArea extends AbstractDockableCStation<CSplitDockStation> implements SingleCDockable
CGridArea normalized CDockable can be shown. Clients
should use getComponent() to gain access to a JComponent that
represents this area.| Modifier and Type | Field and Description |
|---|---|
static Path |
TYPE_ID
The result of
getTypeId() |
listenerCollectionACTION_KEY_CLOSE, ACTION_KEY_EXTERNALIZE, ACTION_KEY_MAXIMIZE, ACTION_KEY_MINIMIZE, ACTION_KEY_MINIMIZE_HOLD, ACTION_KEY_NORMALIZE, ACTION_KEY_UNEXTERNALIZE, ACTION_KEY_UNMAXIMIZE_EXTERNALIZED| Modifier | Constructor and Description |
|---|---|
protected |
CGridArea()
Creates a new grid area but does not yet initialize its fields.
|
|
CGridArea(CControl control,
String uniqueId)
Creates a new area.
|
| Modifier and Type | Method and Description |
|---|---|
CDockable |
asDockable()
|
protected CommonDockable |
createCommonDockable()
Creates the
CommonDockable that is associated with this dockable, called the first
time the CommonDockable is required for an operation. |
CStationPerspective |
createPerspective()
Returns a new
CStationPerspective that represents this station. |
protected CSplitDockStationHandle |
createSplitDockStationHandle(CControl control)
|
void |
deploy(CGrid grid)
Exchanges all the
CDockables on this area with the
elements of grid. |
JComponent |
getComponent()
Gets the
JComponent which represents this station. |
protected CSplitDockStationHandle |
getModeManagerHandle()
|
CSplitDockStation |
getStation()
Gets the internal representation of this
CStation. |
CLocation |
getStationLocation()
Gets a location which represents directly
CStation.getStation(). |
Icon |
getTitleIcon()
Gets the icon that is shown in the title.
|
String |
getTitleText()
Gets the text that is shown as title.
|
Path |
getTypeId()
Gets a unique path denoting the type of this station.
|
String |
getUniqueId()
Gets a unique and constant identifier for this station
|
protected void |
init(CControl control,
String uniqueId)
Initializes the fields of this area.
|
protected void |
install(CControlAccess access)
Called when this station is added to a
CControl. |
boolean |
isCloseable()
Tells whether this
CDockable can be closed by the user. |
boolean |
isExternalizable()
Tells whether this
CDockable can be externalized by the user. |
boolean |
isMaximizable()
Tells whether this
CDockable can be maximized by the user. |
boolean |
isMaximizingArea()
Tells whether children of this area remain children when maximized or not.
|
boolean |
isMinimizable()
Tells whether this
CDockable can be minimized by the user. |
protected boolean |
isNormalizingArea()
Tells whether all children of this area are considered to be normalized.
|
boolean |
isStackable()
Tells whether this
CDockable can be combined with another
Dockable to create a stack. |
boolean |
isWorkingArea()
Tells whether this station is a special working area or not.
|
void |
setMaximizingArea(boolean maximize)
Sets whether this area is also used as maximizing area.
|
void |
setTitleIcon(Icon icon)
Sets the icon that is shown in the title of this
CDockable. |
void |
setTitleText(String text)
Sets the text that is shown as title.
|
protected boolean |
suppressTitle(DockTitleVersion version)
Checks whether the title created by
version should
be suppressed. |
protected void |
uninstall(CControlAccess access)
Called when this station is removed from a
CControl. |
asStation, getDropLocation, init, setControlAccess, toStringaddCDockableLocationListener, addCDockablePropertyListener, addCDockableStateListener, addDoubleClickListener, addFocusListener, addKeyboardListener, addVetoClosingListener, control, getAction, getAndClearResizeRequest, getAutoBaseLocation, getBaseLocation, getClose, getColors, getControl, getControlAccess, getDefaultLocation, getDockableUniqueId, getExtendedMode, getFocusComponent, getFonts, getGrouping, getMinimizedSize, getParentStation, getWorkingArea, hasParent, init, intern, isDockableVisible, isEnabled, isNormalizeable, isResizeLocked, isResizeLockedHorizontally, isResizeLockedVertically, isShowing, isSingleTabShown, isSticky, isStickySwitchable, isTitleShown, isVisible, propertyListeners, putAction, removeCDockableLocationListener, removeCDockablePropertyListener, removeCDockableStateListener, removeDoubleClickListener, removeFocusListener, removeKeyboardListener, removeVetoClosingListener, setDefaultLocation, setEnabled, setExtendedMode, setFocusComponent, setGrouping, setLocation, setLocationsAside, setLocationsAside, setLocationsAsideFocused, setMinimizedSize, setResizeLocked, setResizeLockedHorizontally, setResizeLockedVertically, setResizeRequest, setResizeRequest, setSingleTabShown, setSticky, setStickySwitchable, setTitleShown, setVisible, setWorkingArea, stateListeners, toFront, toFrontclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCDockableLocationListener, addCDockablePropertyListener, addCDockableStateListener, addDoubleClickListener, addFocusListener, addKeyboardListener, addVetoClosingListener, asStation, getAction, getAndClearResizeRequest, getAutoBaseLocation, getBaseLocation, getColors, getControl, getControlAccess, getExtendedMode, getFocusComponent, getFonts, getGrouping, getMinimizedSize, getParentStation, getWorkingArea, hasParent, intern, isDockableVisible, isEnabled, isNormalizeable, isResizeLockedHorizontally, isResizeLockedVertically, isShowing, isSingleTabShown, isSticky, isStickySwitchable, isTitleShown, isVisible, removeCDockableLocationListener, removeCDockablePropertyListener, removeCDockableStateListener, removeDoubleClickListener, removeFocusListener, removeKeyboardListener, removeVetoClosingListener, setControlAccess, setExtendedMode, setLocation, setLocationsAside, setLocationsAside, setLocationsAsideFocused, setMinimizedSize, setSticky, setStickySwitchable, setVisible, setWorkingAreapublic static final Path TYPE_ID
getTypeId()public CGridArea(CControl control, String uniqueId)
control - the owner of this stationuniqueId - a unique identifierprotected CGridArea()
init(CControl, String) to complete
initializationprotected void init(CControl control, String uniqueId)
control - the owner of this stationuniqueId - a unique identifierprotected CSplitDockStationHandle createSplitDockStationHandle(CControl control)
control - the control in whose realm this area is usednullprotected CommonDockable createCommonDockable()
AbstractCDockableCommonDockable that is associated with this dockable, called the first
time the CommonDockable is required for an operation.createCommonDockable in class AbstractDockableCStation<CSplitDockStation>public void deploy(CGrid grid)
CDockables on this area with the
elements of grid.grid - a grid containing some new Dockablespublic CSplitDockStation getStation()
CStationCStation.getStation in interface CStation<CSplitDockStation>getStation in class AbstractDockableCStation<CSplitDockStation>public CDockable asDockable()
CStationCDockable as well, then this method returns
the representation of this station as CDockable.asDockable in interface CStation<CSplitDockStation>asDockable in class AbstractDockableCStation<CSplitDockStation>nullpublic CStationPerspective createPerspective()
CStationCStationPerspective that represents this station. This method
does not need to set any content of the new perspective. Basically this method just needs to tell
the framework what type of CStationPerspective is needed, not what its content is.createPerspective in interface CStation<CSplitDockStation>CStation.getTypeId()public JComponent getComponent()
JComponent which represents this station.public CLocation getStationLocation()
CStationCStation.getStation().getStationLocation in interface CStation<CSplitDockStation>getStationLocation in class AbstractDockableCStation<CSplitDockStation>stationpublic Path getTypeId()
CStationMissingPerspectiveStrategy.createStation(String, Path) when loading a layout
as a CPerspective.getTypeId in interface CStation<CSplitDockStation>null will just be ignored.public void setTitleText(String text)
text - the titlepublic String getTitleText()
public void setTitleIcon(Icon icon)
CDockable.icon - the title-iconpublic Icon getTitleIcon()
nullpublic void setMaximizingArea(boolean maximize)
maximize - true if children should be maximized to this
area, false if not.public boolean isMaximizingArea()
true if children remain childrensetMaximizingArea(boolean)@FrameworkOnly protected boolean isNormalizingArea()
false, then the default CSplitDockStationHandle returned
by getModeManagerHandle() will fail, clients must provide a custom implementation of
CSplitDockStationHandle if they override this method.@FrameworkOnly protected CSplitDockStationHandle getModeManagerHandle()
this as areaprotected void install(CControlAccess access)
AbstractDockableCStationCControl.install in class AbstractDockableCStation<CSplitDockStation>access - access to the internals of the new ownerprotected void uninstall(CControlAccess access)
AbstractDockableCStationCControl.uninstall in class AbstractDockableCStation<CSplitDockStation>access - access to the internals of the old ownerpublic boolean isCloseable()
CDockableCDockable can be closed by the user. A close-button
has to be provided by the CDockable itself. The best way to do that is
to instantiate a CloseActionSource and include this source
in the array that is returned by CommonDockable.getSources().isCloseable in interface CDockabletrue if this element can be closedpublic String getUniqueId()
CStationgetUniqueId in interface CStation<CSplitDockStation>getUniqueId in interface SingleCDockablegetUniqueId in class AbstractDockableCStation<CSplitDockStation>public boolean isExternalizable()
CDockableCDockable can be externalized by the user.isExternalizable in interface CDockabletrue if this element can be externalizedpublic boolean isMaximizable()
CDockableCDockable can be maximized by the user.isMaximizable in interface CDockabletrue if this element can be maximizedpublic boolean isMinimizable()
CDockableCDockable can be minimized by the user.isMinimizable in interface CDockabletrue if this element can be minimizedpublic boolean isStackable()
CDockableCDockable can be combined with another
Dockable to create a stack.isStackable in interface CDockabletrue if this element can be combined with
another Dockable, normally true should be the answer.public boolean isWorkingArea()
CStationCControl.addStation(CStation, boolean))
or must be a SingleCDockable.isWorkingArea in interface CStation<CSplitDockStation>isWorkingArea in class AbstractDockableCStation<CSplitDockStation>true if this is a working area, false
otherwiseprotected boolean suppressTitle(DockTitleVersion version)
version should
be suppressed.version - the version of the titletrue if no DockTitle should be createdCopyright © 2018. All rights reserved.