@FrameworkOnly public class DefaultCDockable extends AbstractCDockable
CDockable that uses a DefaultCommonDockable to show
its content.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.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultCDockable.Permissions
Describes what the user can do with the enclosing
DefaultCDockable. |
listenerCollectionACTION_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 and Description |
|---|
DefaultCDockable()
Creates a new dockable
|
DefaultCDockable(DefaultCDockable.Permissions permission)
Creates a new dockable.
|
| Modifier and Type | Method and Description |
|---|---|
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()
|
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.
|
addCDockableLocationListener, addCDockablePropertyListener, addCDockableStateListener, addDoubleClickListener, addFocusListener, addKeyboardListener, addVetoClosingListener, control, getAction, getAndClearResizeRequest, getAutoBaseLocation, getBaseLocation, getClose, getColors, getControl, getControlAccess, getDefaultLocation, getDockableUniqueId, getExtendedMode, getFocusComponent, getFonts, getGrouping, getMinimizedSize, getParentStation, getWorkingArea, hasParent, init, isDockableVisible, isEnabled, isNormalizeable, isResizeLocked, isResizeLockedHorizontally, isResizeLockedVertically, isShowing, isSingleTabShown, isSticky, isStickySwitchable, isTitleShown, isVisible, propertyListeners, putAction, removeCDockableLocationListener, removeCDockablePropertyListener, removeCDockableStateListener, removeDoubleClickListener, removeFocusListener, removeKeyboardListener, removeVetoClosingListener, setControlAccess, setDefaultLocation, setEnabled, setExtendedMode, setFocusComponent, setGrouping, setLocation, setLocationsAside, setLocationsAside, setLocationsAsideFocused, setMinimizedSize, setResizeLocked, setResizeLockedHorizontally, setResizeLockedVertically, setResizeRequest, setResizeRequest, setSingleTabShown, setSticky, setStickySwitchable, setTitleShown, setVisible, setWorkingArea, stateListeners, toFront, toFront, toStringpublic DefaultCDockable()
public DefaultCDockable(DefaultCDockable.Permissions permission)
permission - the permissions of this dockableprotected 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 componentpublic 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 actionpublic 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 actionpublic DefaultCommonDockable intern()
AbstractCDockableintern in interface CDockableintern in class AbstractCDockableCopyright © 2018. All rights reserved.