bibliothek.gui.dock.util
Class UIPriorityValue<T>

java.lang.Object
  extended by bibliothek.gui.dock.util.PriorityValue<UIPriorityValue.Value<T>>
      extended by bibliothek.gui.dock.util.UIPriorityValue<T>
Type Parameters:
T - the kind of item this PriorityValue stores

@FrameworkOnly
public class UIPriorityValue<T>
extends PriorityValue<UIPriorityValue.Value<T>>

A PriorityValue that supports working with UISchemes.

Author:
Benjamin Sigg

Nested Class Summary
static interface UIPriorityValue.Value<T>
          Represents a single entry in this map.
 
Constructor Summary
UIPriorityValue()
           
 
Method Summary
 UIScheme<?,?,?> getScheme(Priority priority)
          Gets the scheme that created the entry with priority.
 T getValue()
          Gets the current value of this UIPriorityValue.
 T getValue(Priority priority)
          Gets the current value of UIPriorityValue on level priority.
 boolean isAllScheme()
          Tells whether all entries of this value are either null or are created by an UIScheme.
 boolean set(Priority priority, T value, UIScheme<?,?,?> scheme)
          Sets the value of this using a value that may be derived from scheme.
 
Methods inherited from class bibliothek.gui.dock.util.PriorityValue
get, get, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIPriorityValue

public UIPriorityValue()
Method Detail

set

public boolean set(Priority priority,
                   T value,
                   UIScheme<?,?,?> scheme)
Sets the value of this using a value that may be derived from scheme.

Parameters:
priority - the priority of the value to set
value - the value that is to be set, can be null
scheme - the scheme that created value or null, ignored if value is null
Returns:
true if the value of this scheme changed because of the call to this method

getScheme

public UIScheme<?,?,?> getScheme(Priority priority)
Gets the scheme that created the entry with priority.

Parameters:
priority - the priority of the entry that is queried
Returns:
the scheme that was used to create the value or null

isAllScheme

public boolean isAllScheme()
Tells whether all entries of this value are either null or are created by an UIScheme.

Returns:
true if all entries of this value are null or created

getValue

public T getValue()
Gets the current value of this UIPriorityValue.

Returns:
the current value or null

getValue

public T getValue(Priority priority)
Gets the current value of UIPriorityValue on level priority.

Parameters:
priority - the level to search, not null
Returns:
the value or null