V
- the kind of resources that get handled by this bridgeU
- the kind of values that get the resources of kind V
public class MultiUIBridge<V,U extends UIValue<V>> extends Object implements UIBridge<V,U>
MultiUIBridge
is a collection of UIBridge
s. Each bridge
in the collection is responsible to handle only one resource.Constructor and Description |
---|
MultiUIBridge(UIProperties<V,U,?> manager)
Creates a new
MultiUIBridge . |
Modifier and Type | Method and Description |
---|---|
void |
add(String id,
U uiValue)
Adds a new
UIValue that gets its resource from this bridge. |
UIBridge<V,U> |
getBridge(String id)
Searches the bridge that handles resources with the key
id . |
void |
put(String id,
UIBridge<V,U> bridge)
Specifies a bridge that handles all calls regarding
id . |
void |
remove(String id,
U uiValue)
Removes a value from this bridge.
|
void |
set(String id,
V value,
U uiValue)
Called by the
UIProperties when one resource or UIValue
has been exchanged. |
public MultiUIBridge(UIProperties<V,U,?> manager)
MultiUIBridge
.manager
- the manager from whom this provider will get default
colors when necessarypublic void put(String id, UIBridge<V,U> bridge)
id
.id
- the key of the resource bridge
should handlebridge
- the new bridge or null
public UIBridge<V,U> getBridge(String id)
id
.id
- the key of the resourcesnull
public void add(String id, U uiValue)
UIBridge
UIValue
that gets its resource from this bridge.public void remove(String id, U uiValue)
UIBridge
public void set(String id, V value, U uiValue)
UIBridge
UIProperties
when one resource or UIValue
has been exchanged. Normally an UIBridge
can just
call UIValue.set(Object)
with the argument value
.UIValue
that was not added
to this UIBridge
.