bibliothek.gui.dock.station
Interface StationDropOperation

All Known Implementing Classes:
FlapDockStation.FlapDropOperation, NoStationDropOperation, SplitDockStation.SplitDropOperation, StackDockStation.StackDropOperation

public interface StationDropOperation

A description of what would happen if the user dropped a Dockable over a DockStation.

Author:
Benjamin Sigg

Method Summary
 void destroy(StationDropOperation next)
          Informs this operation that it is no longer used and that it should release any resources it has acquired.
 void draw()
          Informs this operation that it is the current candidate, and that it should paint markings onto the screen.
 void execute()
          Executes this operation.
 CombinerTarget getCombination()
          Most DockStations will use a Combiner to merge two Dockables into one.
 DisplayerCombinerTarget getDisplayerCombination()
          Some DockStations may use the combining feature of DockableDisplayers (DockableDisplayer.prepareCombination(bibliothek.gui.dock.station.support.CombinerSource, bibliothek.gui.dock.station.support.Enforcement)) to combine some Dockables.
 Dockable getItem()
          Gets the item that will be dropped onto the target.
 DockStation getTarget()
          Gets the target of the operation, this is the DockStation that created this object.
 boolean isMove()
          Tells whether this operation is a move operation.
 

Method Detail

draw

void draw()
Informs this operation that it is the current candidate, and that it should paint markings onto the screen.


destroy

void destroy(StationDropOperation next)
Informs this operation that it is no longer used and that it should release any resources it has acquired.

Parameters:
next - the operation that replaces this operation, can be null

isMove

boolean isMove()
Tells whether this operation is a move operation. A move operation is an operation where the Dockables parent does not change.

Returns:
true if the Dockables parent remains the same

execute

void execute()
Executes this operation. There are no limitations of what the operation may do.

Throws:
IllegalStateException - if this operation was destroied, if the tree of DockElements changed since creation, or if this method was already executed

getTarget

DockStation getTarget()
Gets the target of the operation, this is the DockStation that created this object.

Returns:
the target of the operation, not null

getItem

Dockable getItem()
Gets the item that will be dropped onto the target.

Returns:
the item that will be dropped, not null

getCombination

CombinerTarget getCombination()
Most DockStations will use a Combiner to merge two Dockables into one. This method returns the information that was provided by the Combiner.

Returns:
the combiner information or null, null is always a valid result

getDisplayerCombination

DisplayerCombinerTarget getDisplayerCombination()
Some DockStations may use the combining feature of DockableDisplayers (DockableDisplayer.prepareCombination(bibliothek.gui.dock.station.support.CombinerSource, bibliothek.gui.dock.station.support.Enforcement)) to combine some Dockables. This method returns the information that was provided by the displayer.
If getCombination() does not return null, then the result of CombinerTarget.getDisplayerCombination() and this method should be the same.

Returns:
the information or null, null is always a valid result