|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.common.intern.AbstractCDockable
public abstract class AbstractCDockable
An abstract implementation of CDockable
. Contains methods to
work with listeners and with CAction
s.
Field Summary | |
---|---|
protected CListenerCollection |
listenerCollection
the listeners that were added to this dockable |
Fields inherited from interface bibliothek.gui.dock.common.intern.CDockable |
---|
ACTION_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 |
Constructor Summary | |
---|---|
protected |
AbstractCDockable()
Creates a new dockable |
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. |
protected CControlAccess |
control()
Gets access to the controller. |
protected abstract CommonDockable |
createCommonDockable()
Creates the CommonDockable that is associated with this dockable, called the first
time the CommonDockable is required for an operation. |
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 . |
protected CloseActionSource |
getClose()
Gets the action source which might show a single action that closes this dockable. |
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. |
CLocation |
getDefaultLocation(ExtendedMode mode)
Gets an earlier set value of setDefaultLocation(ExtendedMode, CLocation) . |
protected String |
getDockableUniqueId()
Gets the unique identifier that has been assigned to this CDockable by the CControl . |
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. |
DockableGrouping |
getGrouping()
Gets an algorithm that tells how this CDockable attempts to group itself automatically with other Dockable s. |
Dimension |
getMinimizedSize()
Gets the size which is used when this CDockable is minimzed and
on a popup window. |
CStation<?> |
getParentStation()
Searches the first CStation that is a parent of this CDockable . |
CStation<?> |
getWorkingArea()
Gets the parent of this CDockable , this should be the same as
set by the last call of CDockable.setWorkingArea(CStation) . |
boolean |
hasParent()
Tells whether this CDockable has a root station as parent. |
protected void |
init(CommonDockable dockable)
Initializes this CDockable. |
CommonDockable |
intern()
Gets the intern representation of this dockable. |
boolean |
isDockableVisible()
Deprecated. |
boolean |
isEnabled(EnableableItem item)
Tells whether a part of this dockable is enabled. |
boolean |
isNormalizeable()
Always true , clients should not override this method unless they know exactly what they are doing. |
boolean |
isResizeLocked()
Tells whether width and height are locked. |
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 |
isSticky()
Tells whether this CDockable remains visible when minimized and
without focus. |
boolean |
isStickySwitchable()
Tells whether the CDockable.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. |
protected CDockablePropertyListener[] |
propertyListeners()
Deprecated. subclasses should use CListenerCollection.getCDockablePropertyListener()
of listenerCollection if they want to fire an event |
void |
putAction(String key,
CAction action)
Exchanges an action of this CDockable . |
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 |
setDefaultLocation(ExtendedMode mode,
CLocation location)
Sets the default location for mode mode for this dockable. |
void |
setEnabled(EnableableItem item,
boolean enabled)
Enables or disables a part of this dockable. |
void |
setExtendedMode(ExtendedMode extendedMode)
Sets how and where this CDockable should be shown. |
void |
setFocusComponent(Component component)
Sets the Component which should receive the focus when this CDockable is focused. |
void |
setGrouping(DockableGrouping grouping)
Sets an algorithm that defines how this dockable attempts to automatically group itself with other dockables. |
void |
setLocation(CLocation location)
Sets the location of this CDockable . |
void |
setLocationsAside(CDockable dockable)
Sets the location of this CDockable aside dockable in all ExtendedMode s. |
boolean |
setLocationsAside(Filter<CDockable> filter)
Traverses the history of focused CDockable s, and selects the newest item with focus and matching
filter for calling CDockable.setLocationsAside(CDockable) . |
boolean |
setLocationsAsideFocused()
Searches for the last focused CDockable with the same working area as
this , and calls CDockable.setLocationsAside(CDockable) with it.Note that if this dockable is visible, then it may or may not change its location. |
void |
setMinimizedSize(Dimension size)
Sets the size of this CDockable when this CDockable is minimized and
on a popup window. |
void |
setResizeLocked(boolean resizeLocked)
Sets whether this dockable likes to remain with the same size all the time. |
void |
setResizeLockedHorizontally(boolean resizeLockedHorizontally)
Sets whether this dockable likes to remain with the same width all the time. |
void |
setResizeLockedVertically(boolean resizeLockedVertically)
Sets whether this dockable likes to remain with the same height all the time. |
void |
setResizeRequest(Dimension size,
boolean process)
Tells this CDockable which size it should have. |
void |
setResizeRequest(RequestDimension size,
boolean process)
Tells this CDockable which size it should have. |
void |
setSingleTabShown(boolean singleTabShown)
Tells this CDockable whether to show a single tab or not. |
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 CDockable.isSticky() property by clicking
on a button that is presented by the FlapDockStation . |
void |
setTitleShown(boolean shown)
Tells this CDockable whether to show or to hide its titles. |
void |
setVisible(boolean visible)
Shows or hides this CDockable . |
void |
setWorkingArea(CStation<?> area)
Sets the parent of this CDockable . |
protected CDockableStateListener[] |
stateListeners()
Deprecated. subclasses should use CListenerCollection.getCDockableStateListener()
of listenerCollection if they want to fire an event |
void |
toFront()
Tries to focus this dockable. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface bibliothek.gui.dock.common.intern.CDockable |
---|
asStation, isCloseable, isExternalizable, isMaximizable, isMinimizable, isStackable |
Field Detail |
---|
protected CListenerCollection listenerCollection
Constructor Detail |
---|
protected AbstractCDockable()
Method Detail |
---|
public String toString()
toString
in class Object
protected abstract CommonDockable createCommonDockable()
CommonDockable
that is associated with this dockable, called the first
time the CommonDockable
is required for an operation.
protected void init(CommonDockable dockable)
dockable
- the representation of this CDockable
, not null
protected CloseActionSource getClose()
protected CControlAccess control()
null
public void addCDockableStateListener(CDockableStateListener listener)
CDockable
addCDockableStateListener
in interface CDockable
listener
- the new listenerpublic void addCDockablePropertyListener(CDockablePropertyListener listener)
CDockable
addCDockablePropertyListener
in interface CDockable
listener
- the new listenerpublic void addCDockableLocationListener(CDockableLocationListener listener)
CDockable
addCDockableLocationListener
in interface CDockable
listener
- the new listenerpublic void removeCDockableStateListener(CDockableStateListener listener)
CDockable
removeCDockableStateListener
in interface CDockable
listener
- the listener to removepublic void removeCDockablePropertyListener(CDockablePropertyListener listener)
CDockable
removeCDockablePropertyListener
in interface CDockable
listener
- the listener to removepublic void removeCDockableLocationListener(CDockableLocationListener listener)
CDockable
listener
from this dockable
removeCDockableLocationListener
in interface CDockable
listener
- the listener to removepublic void addFocusListener(CFocusListener listener)
CDockable
addFocusListener
in interface CDockable
listener
- the new listenerpublic void removeFocusListener(CFocusListener listener)
CDockable
removeFocusListener
in interface CDockable
listener
- the listener to removepublic void addKeyboardListener(CKeyboardListener listener)
CDockable
addKeyboardListener
in interface CDockable
listener
- the new listenerpublic void removeKeyboardListener(CKeyboardListener listener)
CDockable
removeKeyboardListener
in interface CDockable
listener
- the listener to removepublic void addDoubleClickListener(CDoubleClickListener listener)
CDockable
addDoubleClickListener
in interface CDockable
listener
- the new listenerpublic void removeDoubleClickListener(CDoubleClickListener listener)
CDockable
removeDoubleClickListener
in interface CDockable
listener
- the listener to removepublic void addVetoClosingListener(CVetoClosingListener listener)
CDockable
CVetoClosingEvent
which contains only this CDockable
(even if
other dockables are closed at the same time).CVetoClosingListener
s added to the CControl
are invoked before listeners that
are added to a CDockable
.
addVetoClosingListener
in interface CDockable
listener
- the new listenerCControl.addVetoClosingListener(CVetoClosingListener)
public void removeVetoClosingListener(CVetoClosingListener listener)
CDockable
listener
from this CDockable
.
removeVetoClosingListener
in interface CDockable
listener
- the listener to remove@Deprecated protected CDockableStateListener[] stateListeners()
CListenerCollection.getCDockableStateListener()
of listenerCollection
if they want to fire an event
@Deprecated protected CDockablePropertyListener[] propertyListeners()
CListenerCollection.getCDockablePropertyListener()
of listenerCollection
if they want to fire an event
public void setVisible(boolean visible)
CDockable
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)
.
setVisible
in interface CDockable
visible
- the new visibility stateCDockable.isVisible()
public boolean isVisible()
CDockable
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 CDockable
s that are also root-CStation
this method will
always return true
.CDockable.isShowing()
.CControlAccess.isVisible(CDockable)
.
isVisible
in interface CDockable
true
if this CDockable
can be accessed by the user
through a graphical user interface.CDockable.hasParent()
,
CDockable.isShowing()
public boolean hasParent()
CDockable
CDockable
has a root station as parent. Having a root station as parent
implies CDockable.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)
.
hasParent
in interface 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") public boolean isDockableVisible()
CDockable
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.
isDockableVisible
in interface CDockable
true
if the user should be able to see this itempublic boolean isShowing()
CDockable
CDockable
is currently visible to the user. A CDockable
which is not visible
, is not showing
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.
isShowing
in interface CDockable
true
if the user should be able to see this itemCDockableLocationListener
,
CDockable.addCDockableLocationListener(CDockableLocationListener)
public void toFront()
CGrid.select
to select a dockable in a stack while building a layout).
public void setLocation(CLocation location)
CDockable
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)
.
setLocation
in interface CDockable
location
- the new location, null
is possible, but
will not move the CDockable
immediatelyCDockable.getBaseLocation()
public void setLocationsAside(CDockable dockable)
CDockable
CDockable
aside dockable
in all ExtendedMode
s. If this
Dockable
is visible, then it may or may not change its location and ExtendedMode
. Note that dockable
and this
must not be the same object, and that both CDockable
s must be registered
at a CControl
.
setLocationsAside
in interface CDockable
dockable
- the item whose locations should be copiedpublic boolean setLocationsAside(Filter<CDockable> filter)
CDockable
CDockable
s, and selects the newest item with focus and matching
filter
for calling CDockable.setLocationsAside(CDockable)
.
setLocationsAside
in interface CDockable
filter
- to select a CDockable
which did have the focus
true
if an old focused Dockable
was found, false
if notpublic boolean setLocationsAsideFocused()
CDockable
CDockable
with the same working area
as
this
, and calls CDockable.setLocationsAside(CDockable)
with it.dockable
is visible, then it may or may not change its location. This method
should be called before making the dockable
visible.
setLocationsAsideFocused
in interface CDockable
true
if the last focused CDockable
was found, false
otherwise. If
false
then no action was performedpublic CLocation getBaseLocation()
CDockable
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 CDockable.setLocation(CLocation)
.
getBaseLocation
in interface CDockable
null
public CLocation getAutoBaseLocation(boolean noBackwardsTransformation)
CDockable
CDockable
may appear if it would be made visible. The default
implementation of this method has severe limitations:
null
CDockable
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.
getAutoBaseLocation
in interface CDockable
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 CDockable.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.public void setExtendedMode(ExtendedMode extendedMode)
CDockable
CDockable
should be shown. Conflicts with
CDockable.isExternalizable()
, CDockable.isMaximizable()
and CDockable.isMinimizable()
will just be ignored. Implementations should call LocationModeManager.setMode(Dockable, ExtendedMode)
.extendedMode
.
setExtendedMode
in interface CDockable
extendedMode
- the size and locationpublic ExtendedMode getExtendedMode()
CDockable
CDockable
. Implementations should
return LocationModeManager.getMode(Dockable)
.
getExtendedMode
in interface CDockable
null
if this CDockable
is not part of an CControl
. May be null
if this dockable is not visible.public void setGrouping(DockableGrouping grouping)
grouping
- the grouping behavior, can be null
in which case this dockable
does not attempt to group itself. The default value of this property is null
.public DockableGrouping getGrouping()
CDockable
CDockable
attempts to group itself automatically with other Dockable
s.
The algorithm is able to rewrite the location of this CDockable
everytime when it is moved to a new location, assuming
that no stronger mechanism, or the user, already defined a location.
getGrouping
in interface CDockable
null
public void setWorkingArea(CStation<?> area)
CDockable
CDockable
. This method can be called by the client
or indirectly through CDockable.setLocation(CLocation)
.
setWorkingArea
in interface CDockable
area
- the new parent or null
public CStation<?> getWorkingArea()
CDockable
CDockable
, this should be the same as
set by the last call of CDockable.setWorkingArea(CStation)
.
getWorkingArea
in interface CDockable
null
public boolean isResizeLocked()
true
if width and height are lockedpublic boolean isResizeLockedVertically()
CDockable
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
.
isResizeLockedVertically
in interface CDockable
true
if the height of this CDockable
should remain
the same during resize events of the parent.public boolean isResizeLockedHorizontally()
CDockable
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
.
isResizeLockedHorizontally
in interface CDockable
true
if the width of this CDockable
should remain
the same during resize events of the parent.public void setResizeRequest(Dimension size, boolean process)
CDockable
which size it should have. The size will
be stored until it is read by getAndClearResizeRequest()
.process
is true
, then this method will call
CControl.handleResizeRequests()
in order to try to apply the requested size.
However, there are no guarantees that the requested size can be matched, or that
the request gets handled at all.CDockable
is not registered at a
CControl
, then the request will remain unprocessed until this CDockable
is registered, and someone calls CControl.handleResizeRequests()
on the new owner.
size
- the new preferred size, can be null
to cancel an
earlier requestprocess
- whether to process all pending requests of all CDockable
registered at the CControl
which is the owner of this
.
Clients can set this parameter to false
and call
CControl.handleResizeRequests()
manually to process all pending
requests.setResizeRequest(RequestDimension, boolean)
public void setResizeRequest(RequestDimension size, boolean process)
CDockable
which size it should have. The size will
be stored until it is read by getAndClearResizeRequest()
.process
is true
, then this method will call
CControl.handleResizeRequests()
in order to try to apply the requested size.
However, there are no guarantees that the requested size can be matched, or that the
request gets handled at all.CDockable
is not registered at
a CControl
, then the request will remain unprocessed until this CDockable
is registered, and someone calls CControl.handleResizeRequests()
on the new owner.
size
- the new preferred size, can be null
to cancel an
earlier requestprocess
- whether to process all pending requests of all CDockable
registered at the CControl
which is the owner of this
.
Clients can set this parameter to false
and call
CControl.handleResizeRequests()
manually to process all pending
requests.public RequestDimension getAndClearResizeRequest()
CDockable
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.
getAndClearResizeRequest
in interface CDockable
null
public void setResizeLocked(boolean resizeLocked)
resizeLocked
- true
if the size of this dockable should
be kept as long as possiblesetResizeLockedHorizontally(boolean)
,
setResizeLockedVertically(boolean)
public void setResizeLockedHorizontally(boolean resizeLockedHorizontally)
resizeLockedHorizontally
- true
if the width of
this dockable should be kept as long as possiblepublic void setResizeLockedVertically(boolean resizeLockedVertically)
resizeLockedVertically
- true
if the height
of this dockable should be kept as long as possiblepublic void setEnabled(EnableableItem item, boolean enabled)
DisablingStrategy
.
item
- what part of this CDockable
should be enabled or disabledenabled
- whether the part should be enabledpublic boolean isEnabled(EnableableItem item)
CDockable
isEnabled
in interface CDockable
item
- the part to check
item
is enabled, the default result should be true
public void setSticky(boolean sticky)
CDockable
CDockable
should remain visible when minimized
and without focus.
setSticky
in interface CDockable
sticky
- whether to remain visiblepublic boolean isSticky()
CDockable
CDockable
remains visible when minimized and
without focus.
isSticky
in interface CDockable
true
if this remains visible, false
otherwisepublic void setStickySwitchable(boolean switchable)
CDockable
CDockable.isSticky()
property by clicking
on a button that is presented by the FlapDockStation
.
setStickySwitchable
in interface CDockable
switchable
- whether the user is able to switch the hold propertypublic boolean isStickySwitchable()
CDockable
CDockable.isSticky()
property can be changed by the user
by clicking a button that is displayed on the FlapDockStation
.
isStickySwitchable
in interface CDockable
true
if the user is able to switch the property, false
otherwisepublic void setMinimizedSize(Dimension size)
CDockable
CDockable
when this CDockable
is minimized and
on a popup window.
setMinimizedSize
in interface CDockable
size
- the sizepublic boolean isNormalizeable()
true
, clients should not override this method unless they know exactly what they are doing.
isNormalizeable
in interface CDockable
true
, unless a subclass requires very special behavior.public Dimension getMinimizedSize()
CDockable
CDockable
is minimzed and
on a popup window. If a value below 0 is set, then the default size
is used.
getMinimizedSize
in interface CDockable
public void setTitleShown(boolean shown)
CDockable
whether to show or to hide its titles.
shown
- true
if titles should be shown, false
if they should be hidden.public boolean isTitleShown()
CDockable
CDockable
shows its title or not. Note that some
DockTheme
s might override this setting.
isTitleShown
in interface CDockable
true
if the title is shown, false
otherwise.public void setSingleTabShown(boolean singleTabShown)
CDockable
whether to show a single tab or not.
singleTabShown
- true
if a single tab should be shown,
false
otherwiseisSingleTabShown()
public boolean isSingleTabShown()
CDockable
CDockable
. Some
DockTheme
s might ignore this setting.
isSingleTabShown
in interface CDockable
true
if a single tab should be shown,
false
if notpublic CommonDockable intern()
intern
in interface CDockable
public void setDefaultLocation(ExtendedMode mode, CLocation location)
mode
for this dockable. Note
that this location does not override any existing setting. This method can
be called either before or after making this dockable visible. It is
the client's responsibility to ensure that location
is valid
together with mode
.
mode
- the mode for which to store the default locationlocation
- the default location or null
public CLocation getDefaultLocation(ExtendedMode mode)
setDefaultLocation(ExtendedMode, CLocation)
.
mode
- the mode for which to search the default location
null
@FrameworkOnly protected String getDockableUniqueId()
CDockable
by the CControl
. Every
dockable has a unique identifier, but it may not be the same identifier as set by this client.
CControl
public CControlAccess getControlAccess()
CDockable
getControlAccess
in interface CDockable
public void setControlAccess(CControlAccess control)
CDockable
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.
setControlAccess
in interface CDockable
control
- the new control or null
public void putAction(String key, CAction action)
CDockable
. The actions that are associated
with this CDockable
through this method are not necessarily shown on the
title. They are used by other modules to create effects that are known
only to them.
key
- the key of the action, one of the ACTION_KEY_xzy
-constants
defined in CDockable
action
- the new action, can be null
which might force
back a default action (that depends on the module that uses key
)public CAction getAction(String key)
CDockable
CDockable
put by another module.
getAction
in interface CDockable
key
- the name of the action
null
public ColorMap getColors()
CDockable
getColors
in interface CDockable
public FontMap getFonts()
CDockable
getFonts
in interface CDockable
public Component getFocusComponent()
CDockable
Component
which should receive the focus once this CDockable
is focused.
getFocusComponent
in interface CDockable
null
public void setFocusComponent(Component component)
Component
which should receive the focus when this CDockable
is focused. Please note
that the focus will be transfered to this component every time the dockable lost the focus and gained the focus again. The
default behavior of re-focusing the last focus owner should be sufficient for most applications.
component
- the component to focus, can be null
, should be a child of this CDockable
public CStation<?> getParentStation()
CDockable
CStation
that is a parent of this CDockable
.
getParentStation
in interface CDockable
null
public CControl getControl()
CDockable
CDockable
is registered at a CControl
.
getControl
in interface CDockable
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |