|
||||||||||
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 bibliothek.gui.dock.common.intern.DefaultCDockable
@FrameworkOnly public class DefaultCDockable
An CDockable
that uses a DefaultCommonDockable
to show
its content.
Subclasses may override createCommonDockable()
to provide a custom subclass
of DefaultCommonDockable
, note that createCommonDockable()
is called
as soon as the internal representation is required, e.g. for setting a property like
the title or the icon.
Nested Class Summary | |
---|---|
static class |
DefaultCDockable.Permissions
Describes what the user can do with the enclosing DefaultCDockable . |
Field Summary |
---|
Fields inherited from class bibliothek.gui.dock.common.intern.AbstractCDockable |
---|
listenerCollection |
Fields inherited from interface bibliothek.gui.dock.common.intern.CDockable |
---|
ACTION_KEY_CLOSE, ACTION_KEY_EXTERNALIZE, ACTION_KEY_MAXIMIZE, ACTION_KEY_MINIMIZE, ACTION_KEY_NORMALIZE, ACTION_KEY_UNEXTERNALIZE, ACTION_KEY_UNMAXIMIZE_EXTERNALIZED |
Constructor Summary | |
---|---|
DefaultCDockable()
Creates a new dockable |
|
DefaultCDockable(DefaultCDockable.Permissions permission)
Creates a new dockable. |
Method Summary | |
---|---|
void |
add(Component component)
Adds component to the content pane. |
void |
add(Component component,
Object constraints)
Adds component to the content pane. |
void |
addAction(CAction action)
Adds an action to this dockable. |
void |
addSeparator()
Adds a separator to the list of CAction s of this dockable. |
protected DefaultCommonDockable |
createCommonDockable()
Creates the CommonDockable that is associated with this dockable, called the first
time the CommonDockable is required for an operation. |
CAction |
getAction(int index)
Gets the index 'th action of this dockable. |
int |
getActionCount()
Gets the number of CAction s that were added to this dockable. |
Container |
getContentPane()
Gets the container on which the client can pack its components. |
Icon |
getTitleIcon()
Gets the icon that is shown in the title. |
String |
getTitleText()
Gets the text that is shown as title. |
String |
getTitleToolTip()
Gets the tooltip that is shown on the title of this dockable. |
void |
insertAction(int index,
CAction action)
Adds a new action to this dockable. |
void |
insertSeparator(int index)
Adds a separator to the list of CAction s of this dockable. |
DefaultCommonDockable |
intern()
Gets the intern representation of this dockable. |
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 |
isStackable()
Tells whether this CDockable can be combined with another
Dockable to create a stack. |
void |
remove(Component component)
Removes component from the content pane. |
void |
removeAction(CAction action)
Removes an action from this dockable. |
void |
removeAction(int index)
Removes an action from this dockable |
void |
setCloseable(boolean closeable)
Sets whether the user can close this dockable. |
void |
setExternalizable(boolean externalizable)
Sets whether the user can externalize this dockable. |
void |
setLayout(LayoutManager layout)
Sets the LayoutManager of the content pane . |
void |
setMaximizable(boolean maximizable)
Sets whether the user can maximize this dockable. |
void |
setMinimizable(boolean minimizable)
Sets whether the user can minimize this dockable. |
void |
setStackable(boolean stackable)
Sets whether this element can be combined with other dockable to create a stack. |
void |
setTitleIcon(Icon icon)
Sets the icon that is shown in the title of this CDockable . |
void |
setTitleText(String text)
Sets the text that is shown as title. |
void |
setTitleToolTip(String text)
Sets the tooltip that should be shown on the title of this dockable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultCDockable()
public DefaultCDockable(DefaultCDockable.Permissions permission)
permission
- the permissions of this dockableMethod Detail |
---|
protected DefaultCommonDockable createCommonDockable()
AbstractCDockable
CommonDockable
that is associated with this dockable, called the first
time the CommonDockable
is required for an operation.
createCommonDockable
in class AbstractCDockable
public Container getContentPane()
public void setLayout(LayoutManager layout)
LayoutManager
of the content pane
.
layout
- the new layout managerpublic void add(Component component)
component
to the content pane.
component
- the new componentpublic void add(Component component, Object constraints)
component
to the content pane.
component
- the new componentconstraints
- constraints for the layout manager
public void remove(Component component)
component
from the content pane.
component
- the component to removepublic void setTitleText(String text)
text
- the titlepublic String getTitleText()
public void setTitleToolTip(String text)
text
- the new tooltip, can be null
public String getTitleToolTip()
null
public void setTitleIcon(Icon icon)
CDockable
.
icon
- the title-iconpublic Icon getTitleIcon()
null
public boolean isMinimizable()
CDockable
CDockable
can be minimized by the user.
true
if this element can be minimizedpublic void setMinimizable(boolean minimizable)
minimizable
- true
if the user can minimize this elementpublic boolean isMaximizable()
CDockable
CDockable
can be maximized by the user.
true
if this element can be maximizedpublic void setMaximizable(boolean maximizable)
maximizable
- true
if the user can maximize this elementpublic boolean isExternalizable()
CDockable
CDockable
can be externalized by the user.
true
if this element can be externalizedpublic void setExternalizable(boolean externalizable)
externalizable
- true
if the user can externalize this elementpublic boolean isCloseable()
CDockable
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 closedpublic void setStackable(boolean stackable)
stackable
- true
if this element can be combined.public boolean isStackable()
CDockable
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.public void setCloseable(boolean closeable)
closeable
- true
if the user can close this elementpublic void addAction(CAction action)
action
- the new actionpublic void insertAction(int index, CAction action)
index
- the location of the actionaction
- the actionaddAction(CAction)
public void addSeparator()
CAction
s of this dockable.
public void insertSeparator(int index)
CAction
s of this dockable.
index
- the location of the actionpublic void removeAction(int index)
index
- the location of the actionpublic void removeAction(CAction action)
action
- the action to removepublic int getActionCount()
CAction
s that were added to this dockable.
public CAction getAction(int index)
index
'th action of this dockable. Be aware that
the result might be CSeparator.SEPARATOR
.
index
- the location of an action
public DefaultCommonDockable intern()
AbstractCDockable
intern
in interface CDockable
intern
in class AbstractCDockable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |