bibliothek.gui.dock.util.property
Interface PropertyFactory<A>

Type Parameters:
A - the kind of value this strategy handles
All Known Implementing Classes:
ConstantPropertyFactory, DynamicPropertyFactory

public interface PropertyFactory<A>

A strategy to create or store the default value of a PropertyKey.

Author:
Benjamin Sigg

Method Summary
 A getDefault(PropertyKey<A> key)
          Asks for the default value that should be used if no DockProperties are available.
 A getDefault(PropertyKey<A> key, DockProperties properties)
          Gets the default value for key.
 

Method Detail

getDefault

A getDefault(PropertyKey<A> key,
             DockProperties properties)
Gets the default value for key. This method is called only once for the combination of key and properties, it can either always return the same object or create a new one every time. The results gets stored as default value in properties.

Parameters:
key - the key for which to get the default
properties - the map in which the default will be stored
Returns:
the new default value, null is valid

getDefault

A getDefault(PropertyKey<A> key)
Asks for the default value that should be used if no DockProperties are available.

Parameters:
key - the key of the property
Returns:
the default value, can be null