|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@FrameworkOnly public interface CDockable
A basic element representing some Component and a wrapper
around a Dockable.
Note: This interface is not intended to be implemented by clients.
Clients should either extend the class AbstractCDockable or use
one of DefaultSingleCDockable or DefaultMultipleCDockable.
| Field Summary | |
|---|---|
static String |
ACTION_KEY_CLOSE
Key for an action of getAction(String). |
static String |
ACTION_KEY_EXTERNALIZE
Key for an action of getAction(String). |
static String |
ACTION_KEY_MAXIMIZE
Key for an action of getAction(String). |
static String |
ACTION_KEY_MINIMIZE
Key for an action of getAction(String). |
static String |
ACTION_KEY_MINIMIZE_HOLD
Key for an action of getAction(String). |
static String |
ACTION_KEY_NORMALIZE
Key for an action of getAction(String). |
static String |
ACTION_KEY_UNEXTERNALIZE
Key for an action of getAction(String). |
static String |
ACTION_KEY_UNMAXIMIZE_EXTERNALIZED
Key for an action of getAction(String). |
| Method Summary | |
|---|---|
void |
addCDockableLocationListener(CDockableLocationListener listener)
Adds a listener to this dockable which gets informed if the location or the visibility changes. |
void |
addCDockablePropertyListener(CDockablePropertyListener listener)
Adds a property listener to this dockable, the listener will be informed of changes of this dockable. |
void |
addCDockableStateListener(CDockableStateListener listener)
Adds a state listener to this dockable, the listener will be informed of changes of this dockable. |
void |
addDoubleClickListener(CDoubleClickListener listener)
Adds a new listener to this dockable. |
void |
addFocusListener(CFocusListener listener)
Adds a focus listener to this dockable. |
void |
addKeyboardListener(CKeyboardListener listener)
Adds a keyboard listener to this dockable. |
void |
addVetoClosingListener(CVetoClosingListener listener)
Adds a veto-listener to this dockable, the listener will be informed before this dockable gets closed and can issue a veto. |
CStation<?> |
asStation()
Gets this or an object representing this as
CStation. |
CAction |
getAction(String key)
Gets an action which is not added to the title by this CDockable
put by another module. |
RequestDimension |
getAndClearResizeRequest()
Gets the preferred size of this CDockable. |
CLocation |
getAutoBaseLocation(boolean noBackwardsTransformation)
Tries to find out at which location this CDockable may appear if it would be made visible. |
CLocation |
getBaseLocation()
Gets the location of this CDockable. |
ColorMap |
getColors()
Gets a mutable map of colors. |
CControl |
getControl()
Gets the control which is responsible for this dockable. |
CControlAccess |
getControlAccess()
Gets the control which is responsible for this dockable. |
ExtendedMode |
getExtendedMode()
Gets the size and location of this CDockable. |
Component |
getFocusComponent()
Gets the Component which should receive the focus once this CDockable is focused. |
FontMap |
getFonts()
Gets a mutable map of fonts. |
Dimension |
getMinimizedSize()
Gets the size which is used when this CDockable is minimzed and
on a popup window. |
CStation<?> |
getWorkingArea()
Gets the parent of this CDockable, this should be the same as
set by the last call of setWorkingArea(CStation). |
boolean |
hasParent()
Tells whether this CDockable has a root station as parent. |
CommonDockable |
intern()
Gets the intern representation of this CDockable. |
boolean |
isCloseable()
Tells whether this CDockable can be closed by the user. |
boolean |
isDockableVisible()
Deprecated. this method gets replaced by isShowing(), which offers the exact same information. This method
will be removed in a future release |
boolean |
isEnabled(EnableableItem item)
Tells whether a part of this dockable is enabled. |
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 |
isMinimizable()
Tells whether this CDockable can be minimized by the user. |
boolean |
isMinimizedHold()
Deprecated. use isSticky() instead |
boolean |
isMinimizedHoldSwitchable()
Deprecated. use isStickySwitchable() instead |
boolean |
isResizeLockedHorizontally()
Tells whether the width of this CDockable should remain the same when
its parent changes the size. |
boolean |
isResizeLockedVertically()
Tells whether the height of this CDockable should remain the same when
its parent changes the size. |
boolean |
isShowing()
Tells whether this CDockable is currently visible to the user. |
boolean |
isSingleTabShown()
Tells whether a single tab should be shown for this CDockable. |
boolean |
isStackable()
Tells whether this CDockable can be combined with another
Dockable to create a stack. |
boolean |
isSticky()
Tells whether this CDockable remains visible when minimized and
without focus. |
boolean |
isStickySwitchable()
Tells whether the isSticky() property can be changed by the user
by clicking a button that is displayed on the FlapDockStation. |
boolean |
isTitleShown()
Tells whether this CDockable shows its title or not. |
boolean |
isVisible()
Tells whether this CDockable is currently visible or not. |
void |
removeCDockableLocationListener(CDockableLocationListener listener)
Removes listener from this dockable |
void |
removeCDockablePropertyListener(CDockablePropertyListener listener)
Removes a property listener from this dockable. |
void |
removeCDockableStateListener(CDockableStateListener listener)
Removes a state listener from this dockable. |
void |
removeDoubleClickListener(CDoubleClickListener listener)
Removes a listener from this dockable. |
void |
removeFocusListener(CFocusListener listener)
Removes a focus listener from this dockable. |
void |
removeKeyboardListener(CKeyboardListener listener)
Removes a listener from this dockable. |
void |
removeVetoClosingListener(CVetoClosingListener listener)
Removes listener from this CDockable. |
void |
setControlAccess(CControlAccess control)
Sets the CControl which is responsible for this CDockable. |
void |
setExtendedMode(ExtendedMode extendedMode)
Sets how and where this CDockable should be shown. |
void |
setLocation(CLocation location)
Sets the location of this CDockable. |
void |
setMinimizedHold(boolean hold)
Deprecated. use setSticky(boolean) instead |
void |
setMinimizedHoldSwitchable(boolean switchable)
Deprecated. use setStickySwitchable(boolean) instead |
void |
setMinimizedSize(Dimension size)
Sets the size of this CDockable when this CDockable is minimized and
on a popup window. |
void |
setSticky(boolean sticky)
Sets whether this CDockable should remain visible when minimized
and without focus. |
void |
setStickySwitchable(boolean switchable)
Sets whether the user can switch the isSticky() property by clicking
on a button that is presented by the FlapDockStation. |
void |
setVisible(boolean visible)
Shows or hides this CDockable. |
void |
setWorkingArea(CStation<?> area)
Sets the parent of this CDockable. |
| Field Detail |
|---|
static final String ACTION_KEY_MINIMIZE
getAction(String). The action behind this
key should call setExtendedMode(ExtendedMode)
with an argument of ExtendedMode.MINIMIZED.
static final String ACTION_KEY_MAXIMIZE
getAction(String). The action behind this
key should call setExtendedMode(ExtendedMode)
with an argument of ExtendedMode.MAXIMIZED.
static final String ACTION_KEY_NORMALIZE
getAction(String). The action behind this
key should call setExtendedMode(ExtendedMode)
with an argument of ExtendedMode.NORMALIZED.
static final String ACTION_KEY_EXTERNALIZE
getAction(String). The action behind this
key should call setExtendedMode(ExtendedMode)
with an argument of ExtendedMode.EXTERNALIZED.
static final String ACTION_KEY_UNEXTERNALIZE
getAction(String). The action behind this
key should call setExtendedMode(ExtendedMode) with
an argument of ExtendedMode.NORMALIZED.
static final String ACTION_KEY_UNMAXIMIZE_EXTERNALIZED
getAction(String). The action behind this
key should call setExtendedMode(ExtendedMode) with
an argument of ExtendedMode.EXTERNALIZED.
static final String ACTION_KEY_CLOSE
getAction(String). The action behind this
key should call setVisible(boolean) with the argument
false.
static final String ACTION_KEY_MINIMIZE_HOLD
getAction(String). The action behind
this key should toggle setMinimizedHold(boolean).
| Method Detail |
|---|
void addCDockableStateListener(CDockableStateListener listener)
listener - the new listenervoid addCDockablePropertyListener(CDockablePropertyListener listener)
listener - the new listenervoid addCDockableLocationListener(CDockableLocationListener listener)
listener - the new listenervoid removeCDockableStateListener(CDockableStateListener listener)
listener - the listener to removevoid removeCDockablePropertyListener(CDockablePropertyListener listener)
listener - the listener to removevoid removeCDockableLocationListener(CDockableLocationListener listener)
listener from this dockable
listener - the listener to removevoid addFocusListener(CFocusListener listener)
listener - the new listenervoid removeFocusListener(CFocusListener listener)
listener - the listener to removevoid addKeyboardListener(CKeyboardListener listener)
listener - the new listenervoid removeKeyboardListener(CKeyboardListener listener)
listener - the listener to removevoid addDoubleClickListener(CDoubleClickListener listener)
listener - the new listenervoid removeDoubleClickListener(CDoubleClickListener listener)
listener - the listener to removevoid addVetoClosingListener(CVetoClosingListener listener)
CVetoClosingEvent which contains only this CDockable (even if
other dockables are closed at the same time).CVetoClosingListeners added to the CControl are invoked before listeners that
are added to a CDockable.
listener - the new listenerCControl.addVetoClosingListener(CVetoClosingListener)void removeVetoClosingListener(CVetoClosingListener listener)
listener from this CDockable.
listener - the listener to removeboolean isMinimizable()
CDockable can be minimized by the user.
true if this element can be minimizedboolean isMaximizable()
CDockable can be maximized by the user.
true if this element can be maximizedboolean isExternalizable()
CDockable can be externalized by the user.
true if this element can be externalizedboolean isStackable()
CDockable can be combined with another
Dockable to create a stack.
true if this element can be combined with
another Dockable, normally true should be the answer.boolean isCloseable()
CDockable 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().
true if this element can be closedboolean isResizeLockedVertically()
CDockable should remain the same when
its parent changes the size. This has only effect if the parent can
choose the size of its children. A lock is no guarantee for staying
with the same size, the user still can resize this CDockable.
true if the height of this CDockable should remain
the same during resize events of the parent.boolean isResizeLockedHorizontally()
CDockable should remain the same when
its parent changes the size. This has only effect if the parent can
choose the size of its children. A lock is no guarantee for staying
with the same size, the user still can resize this CDockable.
true if the width of this CDockable should remain
the same during resize events of the parent.RequestDimension getAndClearResizeRequest()
CDockable. The preferred size
will be used to resize this CDockable when
CControl.handleResizeRequests() is called. There are no guarantees
that the request can be granted, or will be handled at all.null is
returned.
nullvoid setVisible(boolean visible)
CDockable. If this CDockable is not visible and
is made visible, then the framework tries to set its location at the last known position.CControlAccess.show(CDockable) or CControlAccess.hide(CDockable).
visible - the new visibility state
IllegalStateException - if this dockable can't be made visibleisVisible()boolean isVisible()
CDockable is currently visible or not. Visibility
means that this CDockable is in the tree structure of DockingFrames and has a parent. Being
in the structure does not imply being visible on the screen: If some
JFrame is not shown, or some DockStation not
properly added to a parent component, then a visible CDockable can
be invisible for the user. For CDockables that are also root-CStation this method will
always return true.isShowing().CControlAccess.isVisible(CDockable).
true if this CDockable can be accessed by the user
through a graphical user interface.hasParent(),
isShowing()boolean hasParent()
CDockable has a root station as parent. Having a root station as parent
implies isVisible(). For root-CStation this method will return false if they
do not have a parent, they are not considered to be parents of themselves.CControlAccess.hasParent(CDockable).
true if this dockable has a parent and is in the tree
@Deprecated
@Todo(compatibility=BREAK_MAJOR,
priority=ENHANCEMENT,
target=VERSION_1_1_3,
description="remove this method")
boolean isDockableVisible()
isShowing(), which offers the exact same information. This method
will be removed in a future release
CDockable is currently visible to the user. A CDockable
which is not visible, is not dockable visible either. The method
does not take into account that a frame may be positioned such that it is not entierly visible on the
screen. Neither does the method take into account, that a frame may be minimized.
true if the user should be able to see this itemboolean isShowing()
CDockable is currently visible to the user. A CDockable
which is not visible, is not dockable visible either. The method
does not take into account that a frame may be positioned such that it is not entierly visible on the
screen. The method may or may not take into account, that a frame may be minimized.CDockableLocationListener to this dockable.
true if the user should be able to see this itemCDockableLocationListener,
addCDockableLocationListener(CDockableLocationListener)void setLocation(CLocation location)
CDockable. If this CDockable is visible, than
this method will take immediately effect. Otherwise the location will be
stored in a cache and read as soon as this CDockable is made visible.CControlAccess.getLocationManager() and
CLocationModeManager.setLocation(bibliothek.gui.Dockable, CLocation).
location - the new location, null is possible, but
will not move the CDockable immediatelygetBaseLocation()CLocation getBaseLocation()
CDockable. If this CDockable is visible, then
a location will always be returned. Otherwise a location will only
be returned if it just was set using setLocation(CLocation).
nullCLocation getAutoBaseLocation(boolean noBackwardsTransformation)
CDockable may appear if it would be made visible. The default
implementation of this method has severe limitations:
nullCDockable is associated with a placeholder, then the
placeholder information will be completely lost.CDockable must not be visible and it must be registered at a CControl.null)CDockable will appear at the exact location that
is returned by this method ignoring any other settings.
noBackwardsTransformation - if true, then this method should not convert any DockableProperty
back to a CLocation, instead it should return null if such a conversion would be necessary. This
way the method does return null in any case where information (e.g. placeholders) could be lost
due to the limitations of CLocation
CDockable, this may either be the location that was set
by calling setLocation(CLocation), the last location of this dockable when it was visible, the
default location of the CControl or the default location for the
normalized extended mode. A value of null is returned if this
CDockable would appear at a random location, is not registered at a CControl or is already visible.void setExtendedMode(ExtendedMode extendedMode)
CDockable should be shown. Conflicts with
isExternalizable(), isMaximizable() and isMinimizable()
will just be ignored. Implementations should call LocationModeManager.setMode(Dockable, ExtendedMode).extendedMode.
extendedMode - the size and locationExtendedMode getExtendedMode()
CDockable. Implementations should
return LocationModeManager.getMode(Dockable).
null if this CDockable
is not part of an CControl. May be null if this dockable is not visible.void setWorkingArea(CStation<?> area)
CDockable. This method can be called by the client
or indirectly through setLocation(CLocation).
area - the new parent or nullCStation<?> getWorkingArea()
CDockable, this should be the same as
set by the last call of setWorkingArea(CStation).
nullvoid setMinimizedSize(Dimension size)
CDockable when this CDockable is minimized and
on a popup window.
size - the sizeDimension getMinimizedSize()
CDockable is minimzed and
on a popup window. If a value below 0 is set, then the default size
is used.
@Deprecated
@Todo(compatibility=BREAK_MINOR,
priority=ENHANCEMENT,
target=VERSION_1_1_2,
description="remove this method")
void setMinimizedHold(boolean hold)
setSticky(boolean) instead
CDockable should remain visible when minimized
and without focus.
hold - whether to remain visiblevoid setSticky(boolean sticky)
CDockable should remain visible when minimized
and without focus.
sticky - whether to remain visible
@Deprecated
@Todo(compatibility=BREAK_MINOR,
priority=ENHANCEMENT,
target=VERSION_1_1_2,
description="remove this method")
boolean isMinimizedHold()
isSticky() instead
CDockable remains visible when minimized and
without focus.
true if this remains visible, false
otherwiseboolean isSticky()
CDockable remains visible when minimized and
without focus.
true if this remains visible, false
otherwise
@Deprecated
@Todo(compatibility=BREAK_MINOR,
priority=ENHANCEMENT,
target=VERSION_1_1_2,
description="remove this method")
void setMinimizedHoldSwitchable(boolean switchable)
setStickySwitchable(boolean) instead
isMinimizedHold() property by clicking
on a button that is presented by the FlapDockStation.
switchable - whether the user is able to switch the hold propertyvoid setStickySwitchable(boolean switchable)
isSticky() property by clicking
on a button that is presented by the FlapDockStation.
switchable - whether the user is able to switch the hold property
@Deprecated
@Todo(compatibility=BREAK_MINOR,
priority=ENHANCEMENT,
target=VERSION_1_1_2,
description="remove this method")
boolean isMinimizedHoldSwitchable()
isStickySwitchable() instead
isMinimizedHold() property can be changed by the user
by clicking a button that is displayed on the FlapDockStation.
true if the user is able to switch the property, false
otherwiseboolean isStickySwitchable()
isSticky() property can be changed by the user
by clicking a button that is displayed on the FlapDockStation.
true if the user is able to switch the property, false
otherwiseboolean isTitleShown()
CDockable shows its title or not. Note that some
DockThemes might override this setting.
true if the title is shown, false
otherwise.boolean isSingleTabShown()
CDockable. Some
DockThemes might ignore this setting.
true if a single tab should be shown,
false if notboolean isEnabled(EnableableItem item)
item - the part to check
item is enabled, the default result should be trueComponent getFocusComponent()
Component which should receive the focus once this CDockable is focused.
nullCommonDockable intern()
CDockable.
CStation<?> asStation()
this or an object representing this as
CStation.
null@FrameworkOnly void setControlAccess(CControlAccess control)
CControl which is responsible for this CDockable. Subclasses
must call CControlAccess.link(CDockable, CDockableAccess) to grant
the CControl access to the internal properties of this
CDockable. link can also be used to revoke access.
control - the new control or null@FrameworkOnly CControlAccess getControlAccess()
CControl getControl()
CDockable is registered at a CControl.
nullCAction getAction(String key)
CDockable
put by another module.
key - the name of the action
nullColorMap getColors()
FontMap getFonts()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||