|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.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.A name like X_Y tells, that feature X and
feature Y are available. |
| 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_MINIMIZE_HOLD, 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 CActions of this dockable. |
CStation<?> |
asStation()
Gets this or an object representing this as
CStation. |
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 CActions 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. |
IconHandling |
getTitleIconHandling()
Gets the behavior of setTitleIcon(Icon). |
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 CActions 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 |
setTitleIconHandling(IconHandling handling)
Sets the behavior of setTitleIcon(Icon) in case of a null argument. |
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 dockable| Method Detail |
|---|
protected DefaultCommonDockable createCommonDockable()
AbstractCDockableCommonDockable that is associated with this dockable, called the first
time the CommonDockable is required for an operation.
createCommonDockable in class AbstractCDockablepublic 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 component
public void add(Component component,
Object constraints)
component to the content pane.
component - the new componentconstraints - constraints for the layout managerpublic 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 nullpublic String getTitleToolTip()
nullpublic void setTitleIconHandling(IconHandling handling)
setTitleIcon(Icon) in case of a null argument. Either
the icon is replaced by the default icon, or just not shown.
handling - the new behavior, not nullpublic IconHandling getTitleIconHandling()
setTitleIcon(Icon).
nullpublic void setTitleIcon(Icon icon)
CDockable. The exact behavior
of this method depends on the IconHandling that was set by setTitleIconHandling(IconHandling).
icon - the title-iconpublic Icon getTitleIcon()
nullpublic boolean isMinimizable()
CDockableCDockable 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()
CDockableCDockable 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()
CDockableCDockable 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()
CDockableCDockable 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()
CDockableCDockable 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 action
public void insertAction(int index,
CAction action)
index - the location of the actionaction - the actionaddAction(CAction)public void addSeparator()
CActions of this dockable.
public void insertSeparator(int index)
CActions 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()
CActions 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 CDockableintern in class AbstractCDockablepublic CStation<?> asStation()
CDockablethis or an object representing this as
CStation.
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||