|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.common.intern.AbstractCDockable
public abstract class AbstractCDockable
An abstract implementation of CDockable
. Contains methods to
work with listeners and with CAction
s.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface bibliothek.gui.dock.common.intern.CDockable |
---|
CDockable.ExtendedMode |
Constructor Summary | |
---|---|
protected |
AbstractCDockable(CommonDockable dockable)
Creates a new dockable |
Method Summary | |
---|---|
void |
addCDockableListener(CDockableListener listener)
Adds a listener to this dockable, the listener will be informed of changes of this dockable. |
protected CControlAccess |
control()
Gets access to the controller. |
DockActionSource |
getClose()
Gets the source that contains the close-action. |
CControlAccess |
getControl()
Gets the control which is responsible for this dockable. |
CDockable.ExtendedMode |
getExtendedMode()
Gets the size and location of this dockable. |
CLocation |
getLocation()
Gets the location of this dockable. |
CWorkingArea |
getWorkingArea()
Gets the parent of this dockable, this should be the same as set by the last call of CDockable.setWorkingArea(CWorkingArea) . |
protected void |
init(CommonDockable dockable)
Initializes this CDockable. |
CommonDockable |
intern()
Gets the intern representation of this dockable. |
abstract boolean |
isCloseable()
Tells whether this dockable can be closed by the user. |
boolean |
isVisible()
Tells whether this dockable is currently visible or not. |
protected CDockableListener[] |
listeners()
Gets the list of listeners. |
void |
removeCDockableListener(CDockableListener listener)
Removes a listener from this dockable. |
void |
setControl(CControlAccess control)
Sets the CControl which is responsible for this dockable. |
void |
setExtendedMode(CDockable.ExtendedMode extendedMode)
Sets how and where this dockable should be shown. |
void |
setLocation(CLocation location)
Sets the location of this dockable. |
void |
setVisible(boolean visible)
Shows or hides this dockable. |
void |
setWorkingArea(CWorkingArea area)
Sets the parent of this dockable. |
void |
toFront()
Tries to focus this dockable. |
protected void |
updateClose()
Ensures that close contains an action when necessary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bibliothek.gui.dock.common.intern.CDockable |
---|
isExternalizable, isMaximizable, isMinimizable, isStackable |
Constructor Detail |
---|
protected AbstractCDockable(CommonDockable dockable)
dockable
- the internal representation of this CDockable
,
can be null
but then init(CommonDockable)
should
be called.Method Detail |
---|
protected void init(CommonDockable dockable)
dockable
- the representation of this CDockable
, not null
protected CControlAccess control()
null
public void addCDockableListener(CDockableListener listener)
addCDockableListener
in interface CDockable
listener
- the new listenerpublic void removeCDockableListener(CDockableListener listener)
removeCDockableListener
in interface CDockable
listener
- the listener to removeprotected CDockableListener[] listeners()
public abstract boolean isCloseable()
updateClose()
to ensure that an action is shown/hidden that allows the user to
close this CDockable
.
isCloseable
in interface CDockable
true
if this element can be closedprotected void updateClose()
close
contains an action when necessary.
public void setVisible(boolean visible)
setVisible
in interface CDockable
visible
- the new visibility stateCDockable.isVisible()
public boolean isVisible()
isVisible
in interface CDockable
true
if this dockable can be accessed by the user
through a graphical user interface.public void toFront()
public void setLocation(CLocation location)
setLocation
in interface CDockable
location
- the new location, null
is possible, but
will not move the dockable immediatelypublic CLocation getLocation()
setLocation(CLocation)
.
getLocation
in interface CDockable
null
public void setExtendedMode(CDockable.ExtendedMode extendedMode)
CDockable.isExternalizable()
, CDockable.isMaximizable()
and CDockable.isMinimizable()
will just be ignored.
setExtendedMode
in interface CDockable
extendedMode
- the size and locationpublic CDockable.ExtendedMode getExtendedMode()
getExtendedMode
in interface CDockable
null
if this dockable
is not part of an CControl
.public void setWorkingArea(CWorkingArea area)
CDockable
CDockable.setLocation(CLocation)
.
setWorkingArea
in interface CDockable
area
- the new parent or null
public CWorkingArea getWorkingArea()
CDockable
CDockable.setWorkingArea(CWorkingArea)
.
getWorkingArea
in interface CDockable
null
public CommonDockable intern()
intern
in interface CDockable
public void setControl(CControlAccess control)
CControl
which is responsible for this dockable.
setControl
in interface CDockable
control
- the new controlpublic DockActionSource getClose()
getClose
in interface CDockable
public CControlAccess getControl()
getControl
in interface CDockable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |