bibliothek.gui.dock.station.support
Class CombinerWrapper

java.lang.Object
  extended by bibliothek.gui.dock.station.support.CombinerWrapper
All Implemented Interfaces:
Combiner

public class CombinerWrapper
extends Object
implements Combiner

A CombinerWrapper encloses a Combiner and uses the combiner as delegate. If the wrapper has no delegate, it uses the DockUI to get a combiner from the current DockTheme.

Author:
Benjamin Sigg

Constructor Summary
CombinerWrapper()
           
 
Method Summary
 Dockable combine(Dockable old, Dockable drop, DockStation parent, PlaceholderMap placeholders)
          Merges the Dockable old and drop into a new Dockable.
 Combiner getDelegate()
          Gets the delegate of this wrapper.
 void setDelegate(Combiner delegate)
          Sets the delegate for this wrapper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CombinerWrapper

public CombinerWrapper()
Method Detail

getDelegate

public Combiner getDelegate()
Gets the delegate of this wrapper.

Returns:
the delegate or null

setDelegate

public void setDelegate(Combiner delegate)
Sets the delegate for this wrapper. The delegate will be used whenever possible.

Parameters:
delegate - the delegate or null if the default combiner should be used

combine

public Dockable combine(Dockable old,
                        Dockable drop,
                        DockStation parent,
                        PlaceholderMap placeholders)
Description copied from interface: Combiner
Merges the Dockable old and drop into a new Dockable. This method may set the DockController of the create element in order to initialize it more efficiently

Specified by:
combine in interface Combiner
Parameters:
old - a Dockable which was sitting on the DockStation parent. The parent of old is currently set to null.
drop - a Dockable that has currently no parent, and that was dragged over old
parent - a DockStation which will become the parent of the result of this method
placeholders - a set of placeholders that were created earlier, not necessarily by a DockStation that was created by this combiner. Might be null.
Returns:
The combination of old and drop