|
||||||||||
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 java.lang.String |
ACTION_KEY_CLOSE
Key for an action of getAction(String) . |
static java.lang.String |
ACTION_KEY_EXTERNALIZE
Key for an action of getAction(String) . |
static java.lang.String |
ACTION_KEY_MAXIMIZE
Key for an action of getAction(String) . |
static java.lang.String |
ACTION_KEY_MINIMIZE
Key for an action of getAction(String) . |
static java.lang.String |
ACTION_KEY_NORMALIZE
Key for an action of getAction(String) . |
static java.lang.String |
ACTION_KEY_UNEXTERNALIZE
Key for an action of getAction(String) . |
static java.lang.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(java.lang.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 . |
java.awt.Component |
getFocusComponent()
Gets the Component which should receive the focus once this CDockable is focused. |
FontMap |
getFonts()
Gets a mutable map of fonts. |
java.awt.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()
Tells whether this CDockable is currently visible to 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 |
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 |
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(java.awt.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 java.lang.String ACTION_KEY_MINIMIZE
getAction(String)
. The action behind this
key should call setExtendedMode(ExtendedMode)
with an argument of ExtendedMode.MINIMIZED
.
static final java.lang.String ACTION_KEY_MAXIMIZE
getAction(String)
. The action behind this
key should call setExtendedMode(ExtendedMode)
with an argument of ExtendedMode.MAXIMIZED
.
static final java.lang.String ACTION_KEY_NORMALIZE
getAction(String)
. The action behind this
key should call setExtendedMode(ExtendedMode)
with an argument of ExtendedMode.NORMALIZED
.
static final java.lang.String ACTION_KEY_EXTERNALIZE
getAction(String)
. The action behind this
key should call setExtendedMode(ExtendedMode)
with an argument of ExtendedMode.EXTERNALIZED
.
static final java.lang.String ACTION_KEY_UNEXTERNALIZE
getAction(String)
. The action behind this
key should call setExtendedMode(ExtendedMode)
with
an argument of ExtendedMode.NORMALIZED
.
static final java.lang.String ACTION_KEY_UNMAXIMIZE_EXTERNALIZED
getAction(String)
. The action behind this
key should call setExtendedMode(ExtendedMode)
with
an argument of ExtendedMode.EXTERNALIZED
.
static final java.lang.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 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).CVetoClosingListener
s 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.
null
void 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
java.lang.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 CDockable
s that are also root-CStation
this method will
always return true
.
Subclasses should return the result of CControlAccess.isVisible(CDockable)
.
true
if this CDockable
can be accessed by the user
through a graphical user interface.hasParent()
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 treeboolean isDockableVisible()
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 itemvoid 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)
.
null
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 null
CStation<?> getWorkingArea()
CDockable
, this should be the same as
set by the last call of setWorkingArea(CStation)
.
null
void setMinimizedSize(java.awt.Dimension size)
CDockable
when this CDockable
is minimized and
on a popup window.
size
- the sizejava.awt.Dimension 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
DockTheme
s might override this setting.
true
if the title is shown, false
otherwise.boolean isSingleTabShown()
CDockable
. Some
DockTheme
s might ignore this setting.
true
if a single tab should be shown,
false
if notjava.awt.Component getFocusComponent()
Component
which should receive the focus once this CDockable
is focused.
null
CommonDockable intern()
CDockable
.
CStation<?> asStation()
this
or an object representing this
as
CStation
.
null
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_1, description="Return CControl instead of CControlAccess") @FrameworkOnly CControlAccess getControl()
CAction getAction(java.lang.String key)
CDockable
put by another module.
key
- the name of the action
null
ColorMap getColors()
FontMap getFonts()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |