Class AbstractCDockable
java.lang.Object
bibliothek.gui.dock.common.intern.AbstractCDockable
- All Implemented Interfaces:
CDockable
- Direct Known Subclasses:
AbstractDockableCStation,DefaultCDockable
- Author:
- Benjamin Sigg
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CListenerCollectionthe listeners that were added to this dockableFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a listener to this dockable which gets informed if the location or the visibility changes.voidAdds a property listener to this dockable, the listener will be informed of changes of this dockable.voidAdds a state listener to this dockable, the listener will be informed of changes of this dockable.voidaddDoubleClickListener(CDoubleClickListener listener) Adds a new listener to this dockable.voidaddFocusListener(CFocusListener listener) Adds a focus listener to this dockable.voidaddKeyboardListener(CKeyboardListener listener) Adds a keyboard listener to this dockable.voidaddVetoClosingListener(CVetoClosingListener listener) Adds a veto-listener to this dockable, the listener will be informed before this dockable gets closed and can issue a veto.protected CControlAccesscontrol()Gets access to the controller.protected abstract CommonDockableCreates theCommonDockablethat is associated with this dockable, called the first time theCommonDockableis required for an operation.Gets an action which is not added to the title by thisCDockableput by another module.Gets the preferred size of thisCDockable.getAutoBaseLocation(boolean noBackwardsTransformation) Tries to find out at which location thisCDockablemay appear if it would be made visible.Gets the location of thisCDockable.protected CloseActionSourcegetClose()Gets the action source which might show a single action that closes this dockable.Gets a mutable map of colors.Gets the control which is responsible for this dockable.Gets the control which is responsible for this dockable.Gets an earlier set value ofsetDefaultLocation(ExtendedMode, CLocation).protected StringGets the size and location of thisCDockable.Gets theComponentwhich should receive the focus once thisCDockableis focused.getFonts()Gets a mutable map of fonts.Gets the size which is used when thisCDockableis minimized and on a popup window.CStation<?>CStation<?>Gets the parent of thisCDockable, this should be the same as set by the last call ofCDockable.setWorkingArea(CStation).booleanTells whether thisCDockablehas a root station as parent.protected voidinit(CommonDockable dockable) Initializes this CDockable.intern()Gets the intern representation of this dockable.booleanDeprecated.booleanisEnabled(EnableableItem item) Tells whether a part of this dockable is enabled.booleanAlwaystrue, clients should not override this method unless they know exactly what they are doing.booleanTells whether width and height are locked.booleanTells whether the width of thisCDockableshould remain the same when its parent changes the size.booleanTells whether the height of thisCDockableshould remain the same when its parent changes the size.booleanTells whether thisCDockableis currently visible to the user.booleanTells whether a single tab should be shown for thisCDockable.booleanisSticky()Tells whether thisCDockableremains visible when minimized and without focus.booleanTells whether theCDockable.isSticky()property can be changed by the user by clicking a button that is displayed on theFlapDockStation.booleanTells whether thisCDockableshows its title or not.booleanTells whether thisCDockableis currently visible or not.protected CDockablePropertyListener[]Deprecated.voidExchanges an action of thisCDockable.voidRemoveslistenerfrom this dockablevoidRemoves a property listener from this dockable.voidRemoves a state listener from this dockable.voidRemoves a listener from this dockable.voidremoveFocusListener(CFocusListener listener) Removes a focus listener from this dockable.voidremoveKeyboardListener(CKeyboardListener listener) Removes a listener from this dockable.voidRemoveslistenerfrom thisCDockable.voidsetControlAccess(CControlAccess control) Sets theCControlwhich is responsible for thisCDockable.voidsetDefaultLocation(ExtendedMode mode, CLocation location) Sets the default location for modemodefor this dockable.voidsetEnabled(EnableableItem item, boolean enabled) Enables or disables a part of this dockable.voidsetExtendedMode(ExtendedMode extendedMode) Sets how and where thisCDockableshould be shown.voidsetFocusComponent(Component component) Sets theComponentwhich should receive the focus when thisCDockableis focused.voidsetGrouping(DockableGrouping grouping) Sets an algorithm that defines how this dockable attempts to automatically group itself with other dockables.voidsetLocation(CLocation location) Sets the location of thisCDockable.voidsetLocationsAside(CDockable dockable) booleansetLocationsAside(Filter<CDockable> filter) Traverses the history of focusedCDockables, and selects the newest item with focus and matchingfilterfor callingCDockable.setLocationsAside(CDockable).booleanSearches for the last focusedCDockablewith the sameworking areaasthis, and callsCDockable.setLocationsAside(CDockable)with it.
Note that if thisdockableis visible, then it may or may not change its location.voidsetMinimizedSize(Dimension size) Sets the size of thisCDockablewhen thisCDockableis minimized and on a popup window.voidsetResizeLocked(boolean resizeLocked) Sets whether this dockable likes to remain with the same size all the time.voidsetResizeLockedHorizontally(boolean resizeLockedHorizontally) Sets whether this dockable likes to remain with the same width all the time.voidsetResizeLockedVertically(boolean resizeLockedVertically) Sets whether this dockable likes to remain with the same height all the time.voidsetResizeRequest(RequestDimension size, boolean process) Tells thisCDockablewhich size it should have.voidsetResizeRequest(Dimension size, boolean process) Tells thisCDockablewhich size it should have.voidsetSingleTabShown(boolean singleTabShown) Tells thisCDockablewhether to show a single tab or not.voidsetSticky(boolean sticky) Sets whether thisCDockableshould remain visible when minimized and without focus.voidsetStickySwitchable(boolean switchable) Sets whether the user can switch theCDockable.isSticky()property by clicking on a button that is presented by theFlapDockStation.voidsetTitleShown(boolean shown) Tells thisCDockablewhether to show or to hide its titles.voidsetVisible(boolean visible) Shows or hides thisCDockable.voidsetWorkingArea(CStation<?> area) Sets the parent of thisCDockable.protected CDockableStateListener[]Deprecated.subclasses should useCListenerCollection.getCDockableStateListener()oflistenerCollectionif they want to fire an eventvoidtoFront()Tries to focus this dockable.voidTries to focus this dockable, and then ensures that theComponentfocusactually gets the focus.
The behavior of this method is not defined for the case wherefocusis not a child ofthis.
There is no guarantee of success, this methods fails silently if the focus cannot be gained.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface bibliothek.gui.dock.common.intern.CDockable
asStation, isCloseable, isExternalizable, isMaximizable, isMinimizable, isStackable
-
Field Details
-
listenerCollection
the listeners that were added to this dockable
-
-
Constructor Details
-
AbstractCDockable
protected AbstractCDockable()Creates a new dockable
-
-
Method Details
-
toString
-
createCommonDockable
Creates theCommonDockablethat is associated with this dockable, called the first time theCommonDockableis required for an operation.- Returns:
- the new dockable
-
init
Initializes this CDockable.- Parameters:
dockable- the representation of thisCDockable, notnull
-
getClose
Gets the action source which might show a single action that closes this dockable.- Returns:
- the close source
-
control
Gets access to the controller.- Returns:
- access or
null
-
addCDockableStateListener
Description copied from interface:CDockableAdds a state listener to this dockable, the listener will be informed of changes of this dockable.- Specified by:
addCDockableStateListenerin interfaceCDockable- Parameters:
listener- the new listener
-
addCDockablePropertyListener
Description copied from interface:CDockableAdds a property listener to this dockable, the listener will be informed of changes of this dockable.- Specified by:
addCDockablePropertyListenerin interfaceCDockable- Parameters:
listener- the new listener
-
addCDockableLocationListener
Description copied from interface:CDockableAdds a listener to this dockable which gets informed if the location or the visibility changes.- Specified by:
addCDockableLocationListenerin interfaceCDockable- Parameters:
listener- the new listener
-
removeCDockableStateListener
Description copied from interface:CDockableRemoves a state listener from this dockable.- Specified by:
removeCDockableStateListenerin interfaceCDockable- Parameters:
listener- the listener to remove
-
removeCDockablePropertyListener
Description copied from interface:CDockableRemoves a property listener from this dockable.- Specified by:
removeCDockablePropertyListenerin interfaceCDockable- Parameters:
listener- the listener to remove
-
removeCDockableLocationListener
Description copied from interface:CDockableRemoveslistenerfrom this dockable- Specified by:
removeCDockableLocationListenerin interfaceCDockable- Parameters:
listener- the listener to remove
-
addFocusListener
Description copied from interface:CDockableAdds a focus listener to this dockable. The focus listener gets informed when this dockable gains or loses the focus.- Specified by:
addFocusListenerin interfaceCDockable- Parameters:
listener- the new listener
-
removeFocusListener
Description copied from interface:CDockableRemoves a focus listener from this dockable.- Specified by:
removeFocusListenerin interfaceCDockable- Parameters:
listener- the listener to remove
-
addKeyboardListener
Description copied from interface:CDockableAdds a keyboard listener to this dockable. The listener gets informed when a key is pressed or released on this dockable.- Specified by:
addKeyboardListenerin interfaceCDockable- Parameters:
listener- the new listener
-
removeKeyboardListener
Description copied from interface:CDockableRemoves a listener from this dockable.- Specified by:
removeKeyboardListenerin interfaceCDockable- Parameters:
listener- the listener to remove
-
addDoubleClickListener
Description copied from interface:CDockableAdds a new listener to this dockable. The listener gets informed when the mouse is clicked twice on this dockable.- Specified by:
addDoubleClickListenerin interfaceCDockable- Parameters:
listener- the new listener
-
removeDoubleClickListener
Description copied from interface:CDockableRemoves a listener from this dockable.- Specified by:
removeDoubleClickListenerin interfaceCDockable- Parameters:
listener- the listener to remove
-
addVetoClosingListener
Description copied from interface:CDockableAdds a veto-listener to this dockable, the listener will be informed before this dockable gets closed and can issue a veto. The listener will receive aCVetoClosingEventwhich contains only thisCDockable(even if other dockables are closed at the same time).
CVetoClosingListeners added to theCControlare invoked before listeners that are added to aCDockable.- Specified by:
addVetoClosingListenerin interfaceCDockable- Parameters:
listener- the new listener- See Also:
-
removeVetoClosingListener
Description copied from interface:CDockableRemoveslistenerfrom thisCDockable.- Specified by:
removeVetoClosingListenerin interfaceCDockable- Parameters:
listener- the listener to remove
-
stateListeners
Deprecated.subclasses should useCListenerCollection.getCDockableStateListener()oflistenerCollectionif they want to fire an eventGets the list of state listeners.- Returns:
- the stateListeners
-
propertyListeners
Deprecated.subclasses should useCListenerCollection.getCDockablePropertyListener()oflistenerCollectionif they want to fire an eventGets the list of property listeners.- Returns:
- the stateListeners
-
setVisible
public void setVisible(boolean visible) Description copied from interface:CDockableShows or hides thisCDockable. If thisCDockableis not visible and is made visible, then the framework tries to set its location at the last known position.
Subclasses should callCControlAccess.show(CDockable)orCControlAccess.hide(CDockable).- Specified by:
setVisiblein interfaceCDockable- Parameters:
visible- the new visibility state- See Also:
-
isVisible
public boolean isVisible()Description copied from interface:CDockableTells whether thisCDockableis currently visible or not. Visibility means that thisCDockableis in the tree structure of DockingFrames and has a parent. Being in the structure does not imply being visible on the screen: If someJFrameis not shown, or someDockStationnot properly added to a parent component, then a visibleCDockablecan be invisible for the user. ForCDockables that are also root-CStationthis method will always returntrue.
Clients interested in whether the user can actually see this dockable should callCDockable.isShowing().
Subclasses should return the result ofCControlAccess.isVisible(CDockable). -
hasParent
public boolean hasParent()Description copied from interface:CDockableTells whether thisCDockablehas a root station as parent. Having a root station as parent impliesCDockable.isVisible(). For root-CStationthis method will returnfalseif they do not have a parent, they are not considered to be parents of themselves.
Subclasses should return the result ofCControlAccess.hasParent(CDockable). -
isDockableVisible
@Deprecated @Todo(compatibility=BREAK_MAJOR, priority=ENHANCEMENT, target=VERSION_1_1_3, description="remove this method") public boolean isDockableVisible()Deprecated.Description copied from interface:CDockableTells whether thisCDockableis currently visible to the user. ACDockablewhich is notvisible, is notdockable visibleeither. The method does not take into account that a frame may be positioned such that it is not entirely visible on the screen. Neither does the method take into account, that a frame may be minimized.- Specified by:
isDockableVisiblein interfaceCDockable- Returns:
trueif the user should be able to see this item
-
isShowing
public boolean isShowing()Description copied from interface:CDockableTells whether thisCDockableis currently visible to the user. ACDockablewhich is notvisible, is notshowingeither. The method does not take into account that a frame may be positioned such that it is not entirely visible on the screen. The method may or may not take into account, that a frame may be minimized.
Clients interested in monitoring this property can add aCDockableLocationListenerto this dockable. -
toFront
public void toFront()Tries to focus this dockable. In order to gain focus this dockable must at least be visible, additional restrictions exist, like gaining focus takes some time during which no other dockable must ask for the focus. This method is best used to highlight existing dockables, but not while building a new layout (look at methods likeCGrid.selectto select a dockable in a stack while building a layout).
There is no guarantee of success, this methods fails silently if the focus cannot be gained. -
toFront
Tries to focus this dockable, and then ensures that theComponentfocusactually gets the focus.
The behavior of this method is not defined for the case wherefocusis not a child ofthis.
There is no guarantee of success, this methods fails silently if the focus cannot be gained.- Parameters:
focus- a child of this dockable, notnull- See Also:
-
setLocation
Description copied from interface:CDockableSets the location of thisCDockable. If thisCDockableis visible, than this method will take immediately effect. Otherwise the location will be stored in a cache and read as soon as thisCDockableis made visible.
Note that the location can only be seen as a hint, the framework tries to fit the location as good as possible, but there are no guarantees.
Subclasses should callCControlAccess.getLocationManager()andCLocationModeManager.setLocation(bibliothek.gui.Dockable, CLocation).- Specified by:
setLocationin interfaceCDockable- Parameters:
location- the new location,nullis possible, but will not move theCDockableimmediately- See Also:
-
setLocationsAside
Description copied from interface:CDockableSets the location of thisCDockableasidedockablein allExtendedModes. If thisDockableis visible, then it may or may not change its location andExtendedMode. Note thatdockableandthismust not be the same object, and that bothCDockables must beregisteredat aCControl.- Specified by:
setLocationsAsidein interfaceCDockable- Parameters:
dockable- the item whose locations should be copied
-
setLocationsAside
Description copied from interface:CDockableTraverses the history of focusedCDockables, and selects the newest item with focus and matchingfilterfor callingCDockable.setLocationsAside(CDockable).- Specified by:
setLocationsAsidein interfaceCDockable- Parameters:
filter- to select aCDockablewhich did have the focus- Returns:
trueif an old focusedDockablewas found,falseif not
-
setLocationsAsideFocused
public boolean setLocationsAsideFocused()Description copied from interface:CDockableSearches for the last focusedCDockablewith the sameworking areaasthis, and callsCDockable.setLocationsAside(CDockable)with it.
Note that if thisdockableis visible, then it may or may not change its location. This method should be called before making thedockablevisible.- Specified by:
setLocationsAsideFocusedin interfaceCDockable- Returns:
trueif the last focusedCDockablewas found,falseotherwise. Iffalsethen no action was performed
-
getBaseLocation
Description copied from interface:CDockableGets the location of thisCDockable. If thisCDockableis visible, then a location will always be returned. Otherwise a location will only be returned if it just was set usingCDockable.setLocation(CLocation).- Specified by:
getBaseLocationin interfaceCDockable- Returns:
- the location or
null
-
getAutoBaseLocation
Description copied from interface:CDockableTries to find out at which location thisCDockablemay appear if it would be made visible. The default implementation of this method has severe limitations:- Random placements are not considered and the result will be
null - Placeholders are not considered, if this
CDockableis associated with a placeholder, then the placeholder information will be completely lost. - This
CDockablemust not be visible and it must be registered at aCControl.
Clients can make use of this method in two ways:- They can find out whether the dockable has a location, or will be placed randomly (in which case the result
of this method is
null) - They can override this method in which case the
CDockablewill appear at the exact location that is returned by this method ignoring any other settings.
- Specified by:
getAutoBaseLocationin interfaceCDockable- Parameters:
noBackwardsTransformation- iftrue, then this method should not convert anyDockablePropertyback to aCLocation, instead it should returnnullif such a conversion would be necessary. This way the method does returnnullin any case where information (e.g. placeholders) could be lost due to the limitations ofCLocation- Returns:
- The expected location of this invisible
CDockable, this may either be the location that was set by callingCDockable.setLocation(CLocation), the last location of this dockable when it was visible, thedefault locationof theCControlor the default location for thenormalized extended mode. A value ofnullis returned if thisCDockablewould appear at a random location, is not registered at aCControlor is already visible.
- Random placements are not considered and the result will be
-
setExtendedMode
Description copied from interface:CDockableSets how and where thisCDockableshould be shown. Conflicts withCDockable.isExternalizable(),CDockable.isMaximizable()andCDockable.isMinimizable()will just be ignored. Implementations should callLocationModeManager.setMode(Dockable, ExtendedMode).
If this dockable is not visible, then it will be made visible in order to apply theextendedMode.- Specified by:
setExtendedModein interfaceCDockable- Parameters:
extendedMode- the size and location
-
getExtendedMode
Description copied from interface:CDockableGets the size and location of thisCDockable. Implementations should returnLocationModeManager.getMode(Dockable).- Specified by:
getExtendedModein interfaceCDockable- Returns:
- the size and location or
nullif thisCDockableis not part of anCControl. May benullif this dockable is not visible.
-
setGrouping
Sets an algorithm that defines how this dockable attempts to automatically group itself with other dockables.- Parameters:
grouping- the grouping behavior, can benullin which case this dockable does not attempt to group itself. The default value of this property isnull.
-
getGrouping
Description copied from interface:CDockableGets an algorithm that tells how thisCDockableattempts to group itself automatically with otherDockables. The algorithm is able to rewrite the location of thisCDockableevery time when it is moved to a new location, assuming that no stronger mechanism, or the user, already defined a location.- Specified by:
getGroupingin interfaceCDockable- Returns:
- the grouping behavior, or
null
-
setWorkingArea
Description copied from interface:CDockableSets the parent of thisCDockable. This method can be called by the client or indirectly throughCDockable.setLocation(CLocation).- Specified by:
setWorkingAreain interfaceCDockable- Parameters:
area- the new parent ornull
-
getWorkingArea
Description copied from interface:CDockableGets the parent of thisCDockable, this should be the same as set by the last call ofCDockable.setWorkingArea(CStation).- Specified by:
getWorkingAreain interfaceCDockable- Returns:
- the parent or
null
-
isResizeLocked
public boolean isResizeLocked()Tells whether width and height are locked.- Returns:
trueif width and height are locked
-
isResizeLockedVertically
public boolean isResizeLockedVertically()Description copied from interface:CDockableTells whether the height of thisCDockableshould 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 thisCDockable.- Specified by:
isResizeLockedVerticallyin interfaceCDockable- Returns:
trueif the height of thisCDockableshould remain the same during resize events of the parent.
-
isResizeLockedHorizontally
public boolean isResizeLockedHorizontally()Description copied from interface:CDockableTells whether the width of thisCDockableshould 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 thisCDockable.- Specified by:
isResizeLockedHorizontallyin interfaceCDockable- Returns:
trueif the width of thisCDockableshould remain the same during resize events of the parent.
-
setResizeRequest
Tells thisCDockablewhich size it should have. The size will be stored until it is read bygetAndClearResizeRequest().
Ifprocessistrue, then this method will callCControl.handleResizeRequests()in order to try to apply the requested size. However, there are no guarantees that the requested size can be matched, or that the request gets handled at all.
If thisCDockableis not registered at aCControl, then the request will remain unprocessed until thisCDockableis registered, and someone callsCControl.handleResizeRequests()on the new owner.- Parameters:
size- the new preferred size, can benullto cancel an earlier requestprocess- whether to process all pending requests of allCDockableregistered at theCControlwhich is the owner ofthis. Clients can set this parameter tofalseand callCControl.handleResizeRequests()manually to process all pending requests.- See Also:
-
setResizeRequest
Tells thisCDockablewhich size it should have. The size will be stored until it is read bygetAndClearResizeRequest().
Ifprocessistrue, then this method will callCControl.handleResizeRequests()in order to try to apply the requested size. However, there are no guarantees that the requested size can be matched, or that the request gets handled at all.
If thisCDockableis not registered at aCControl, then the request will remain unprocessed until thisCDockableis registered, and someone callsCControl.handleResizeRequests()on the new owner.- Parameters:
size- the new preferred size, can benullto cancel an earlier requestprocess- whether to process all pending requests of allCDockableregistered at theCControlwhich is the owner ofthis. Clients can set this parameter tofalseand callCControl.handleResizeRequests()manually to process all pending requests.
-
getAndClearResizeRequest
Description copied from interface:CDockableGets the preferred size of thisCDockable. The preferred size will be used to resize thisCDockablewhenCControl.handleResizeRequests()is called. There are no guarantees that the request can be granted, or will be handled at all.
Calling this method should delete the request, so calling this method twice should have the effect, that the second timenullis returned.- Specified by:
getAndClearResizeRequestin interfaceCDockable- Returns:
- the next requested size or
null
-
setResizeLocked
public void setResizeLocked(boolean resizeLocked) Sets whether this dockable likes to remain with the same size all the time.- Parameters:
resizeLocked-trueif the size of this dockable should be kept as long as possible- See Also:
-
setResizeLockedHorizontally
public void setResizeLockedHorizontally(boolean resizeLockedHorizontally) Sets whether this dockable likes to remain with the same width all the time.- Parameters:
resizeLockedHorizontally-trueif the width of this dockable should be kept as long as possible
-
setResizeLockedVertically
public void setResizeLockedVertically(boolean resizeLockedVertically) Sets whether this dockable likes to remain with the same height all the time.- Parameters:
resizeLockedVertically-trueif the height of this dockable should be kept as long as possible
-
setEnabled
Enables or disables a part of this dockable. Some effects are visible immediately, others will need some time to show up. Usually disabling a part means that said part is shown in some gray colors and won't react to any user input (e.g. to the mouse).
Developers which need more accuracy in disabling items, should have a look at theDisablingStrategy.- Parameters:
item- what part of thisCDockableshould be enabled or disabledenabled- whether the part should be enabled
-
isEnabled
Description copied from interface:CDockableTells whether a part of this dockable is enabled. -
setSticky
public void setSticky(boolean sticky) Description copied from interface:CDockableSets whether thisCDockableshould remain visible when minimized and without focus. -
isSticky
public boolean isSticky()Description copied from interface:CDockableTells whether thisCDockableremains visible when minimized and without focus. -
setStickySwitchable
public void setStickySwitchable(boolean switchable) Description copied from interface:CDockableSets whether the user can switch theCDockable.isSticky()property by clicking on a button that is presented by theFlapDockStation.- Specified by:
setStickySwitchablein interfaceCDockable- Parameters:
switchable- whether the user is able to switch the hold property
-
isStickySwitchable
public boolean isStickySwitchable()Description copied from interface:CDockableTells whether theCDockable.isSticky()property can be changed by the user by clicking a button that is displayed on theFlapDockStation.- Specified by:
isStickySwitchablein interfaceCDockable- Returns:
trueif the user is able to switch the property,falseotherwise
-
setMinimizedSize
Description copied from interface:CDockableSets the size of thisCDockablewhen thisCDockableis minimized and on a popup window.- Specified by:
setMinimizedSizein interfaceCDockable- Parameters:
size- the size
-
isNormalizeable
public boolean isNormalizeable()Alwaystrue, clients should not override this method unless they know exactly what they are doing.- Specified by:
isNormalizeablein interfaceCDockable- Returns:
true, unless a subclass requires very special behavior.
-
getMinimizedSize
Description copied from interface:CDockableGets the size which is used when thisCDockableis minimized and on a popup window. If a value below 0 is set, then the default size is used.- Specified by:
getMinimizedSizein interfaceCDockable- Returns:
- the size
-
setTitleShown
public void setTitleShown(boolean shown) Tells thisCDockablewhether to show or to hide its titles.- Parameters:
shown-trueif titles should be shown,falseif they should be hidden.
-
isTitleShown
public boolean isTitleShown()Description copied from interface:CDockableTells whether thisCDockableshows its title or not. Note that someDockThemes might override this setting.- Specified by:
isTitleShownin interfaceCDockable- Returns:
trueif the title is shown,falseotherwise.
-
setSingleTabShown
public void setSingleTabShown(boolean singleTabShown) Tells thisCDockablewhether to show a single tab or not.- Parameters:
singleTabShown-trueif a single tab should be shown,falseotherwise- See Also:
-
isSingleTabShown
public boolean isSingleTabShown()Description copied from interface:CDockableTells whether a single tab should be shown for thisCDockable. SomeDockThemes might ignore this setting.- Specified by:
isSingleTabShownin interfaceCDockable- Returns:
trueif a single tab should be shown,falseif not
-
intern
Gets the intern representation of this dockable. -
setDefaultLocation
Sets the default location for modemodefor this dockable. Note that this location does not override any existing setting. This method can be called either before or after making this dockable visible. It is the client's responsibility to ensure thatlocationis valid together withmode.- Parameters:
mode- the mode for which to store the default locationlocation- the default location ornull
-
getDefaultLocation
Gets an earlier set value ofsetDefaultLocation(ExtendedMode, CLocation).- Parameters:
mode- the mode for which to search the default location- Returns:
- the location or
null
-
getDockableUniqueId
Gets the unique identifier that has been assigned to thisCDockableby theCControl. Every dockable has a unique identifier, but it may not be the same identifier as set by this client.- Returns:
- the unique identifier, it is set once this dockable is added to a
CControl
-
getControlAccess
Description copied from interface:CDockableGets the control which is responsible for this dockable. Clients should not use this method unless they know exactly what they are doing.- Specified by:
getControlAccessin interfaceCDockable- Returns:
- the control
-
setControlAccess
Description copied from interface:CDockableSets theCControlwhich is responsible for thisCDockable. Subclasses must callCControlAccess.link(CDockable, CDockableAccess)to grant theCControlaccess to the internal properties of thisCDockable.linkcan also be used to revoke access.- Specified by:
setControlAccessin interfaceCDockable- Parameters:
control- the new control ornull
-
putAction
Exchanges an action of thisCDockable. The actions that are associated with thisCDockablethrough this method are not necessarily shown on the title. They are used by other modules to create effects that are known only to them.- Parameters:
key- the key of the action, one of theACTION_KEY_xzy-constants defined inCDockableaction- the new action, can benullwhich might force back a default action (that depends on the module that useskey)
-
getAction
Description copied from interface:CDockableGets an action which is not added to the title by thisCDockableput by another module. -
getColors
Description copied from interface:CDockableGets a mutable map of colors. Clients can put colors into this map, and the colors will be presented on the screen by various effects. -
getFonts
Description copied from interface:CDockableGets a mutable map of fonts. Clients can put fonts into this map, and the fonts will be presented on the screen through various effects. -
getFocusComponent
Description copied from interface:CDockableGets theComponentwhich should receive the focus once thisCDockableis focused.- Specified by:
getFocusComponentin interfaceCDockable- Returns:
- the element which should receive the focus, can be
null
-
setFocusComponent
Sets theComponentwhich should receive the focus when thisCDockableis focused. Please note that the focus will be transferred to this component every time the dockable lost the focus and gained the focus again. The default behavior of re-focusing the last focus owner should be sufficient for most applications.- Parameters:
component- the component to focus, can benull, should be a child of thisCDockable
-
getParentStation
Description copied from interface:CDockable- Specified by:
getParentStationin interfaceCDockable- Returns:
- the closest station, may be
null
-
getControl
Description copied from interface:CDockableGets the control which is responsible for this dockable. This property is set as long as thisCDockableis registered at aCControl.- Specified by:
getControlin interfaceCDockable- Returns:
- the control in whose realm this dockable is used, can be
null
-
CListenerCollection.getCDockablePropertyListener()oflistenerCollectionif they want to fire an event