bibliothek.gui.dock.common
Class EmptyMultipleCDockableFactory<F extends MultipleCDockable>

java.lang.Object
  extended by bibliothek.gui.dock.common.EmptyMultipleCDockableFactory<F>
Type Parameters:
F - the type of dockable this factory handles.
All Implemented Interfaces:
MultipleCDockableFactory<F,MultipleCDockableLayout>

public abstract class EmptyMultipleCDockableFactory<F extends MultipleCDockable>
extends Object
implements MultipleCDockableFactory<F,MultipleCDockableLayout>

A factory that does not store anything.

Author:
Benjamin Sigg

Constructor Summary
EmptyMultipleCDockableFactory()
           
 
Method Summary
 MultipleCDockableLayout create()
          Creates a new, empty layout.
abstract  F createDockable()
          Creates a new instance of the MultipleCDockable that is represented by this factory.
 F read(MultipleCDockableLayout layout)
          Creates a MultipleCDockable that gets its layout from layout.
 MultipleCDockableLayout write(F dockable)
          Collects all the properties of dockable and writes them into a new MultipleCDockableLayout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyMultipleCDockableFactory

public EmptyMultipleCDockableFactory()
Method Detail

createDockable

public abstract F createDockable()
Creates a new instance of the MultipleCDockable that is represented by this factory.

Returns:
the new dockable, might be null

create

public MultipleCDockableLayout create()
Description copied from interface: MultipleCDockableFactory
Creates a new, empty layout. The contents of the layout will be set using one of the read-methods of MultipleCDockableLayout.

Specified by:
create in interface MultipleCDockableFactory<F extends MultipleCDockable,MultipleCDockableLayout>
Returns:
the new empty layout

read

public F read(MultipleCDockableLayout layout)
Description copied from interface: MultipleCDockableFactory
Creates a MultipleCDockable that gets its layout from layout.

Specified by:
read in interface MultipleCDockableFactory<F extends MultipleCDockable,MultipleCDockableLayout>
Parameters:
layout - the set of properties that can be used to create the new CDockable.
Returns:
the new dockable or null if the layout can't be read

write

public MultipleCDockableLayout write(F dockable)
Description copied from interface: MultipleCDockableFactory
Collects all the properties of dockable and writes them into a new MultipleCDockableLayout.

Specified by:
write in interface MultipleCDockableFactory<F extends MultipleCDockable,MultipleCDockableLayout>
Parameters:
dockable - the element whose properties should be collected
Returns:
the layout that has been written