bibliothek.gui.dock.station.split
Class SplitDropOperation

java.lang.Object
  extended by bibliothek.gui.dock.station.split.SplitDropOperation
All Implemented Interfaces:
StationDropOperation

public class SplitDropOperation
extends Object
implements StationDropOperation

Implementation of StationDropOperation.

Author:
Benjamin Sigg

Constructor Summary
SplitDropOperation(SplitDockAccess access, PutInfo putInfo, StationDropItem item, boolean move)
          Creates a new operation.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitDropOperation

public SplitDropOperation(SplitDockAccess access,
                          PutInfo putInfo,
                          StationDropItem item,
                          boolean move)
Creates a new operation.

Parameters:
access - access to the internal functions of a SplitDockStation
putInfo - the desired location of the dropped Dockable.
item - detailed information about the ongoing drag and drop operation
move - whether this operation is a move operation or not
Method Detail

isMove

public boolean isMove()
Description copied from interface: StationDropOperation
Tells whether this operation is a move operation. A move operation is an operation where the Dockables parent does not change.

Specified by:
isMove in interface StationDropOperation
Returns:
true if the Dockables parent remains the same

draw

public void draw()
Description copied from interface: StationDropOperation
Informs this operation that it is the current candidate, and that it should paint markings onto the screen.

Specified by:
draw in interface StationDropOperation

destroy

public void destroy(StationDropOperation next)
Description copied from interface: StationDropOperation
Informs this operation that it is no longer used and that it should release any resources it has acquired.

Specified by:
destroy in interface StationDropOperation
Parameters:
next - the operation that replaces this operation, can be null

getTarget

public DockStation getTarget()
Description copied from interface: StationDropOperation
Gets the target of the operation, this is the DockStation that created this object.

Specified by:
getTarget in interface StationDropOperation
Returns:
the target of the operation, not null

getItem

public Dockable getItem()
Description copied from interface: StationDropOperation
Gets the item that will be dropped onto the target.

Specified by:
getItem in interface StationDropOperation
Returns:
the item that will be dropped, not null

getCombination

public CombinerTarget getCombination()
Description copied from interface: StationDropOperation
Most DockStations will use a Combiner to merge two Dockables into one. This method returns the information that was provided by the Combiner.

Specified by:
getCombination in interface StationDropOperation
Returns:
the combiner information or null, null is always a valid result

getDisplayerCombination

public DisplayerCombinerTarget getDisplayerCombination()
Description copied from interface: StationDropOperation
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 StationDropOperation.getCombination() does not return null, then the result of CombinerTarget.getDisplayerCombination() and this method should be the same.

Specified by:
getDisplayerCombination in interface StationDropOperation
Returns:
the information or null, null is always a valid result

execute

public void execute()
Description copied from interface: StationDropOperation
Executes this operation. There are no limitations of what the operation may do.

Specified by:
execute in interface StationDropOperation