|
||||||||||
| 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_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 |
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. |
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 |
getBaseLocation()
Gets the location of this CDockable. |
ColorMap |
getColors()
Gets a mutable map of colors. |
CControlAccess |
getControl()
Gets the control which is responsible for this dockable. |
ExtendedMode |
getExtendedMode()
Gets the size and location of this CDockable. |
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). |
CommonDockable |
intern()
Gets the intern representation of this CDockable. |
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 |
isMinimizable()
Tells whether this CDockable can be minimized by the user. |
boolean |
isMinimizedHold()
Tells whether this CDockable remains visible when minimized and
without focus. |
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 |
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 |
isTitleShown()
Tells whether this CDockable shows its title or not. |
boolean |
isVisible()
Tells whether this CDockable is currently visible or not. |
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 |
setControl(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)
Sets whether this CDockable should remain visible when minimized
and without focus. |
void |
setMinimizedSize(Dimension size)
Sets the size of this CDockable when this CDockable is minimized and
on a popup window. |
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.
| Method Detail |
|---|
void addCDockableStateListener(CDockableStateListener listener)
listener - the new listenervoid addCDockablePropertyListener(CDockablePropertyListener listener)
listener - the new listenervoid removeCDockableStateListener(CDockableStateListener listener)
listener - the listener to removevoid removeCDockablePropertyListener(CDockablePropertyListener listener)
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. 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.CControlAccess.isVisible(CDockable).
true if this CDockable can be accessed by the user
through a graphical user interface.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).
nullvoid 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 - the size and locationExtendedMode getExtendedMode()
CDockable. Implementations should
return LocationModeManager.getMode(Dockable).
null if this CDockable
is not part of an CControl.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.
void setMinimizedHold(boolean hold)
CDockable should remain visible when minimized
and without focus.
hold - whether to remain visibleboolean isMinimizedHold()
CDockable remains visible when minimized and
without focus.
true if this remains visible, 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 notCommonDockable intern()
CDockable.
void setControl(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
@Todo(priority=MINOR,
compatibility=BREAK_MINOR,
target=VERSION_1_1_0,
description="Return CControl instead of CControlAccess")
CControlAccess getControl()
CAction 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 | |||||||||