bibliothek.gui.dock.common.intern.station
Class CFlapDockStation

java.lang.Object
  extended by bibliothek.gui.dock.dockable.AbstractDockable
      extended by bibliothek.gui.dock.station.AbstractDockableStation
          extended by bibliothek.gui.dock.FlapDockStation
              extended by bibliothek.gui.dock.common.intern.station.CFlapDockStation
All Implemented Interfaces:
CommonElement, CommonDockStation<FlapDockStation,CFlapDockStation>, DockComponentRoot, DockElement, DockElementRepresentative, PlaceholderListItem<Dockable>, Dockable, DockStation

public class CFlapDockStation
extends FlapDockStation
implements CommonDockStation<FlapDockStation,CFlapDockStation>

An implementation of FlapDockStation that also satisfies the CommonDockStation interface.

Author:
Benjamin Sigg

Nested Class Summary
 
Nested classes/interfaces inherited from class bibliothek.gui.dock.FlapDockStation
FlapDockStation.Direction, FlapDockStation.DockableHandle, FlapDockStation.FlapDropOperation
 
Field Summary
 
Fields inherited from class bibliothek.gui.dock.FlapDockStation
BUTTON_CONTENT, BUTTON_CONTENT_FILTER, BUTTON_TITLE_ID, DISPLAYER_ID, LAYOUT_MANAGER, MINIMUM_SIZE, WINDOW_FACTORY, WINDOW_TITLE_ID
 
Fields inherited from class bibliothek.gui.dock.station.AbstractDockableStation
listeners
 
Constructor Summary
CFlapDockStation(Component expansion, CommonStationDelegate<CFlapDockStation> delegate)
          Creates a new station.
 
Method Summary
 CommonDockable asDockable()
          Returns this if this is an instance of Dockable.
 CFlapDockStation asDockStation()
          Returns this if this is an instance of DockStation.
protected  FlapDockStation.DockableHandle createHandle(Dockable dockable)
          Creates a new wrapper around dockable, the wrapper is used as internal representation of dockable.
 String getConverterID()
          Gets the unique identifier of the DockFactory that should be used by the CommonDockStationFactory to actually write or read the layout.
 CDockable getDockable()
           
 FlapDockStation getDockStation()
          Gets this as S.
 Rectangle getExpansionBounds()
          Gets the rectangle to which a flap-window will be attached.
 String getFactoryID()
          Gets the unique name of the DockFactory which can read and write elements of this type.
 DockStationDropLayer[] getLayers()
          Gets a description of all the areas of the screen where this DockStation can handle a drop event.
Everytime the mouse is moved or released during a drag & drop operation, this method is called for all DockStations.
 DockActionSource[] getSources()
           
 CStation<CFlapDockStation> getStation()
          Gets the model of this station.
 void requestDockTitle(DockTitleRequest request)
          The default behavior of this method is to do nothing.
 
Methods inherited from class bibliothek.gui.dock.FlapDockStation
add, add, addFlapDockStationListener, aside, callDockUiUpdateTheme, canDrag, canReplace, changed, combine, combine, createButtonPane, createFlapWindow, createHoldAction, createRootHandler, drag, drop, drop, drop, fireHoldChanged, getBorderSideSnapSize, getButton, getButtonVersion, getCombiner, getComponent, getCurrentFlapLayoutManager, getDefaultWindowSize, getDirectActionOffers, getDirection, getDisplayerFactory, getDisplayers, getDockable, getDockableCount, getDockableProperty, getFlapLayoutManager, getFlapWindow, getFrontDockable, getHandle, getMinimumSize, getPaint, getPlaceholderMapping, getPlaceholders, getPlaceholders, getPlaceholderStrategy, getTitleVersion, getWindowBorder, getWindowMinSize, getWindowSize, indexOf, init, isAutoDirection, isFlapWindow, isHold, isOverButtons, isSmallButtons, isVisible, move, orientation, prepareDrag, prepareDrop, recreateTitles, remove, remove, removeFlapDockStationListener, replace, replace, selfSetDirection, setAutoDirection, setBorderSideSnapSize, setController, setDefaultWindowSize, setDirection, setDockParent, setFlapLayoutManager, setFrontDockable, setHold, setMinimumSize, setPlaceholders, setPlaceholders, setPlaceholderStrategy, setSmallButtons, setWindowBorder, setWindowMinSize, setWindowSize, updateHold, updateWindowBounds, updateWindowSize
 
Methods inherited from class bibliothek.gui.dock.station.AbstractDockableStation
accept, acceptable, acceptable, addDockStationListener, createTitleIcon, delegate, fireDockablesRepositioned, fireDockablesRepositioned, getIndirectActionOffers, getTheme, isChildShowing, isStationShowing, isStationVisible, removeDockStationListener, requestChildDisplayer, requestChildDockTitle, updateTheme
 
Methods inherited from class bibliothek.gui.dock.dockable.AbstractDockable
accept, accept, addDockableListener, addDockableStateListener, addDockHierarchyListener, addKeyListener, addMouseInputListener, bind, configureDisplayerHints, fireTitleBound, fireTitleExchanged, fireTitleExchanged, fireTitleIconChanged, fireTitleTextChanged, fireTitleTooltipChanged, fireTitleUnbound, getComponentConfiguration, getConfigurableDisplayerHints, getController, getDockableStateListeners, getDockElementObserver, getDockParent, getElement, getGlobalActionOffers, getLocalActionOffers, getPopupLocation, getRootHandler, getTitleIcon, getTitleIconHandling, getTitleText, getTitleToolTip, isDockableShowing, isDockableVisible, isUsedAsTitle, listBoundTitles, removeDockableListener, removeDockableStateListener, removeDockHierarchyListener, removeKeyListener, removeMouseInputListener, requestDisplayer, resetTitleIcon, setActionOffers, setComponentConfiguration, setTitleIcon, setTitleIconHandling, setTitleText, setTitleToolTip, shouldFocus, shouldTransfersFocus, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.DockStation
accept, addDockStationListener, aside, canDrag, canReplace, changed, drag, drop, drop, getController, getDirectActionOffers, getDockable, getDockableCount, getDockableProperty, getFrontDockable, getIndirectActionOffers, getPlaceholderMapping, getPlaceholders, getTheme, isChildShowing, isStationShowing, isStationVisible, isVisible, move, prepareDrag, prepareDrop, removeDockStationListener, replace, replace, requestChildDisplayer, requestChildDockTitle, setController, setFrontDockable, setPlaceholders, updateTheme
 
Methods inherited from interface bibliothek.gui.dock.component.DockComponentRoot
getComponentConfiguration, setComponentConfiguration
 

Constructor Detail

CFlapDockStation

public CFlapDockStation(Component expansion,
                        CommonStationDelegate<CFlapDockStation> delegate)
Creates a new station.

Parameters:
expansion - the Component which should define the size and location of this station, can be null
delegate - offers additional methods required by this station
Method Detail

getFactoryID

public String getFactoryID()
Description copied from interface: DockElement
Gets the unique name of the DockFactory which can read and write elements of this type.

Specified by:
getFactoryID in interface CommonDockStation<FlapDockStation,CFlapDockStation>
Specified by:
getFactoryID in interface DockElement
Overrides:
getFactoryID in class FlapDockStation
Returns:
the id of the factory
See Also:
CommonDockStation.getConverterID()

getConverterID

public String getConverterID()
Description copied from interface: CommonDockStation
Gets the unique identifier of the DockFactory that should be used by the CommonDockStationFactory to actually write or read the layout. Usually the result of this method is the same result as DockElement.getFactoryID() (note: the factory id from the super class).

Specified by:
getConverterID in interface CommonDockStation<FlapDockStation,CFlapDockStation>
Returns:
the unique identifier of a DockFactory. Can be null if CommonDockStation.getFactoryID() does not return CommonDockStationFactory.FACTORY_ID

getDockable

public CDockable getDockable()

getSources

public DockActionSource[] getSources()

getStation

public CStation<CFlapDockStation> getStation()
Description copied from interface: CommonDockStation
Gets the model of this station.

Specified by:
getStation in interface CommonDockStation<FlapDockStation,CFlapDockStation>
Returns:
the model, may not be null

getDockStation

public FlapDockStation getDockStation()
Description copied from interface: CommonDockStation
Gets this as S.

Specified by:
getDockStation in interface CommonDockStation<FlapDockStation,CFlapDockStation>
Returns:
this

asDockStation

public CFlapDockStation asDockStation()
Description copied from interface: DockElement
Returns this if this is an instance of DockStation. Otherwise null is returned.

Specified by:
asDockStation in interface CommonElement
Specified by:
asDockStation in interface CommonDockStation<FlapDockStation,CFlapDockStation>
Specified by:
asDockStation in interface DockElement
Overrides:
asDockStation in class AbstractDockableStation
Returns:
this or null. Must not return null if DockElement.asDockable() already returns null

asDockable

public CommonDockable asDockable()
Description copied from interface: DockElement
Returns this if this is an instance of Dockable. Otherwise null is returned.

Specified by:
asDockable in interface CommonElement
Specified by:
asDockable in interface DockElement
Specified by:
asDockable in interface PlaceholderListItem<Dockable>
Overrides:
asDockable in class AbstractDockable
Returns:
this or null. Must not return null if DockElement.asDockable() already returns null.

getLayers

public DockStationDropLayer[] getLayers()
Description copied from interface: DockStation
Gets a description of all the areas of the screen where this DockStation can handle a drop event.
Everytime the mouse is moved or released during a drag & drop operation, this method is called for all DockStations. The returned DockStationDropLayers are then filtered and ordered, the resulting order defines the order in which the method DockStation.prepareDrop(StationDropItem) is called.

Specified by:
getLayers in interface DockStation
Overrides:
getLayers in class FlapDockStation
Returns:
all the layers of this station, must not be null, must not contain null, must not contain the same entry twice. The array or the DockStationDropLayers may be modified, hence this method should always create new objects.

createHandle

protected FlapDockStation.DockableHandle createHandle(Dockable dockable)
Description copied from class: FlapDockStation
Creates a new wrapper around dockable, the wrapper is used as internal representation of dockable.

Overrides:
createHandle in class FlapDockStation
Parameters:
dockable - the element for which a new wrapper is created
Returns:
the new wrapper, must not be null

getExpansionBounds

public Rectangle getExpansionBounds()
Description copied from class: FlapDockStation
Gets the rectangle to which a flap-window will be attached. The default is a rectangle that lies exactly over this component. The coordinates of the result are relative to the component of this station.

Overrides:
getExpansionBounds in class FlapDockStation
Returns:
the free area near a window

requestDockTitle

public void requestDockTitle(DockTitleRequest request)
Description copied from class: AbstractDockable
The default behavior of this method is to do nothing.

Specified by:
requestDockTitle in interface Dockable
Overrides:
requestDockTitle in class AbstractDockable
Parameters:
request - which title is required. If this Dockable does not have a special rule for the given request it just ignores the call