bibliothek.gui.dock.util
Class DockProperties

java.lang.Object
  extended by bibliothek.gui.dock.util.DockProperties

public class DockProperties
extends Object

A set of properties that are used at different places all over the framework. No component should expect that there are any entries in this map.

Author:
Benjamin Sigg

Constructor Summary
DockProperties()
           
 
Method Summary
<A> void
addListener(PropertyKey<A> key, DockPropertyListener<A> listener)
          Adds a listener that will be informed whenever the value accessed through key changes.
<A> A
get(PropertyKey<A> key)
          Gets the value accessed by key.
<A> void
removeListener(PropertyKey<A> key, DockPropertyListener<A> listener)
          Removes an earlier added listener.
<A> void
set(PropertyKey<A> key, A value)
          Sets a value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DockProperties

public DockProperties()
Method Detail

set

public <A> void set(PropertyKey<A> key,
                    A value)
Sets a value.

Type Parameters:
A - the type of the value
Parameters:
key - the key to access the value
value - the value, can be null

get

public <A> A get(PropertyKey<A> key)
Gets the value accessed by key.

Type Parameters:
A - the type of the value
Parameters:
key - the key to search
Returns:
the value or null

addListener

public <A> void addListener(PropertyKey<A> key,
                            DockPropertyListener<A> listener)
Adds a listener that will be informed whenever the value accessed through key changes.

Type Parameters:
A - the type of the value
Parameters:
key - the key that accesses the value
listener - the new listener

removeListener

public <A> void removeListener(PropertyKey<A> key,
                               DockPropertyListener<A> listener)
Removes an earlier added listener.

Type Parameters:
A - the type of value observed by the listener
Parameters:
key - the key to access the observed entry
listener - the listener to remove