Class AbstractCDockable

java.lang.Object
bibliothek.gui.dock.common.intern.AbstractCDockable
All Implemented Interfaces:
CDockable
Direct Known Subclasses:
AbstractDockableCStation, DefaultCDockable

public abstract class AbstractCDockable extends Object implements CDockable
An abstract implementation of CDockable. Contains methods to work with listeners and with CActions.
Author:
Benjamin Sigg
  • Field Details

    • listenerCollection

      protected CListenerCollection listenerCollection
      the listeners that were added to this dockable
  • Constructor Details

    • AbstractCDockable

      protected AbstractCDockable()
      Creates a new dockable
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • createCommonDockable

      protected abstract CommonDockable createCommonDockable()
      Creates the CommonDockable that is associated with this dockable, called the first time the CommonDockable is required for an operation.
      Returns:
      the new dockable
    • init

      protected void init(CommonDockable dockable)
      Initializes this CDockable.
      Parameters:
      dockable - the representation of this CDockable, not null
    • getClose

      protected CloseActionSource getClose()
      Gets the action source which might show a single action that closes this dockable.
      Returns:
      the close source
    • control

      protected CControlAccess control()
      Gets access to the controller.
      Returns:
      access or null
    • addCDockableStateListener

      public void addCDockableStateListener(CDockableStateListener listener)
      Description copied from interface: CDockable
      Adds a state listener to this dockable, the listener will be informed of changes of this dockable.
      Specified by:
      addCDockableStateListener in interface CDockable
      Parameters:
      listener - the new listener
    • addCDockablePropertyListener

      public void addCDockablePropertyListener(CDockablePropertyListener listener)
      Description copied from interface: CDockable
      Adds a property listener to this dockable, the listener will be informed of changes of this dockable.
      Specified by:
      addCDockablePropertyListener in interface CDockable
      Parameters:
      listener - the new listener
    • addCDockableLocationListener

      public void addCDockableLocationListener(CDockableLocationListener listener)
      Description copied from interface: CDockable
      Adds a listener to this dockable which gets informed if the location or the visibility changes.
      Specified by:
      addCDockableLocationListener in interface CDockable
      Parameters:
      listener - the new listener
    • removeCDockableStateListener

      public void removeCDockableStateListener(CDockableStateListener listener)
      Description copied from interface: CDockable
      Removes a state listener from this dockable.
      Specified by:
      removeCDockableStateListener in interface CDockable
      Parameters:
      listener - the listener to remove
    • removeCDockablePropertyListener

      public void removeCDockablePropertyListener(CDockablePropertyListener listener)
      Description copied from interface: CDockable
      Removes a property listener from this dockable.
      Specified by:
      removeCDockablePropertyListener in interface CDockable
      Parameters:
      listener - the listener to remove
    • removeCDockableLocationListener

      public void removeCDockableLocationListener(CDockableLocationListener listener)
      Description copied from interface: CDockable
      Removes listener from this dockable
      Specified by:
      removeCDockableLocationListener in interface CDockable
      Parameters:
      listener - the listener to remove
    • addFocusListener

      public void addFocusListener(CFocusListener listener)
      Description copied from interface: CDockable
      Adds a focus listener to this dockable. The focus listener gets informed when this dockable gains or loses the focus.
      Specified by:
      addFocusListener in interface CDockable
      Parameters:
      listener - the new listener
    • removeFocusListener

      public void removeFocusListener(CFocusListener listener)
      Description copied from interface: CDockable
      Removes a focus listener from this dockable.
      Specified by:
      removeFocusListener in interface CDockable
      Parameters:
      listener - the listener to remove
    • addKeyboardListener

      public void addKeyboardListener(CKeyboardListener listener)
      Description copied from interface: CDockable
      Adds a keyboard listener to this dockable. The listener gets informed when a key is pressed or released on this dockable.
      Specified by:
      addKeyboardListener in interface CDockable
      Parameters:
      listener - the new listener
    • removeKeyboardListener

      public void removeKeyboardListener(CKeyboardListener listener)
      Description copied from interface: CDockable
      Removes a listener from this dockable.
      Specified by:
      removeKeyboardListener in interface CDockable
      Parameters:
      listener - the listener to remove
    • addDoubleClickListener

      public void addDoubleClickListener(CDoubleClickListener listener)
      Description copied from interface: CDockable
      Adds a new listener to this dockable. The listener gets informed when the mouse is clicked twice on this dockable.
      Specified by:
      addDoubleClickListener in interface CDockable
      Parameters:
      listener - the new listener
    • removeDoubleClickListener

      public void removeDoubleClickListener(CDoubleClickListener listener)
      Description copied from interface: CDockable
      Removes a listener from this dockable.
      Specified by:
      removeDoubleClickListener in interface CDockable
      Parameters:
      listener - the listener to remove
    • addVetoClosingListener

      public void addVetoClosingListener(CVetoClosingListener listener)
      Description copied from interface: CDockable
      Adds 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 a CVetoClosingEvent which contains only this CDockable (even if other dockables are closed at the same time).
      CVetoClosingListeners added to the CControl are invoked before listeners that are added to a CDockable.
      Specified by:
      addVetoClosingListener in interface CDockable
      Parameters:
      listener - the new listener
      See Also:
    • removeVetoClosingListener

      public void removeVetoClosingListener(CVetoClosingListener listener)
      Description copied from interface: CDockable
      Removes listener from this CDockable.
      Specified by:
      removeVetoClosingListener in interface CDockable
      Parameters:
      listener - the listener to remove
    • stateListeners

      @Deprecated protected CDockableStateListener[] stateListeners()
      Deprecated.
      subclasses should use CListenerCollection.getCDockableStateListener() of listenerCollection if they want to fire an event
      Gets the list of state listeners.
      Returns:
      the stateListeners
    • propertyListeners

      @Deprecated protected CDockablePropertyListener[] propertyListeners()
      Deprecated.
      subclasses should use CListenerCollection.getCDockablePropertyListener() of listenerCollection if they want to fire an event
      Gets the list of property listeners.
      Returns:
      the stateListeners
    • setVisible

      public void setVisible(boolean visible)
      Description copied from interface: CDockable
      Shows or hides this CDockable. If this CDockable is not visible and is made visible, then the framework tries to set its location at the last known position.
      Subclasses should call CControlAccess.show(CDockable) or CControlAccess.hide(CDockable).
      Specified by:
      setVisible in interface CDockable
      Parameters:
      visible - the new visibility state
      See Also:
    • isVisible

      public boolean isVisible()
      Description copied from interface: CDockable
      Tells whether this CDockable is currently visible or not. Visibility means that this CDockable is in the tree structure of DockingFrames and has a parent. Being in the structure does not imply being visible on the screen: If some JFrame is not shown, or some DockStation not properly added to a parent component, then a visible CDockable can be invisible for the user. For CDockables that are also root-CStation this method will always return true.
      Clients interested in whether the user can actually see this dockable should call CDockable.isShowing().
      Subclasses should return the result of CControlAccess.isVisible(CDockable).
      Specified by:
      isVisible in interface CDockable
      Returns:
      true if this CDockable can be accessed by the user through a graphical user interface.
      See Also:
    • hasParent

      public boolean hasParent()
      Description copied from interface: CDockable
      Tells whether this CDockable has a root station as parent. Having a root station as parent implies CDockable.isVisible(). For root-CStation this method will return false if they do not have a parent, they are not considered to be parents of themselves.
      Subclasses should return the result of CControlAccess.hasParent(CDockable).
      Specified by:
      hasParent in interface CDockable
      Returns:
      true if this dockable has a parent and is in the tree
    • 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: CDockable
      Tells whether this CDockable is currently visible to the user. A CDockable which is not visible, is not dockable visible either. 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:
      isDockableVisible in interface CDockable
      Returns:
      true if the user should be able to see this item
    • isShowing

      public boolean isShowing()
      Description copied from interface: CDockable
      Tells whether this CDockable is currently visible to the user. A CDockable which is not visible, is not showing either. 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 a CDockableLocationListener to this dockable.
      Specified by:
      isShowing in interface CDockable
      Returns:
      true if the user should be able to see this item
      See Also:
    • 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 like CGrid.select to 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

      public void toFront(Component focus)
      Tries to focus this dockable, and then ensures that the Component focus actually gets the focus.
      The behavior of this method is not defined for the case where focus is not a child of this.
      There is no guarantee of success, this methods fails silently if the focus cannot be gained.
      Parameters:
      focus - a child of this dockable, not null
      See Also:
    • setLocation

      public void setLocation(CLocation location)
      Description copied from interface: CDockable
      Sets the location of this CDockable. If this CDockable is visible, than this method will take immediately effect. Otherwise the location will be stored in a cache and read as soon as this CDockable is 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 call CControlAccess.getLocationManager() and CLocationModeManager.setLocation(bibliothek.gui.Dockable, CLocation).
      Specified by:
      setLocation in interface CDockable
      Parameters:
      location - the new location, null is possible, but will not move the CDockable immediately
      See Also:
    • setLocationsAside

      public void setLocationsAside(CDockable dockable)
      Description copied from interface: CDockable
      Sets the location of this CDockable aside dockable in all ExtendedModes. If this Dockable is visible, then it may or may not change its location and ExtendedMode. Note that dockable and this must not be the same object, and that both CDockables must be registered at a CControl.
      Specified by:
      setLocationsAside in interface CDockable
      Parameters:
      dockable - the item whose locations should be copied
    • setLocationsAside

      public boolean setLocationsAside(Filter<CDockable> filter)
      Description copied from interface: CDockable
      Traverses the history of focused CDockables, and selects the newest item with focus and matching filter for calling CDockable.setLocationsAside(CDockable).
      Specified by:
      setLocationsAside in interface CDockable
      Parameters:
      filter - to select a CDockable which did have the focus
      Returns:
      true if an old focused Dockable was found, false if not
    • setLocationsAsideFocused

      public boolean setLocationsAsideFocused()
      Description copied from interface: CDockable
      Searches for the last focused CDockable with the same working area as this, and calls CDockable.setLocationsAside(CDockable) with it.
      Note that if this dockable is visible, then it may or may not change its location. This method should be called before making the dockable visible.
      Specified by:
      setLocationsAsideFocused in interface CDockable
      Returns:
      true if the last focused CDockable was found, false otherwise. If false then no action was performed
    • getBaseLocation

      public CLocation getBaseLocation()
      Description copied from interface: CDockable
      Gets the location of this CDockable. If this CDockable is visible, then a location will always be returned. Otherwise a location will only be returned if it just was set using CDockable.setLocation(CLocation).
      Specified by:
      getBaseLocation in interface CDockable
      Returns:
      the location or null
    • getAutoBaseLocation

      public CLocation getAutoBaseLocation(boolean noBackwardsTransformation)
      Description copied from interface: CDockable
      Tries to find out at which location this CDockable may 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 CDockable is associated with a placeholder, then the placeholder information will be completely lost.
      • This CDockable must not be visible and it must be registered at a CControl.
      To be more precise: the location returned by this method may not be the actual location where this dockable appears because this method does not consider all circumstances.
      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 CDockable will appear at the exact location that is returned by this method ignoring any other settings.
      Specified by:
      getAutoBaseLocation in interface CDockable
      Parameters:
      noBackwardsTransformation - if true, then this method should not convert any DockableProperty back to a CLocation, instead it should return null if such a conversion would be necessary. This way the method does return null in any case where information (e.g. placeholders) could be lost due to the limitations of CLocation
      Returns:
      The expected location of this invisible CDockable, this may either be the location that was set by calling CDockable.setLocation(CLocation), the last location of this dockable when it was visible, the default location of the CControl or the default location for the normalized extended mode. A value of null is returned if this CDockable would appear at a random location, is not registered at a CControl or is already visible.
    • setExtendedMode

      public void setExtendedMode(ExtendedMode extendedMode)
      Description copied from interface: CDockable
      Sets how and where this CDockable should be shown. Conflicts with CDockable.isExternalizable(), CDockable.isMaximizable() and CDockable.isMinimizable() will just be ignored. Implementations should call LocationModeManager.setMode(Dockable, ExtendedMode).
      If this dockable is not visible, then it will be made visible in order to apply the extendedMode.
      Specified by:
      setExtendedMode in interface CDockable
      Parameters:
      extendedMode - the size and location
    • getExtendedMode

      public ExtendedMode getExtendedMode()
      Description copied from interface: CDockable
      Gets the size and location of this CDockable. Implementations should return LocationModeManager.getMode(Dockable).
      Specified by:
      getExtendedMode in interface CDockable
      Returns:
      the size and location or null if this CDockable is not part of an CControl. May be null if this dockable is not visible.
    • setGrouping

      public void setGrouping(DockableGrouping grouping)
      Sets an algorithm that defines how this dockable attempts to automatically group itself with other dockables.
      Parameters:
      grouping - the grouping behavior, can be null in which case this dockable does not attempt to group itself. The default value of this property is null.
    • getGrouping

      public DockableGrouping getGrouping()
      Description copied from interface: CDockable
      Gets an algorithm that tells how this CDockable attempts to group itself automatically with other Dockables. The algorithm is able to rewrite the location of this CDockable every time when it is moved to a new location, assuming that no stronger mechanism, or the user, already defined a location.
      Specified by:
      getGrouping in interface CDockable
      Returns:
      the grouping behavior, or null
    • setWorkingArea

      public void setWorkingArea(CStation<?> area)
      Description copied from interface: CDockable
      Sets the parent of this CDockable. This method can be called by the client or indirectly through CDockable.setLocation(CLocation).
      Specified by:
      setWorkingArea in interface CDockable
      Parameters:
      area - the new parent or null
    • getWorkingArea

      public CStation<?> getWorkingArea()
      Description copied from interface: CDockable
      Gets the parent of this CDockable, this should be the same as set by the last call of CDockable.setWorkingArea(CStation).
      Specified by:
      getWorkingArea in interface CDockable
      Returns:
      the parent or null
    • isResizeLocked

      public boolean isResizeLocked()
      Tells whether width and height are locked.
      Returns:
      true if width and height are locked
    • isResizeLockedVertically

      public boolean isResizeLockedVertically()
      Description copied from interface: CDockable
      Tells whether the height of this CDockable should 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 this CDockable.
      Specified by:
      isResizeLockedVertically in interface CDockable
      Returns:
      true if the height of this CDockable should remain the same during resize events of the parent.
    • isResizeLockedHorizontally

      public boolean isResizeLockedHorizontally()
      Description copied from interface: CDockable
      Tells whether the width of this CDockable should 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 this CDockable.
      Specified by:
      isResizeLockedHorizontally in interface CDockable
      Returns:
      true if the width of this CDockable should remain the same during resize events of the parent.
    • setResizeRequest

      public void setResizeRequest(Dimension size, boolean process)
      Tells this CDockable which size it should have. The size will be stored until it is read by getAndClearResizeRequest().
      If process is true, then this method will call CControl.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 this CDockable is not registered at a CControl, then the request will remain unprocessed until this CDockable is registered, and someone calls CControl.handleResizeRequests() on the new owner.
      Parameters:
      size - the new preferred size, can be null to cancel an earlier request
      process - whether to process all pending requests of all CDockable registered at the CControl which is the owner of this. Clients can set this parameter to false and call CControl.handleResizeRequests() manually to process all pending requests.
      See Also:
    • setResizeRequest

      public void setResizeRequest(RequestDimension size, boolean process)
      Tells this CDockable which size it should have. The size will be stored until it is read by getAndClearResizeRequest().
      If process is true, then this method will call CControl.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 this CDockable is not registered at a CControl, then the request will remain unprocessed until this CDockable is registered, and someone calls CControl.handleResizeRequests() on the new owner.
      Parameters:
      size - the new preferred size, can be null to cancel an earlier request
      process - whether to process all pending requests of all CDockable registered at the CControl which is the owner of this. Clients can set this parameter to false and call CControl.handleResizeRequests() manually to process all pending requests.
    • getAndClearResizeRequest

      public RequestDimension getAndClearResizeRequest()
      Description copied from interface: CDockable
      Gets the preferred size of this CDockable. The preferred size will be used to resize this CDockable when CControl.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 time null is returned.
      Specified by:
      getAndClearResizeRequest in interface CDockable
      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 - true if 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 - true if 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 - true if the height of this dockable should be kept as long as possible
    • setEnabled

      public void setEnabled(EnableableItem item, boolean enabled)
      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 the DisablingStrategy.
      Parameters:
      item - what part of this CDockable should be enabled or disabled
      enabled - whether the part should be enabled
    • isEnabled

      public boolean isEnabled(EnableableItem item)
      Description copied from interface: CDockable
      Tells whether a part of this dockable is enabled.
      Specified by:
      isEnabled in interface CDockable
      Parameters:
      item - the part to check
      Returns:
      whether item is enabled, the default result should be true
    • setSticky

      public void setSticky(boolean sticky)
      Description copied from interface: CDockable
      Sets whether this CDockable should remain visible when minimized and without focus.
      Specified by:
      setSticky in interface CDockable
      Parameters:
      sticky - whether to remain visible
    • isSticky

      public boolean isSticky()
      Description copied from interface: CDockable
      Tells whether this CDockable remains visible when minimized and without focus.
      Specified by:
      isSticky in interface CDockable
      Returns:
      true if this remains visible, false otherwise
    • setStickySwitchable

      public void setStickySwitchable(boolean switchable)
      Description copied from interface: CDockable
      Sets whether the user can switch the CDockable.isSticky() property by clicking on a button that is presented by the FlapDockStation.
      Specified by:
      setStickySwitchable in interface CDockable
      Parameters:
      switchable - whether the user is able to switch the hold property
    • isStickySwitchable

      public boolean isStickySwitchable()
      Description copied from interface: CDockable
      Tells whether the CDockable.isSticky() property can be changed by the user by clicking a button that is displayed on the FlapDockStation.
      Specified by:
      isStickySwitchable in interface CDockable
      Returns:
      true if the user is able to switch the property, false otherwise
    • setMinimizedSize

      public void setMinimizedSize(Dimension size)
      Description copied from interface: CDockable
      Sets the size of this CDockable when this CDockable is minimized and on a popup window.
      Specified by:
      setMinimizedSize in interface CDockable
      Parameters:
      size - the size
    • isNormalizeable

      public boolean isNormalizeable()
      Always true, clients should not override this method unless they know exactly what they are doing.
      Specified by:
      isNormalizeable in interface CDockable
      Returns:
      true, unless a subclass requires very special behavior.
    • getMinimizedSize

      public Dimension getMinimizedSize()
      Description copied from interface: CDockable
      Gets the size which is used when this CDockable is minimized and on a popup window. If a value below 0 is set, then the default size is used.
      Specified by:
      getMinimizedSize in interface CDockable
      Returns:
      the size
    • setTitleShown

      public void setTitleShown(boolean shown)
      Tells this CDockable whether to show or to hide its titles.
      Parameters:
      shown - true if titles should be shown, false if they should be hidden.
    • isTitleShown

      public boolean isTitleShown()
      Description copied from interface: CDockable
      Tells whether this CDockable shows its title or not. Note that some DockThemes might override this setting.
      Specified by:
      isTitleShown in interface CDockable
      Returns:
      true if the title is shown, false otherwise.
    • setSingleTabShown

      public void setSingleTabShown(boolean singleTabShown)
      Tells this CDockable whether to show a single tab or not.
      Parameters:
      singleTabShown - true if a single tab should be shown, false otherwise
      See Also:
    • isSingleTabShown

      public boolean isSingleTabShown()
      Description copied from interface: CDockable
      Tells whether a single tab should be shown for this CDockable. Some DockThemes might ignore this setting.
      Specified by:
      isSingleTabShown in interface CDockable
      Returns:
      true if a single tab should be shown, false if not
    • intern

      public CommonDockable intern()
      Gets the intern representation of this dockable.
      Specified by:
      intern in interface CDockable
      Returns:
      the intern representation.
    • setDefaultLocation

      public void setDefaultLocation(ExtendedMode mode, CLocation location)
      Sets the default location for mode mode for 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 that location is valid together with mode.
      Parameters:
      mode - the mode for which to store the default location
      location - the default location or null
    • getDefaultLocation

      public CLocation getDefaultLocation(ExtendedMode mode)
      Gets an earlier set value of setDefaultLocation(ExtendedMode, CLocation).
      Parameters:
      mode - the mode for which to search the default location
      Returns:
      the location or null
    • getDockableUniqueId

      @FrameworkOnly protected String getDockableUniqueId()
      Gets the unique identifier that has been assigned to this CDockable by the CControl. 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

      public CControlAccess getControlAccess()
      Description copied from interface: CDockable
      Gets the control which is responsible for this dockable. Clients should not use this method unless they know exactly what they are doing.
      Specified by:
      getControlAccess in interface CDockable
      Returns:
      the control
    • setControlAccess

      public void setControlAccess(CControlAccess control)
      Description copied from interface: CDockable
      Sets the CControl which is responsible for this CDockable. Subclasses must call CControlAccess.link(CDockable, CDockableAccess) to grant the CControl access to the internal properties of this CDockable. link can also be used to revoke access.
      Specified by:
      setControlAccess in interface CDockable
      Parameters:
      control - the new control or null
    • putAction

      public void putAction(String key, CAction action)
      Exchanges an action of this CDockable. The actions that are associated with this CDockable through 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 the ACTION_KEY_xzy-constants defined in CDockable
      action - the new action, can be null which might force back a default action (that depends on the module that uses key)
    • getAction

      public CAction getAction(String key)
      Description copied from interface: CDockable
      Gets an action which is not added to the title by this CDockable put by another module.
      Specified by:
      getAction in interface CDockable
      Parameters:
      key - the name of the action
      Returns:
      an action or null
    • getColors

      public ColorMap getColors()
      Description copied from interface: CDockable
      Gets a mutable map of colors. Clients can put colors into this map, and the colors will be presented on the screen by various effects.
      Specified by:
      getColors in interface CDockable
      Returns:
      the map, this has always to be the same object
    • getFonts

      public FontMap getFonts()
      Description copied from interface: CDockable
      Gets a mutable map of fonts. Clients can put fonts into this map, and the fonts will be presented on the screen through various effects.
      Specified by:
      getFonts in interface CDockable
      Returns:
      the map, this has always to be the same object
    • getFocusComponent

      public Component getFocusComponent()
      Description copied from interface: CDockable
      Gets the Component which should receive the focus once this CDockable is focused.
      Specified by:
      getFocusComponent in interface CDockable
      Returns:
      the element which should receive the focus, can be null
    • setFocusComponent

      public void setFocusComponent(Component component)
      Sets the Component which should receive the focus when this CDockable is 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 be null, should be a child of this CDockable
    • getParentStation

      public CStation<?> getParentStation()
      Description copied from interface: CDockable
      Searches the first CStation that is a parent of this CDockable.
      Specified by:
      getParentStation in interface CDockable
      Returns:
      the closest station, may be null
    • getControl

      public CControl getControl()
      Description copied from interface: CDockable
      Gets the control which is responsible for this dockable. This property is set as long as this CDockable is registered at a CControl.
      Specified by:
      getControl in interface CDockable
      Returns:
      the control in whose realm this dockable is used, can be null