|
Extension SDK 10.1.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectoracle.ide.panels.NavigableRegistry
A data and UI registry for Navigables.
Data classes must meet the following requirements in order to be registered successfully:
null.
Copyable.
registerData(String, Class) is called to register a
data class, subsequent calls to createData() will include
the data class in the returned Map. Order of registration
for data classes is not significant.
After registerUI(Navigable) is called to register some UI,
subsequent calls to getNavigables() will include the
Navigable in the returned array. Order of registration for
Navigables is significant; the order of the Navigables in the returned array directly corresponds to the order
in which they were registered. The returned array of Navigables is a copy of the registered Navigables, so any
changes applied to them will not be reflected in the registry.
| Constructor Summary | |
NavigableRegistry()
|
|
| Method Summary | |
java.util.Map |
createData()
Create new instances of all data classes that have been registered and put them in a new Map, which is returned. |
void |
deregisterUI(Navigable navigable)
Deregisters the UI that is specified by the Navigable. |
boolean |
ensureData(java.util.Map map)
Iterates over the keys in data registry and if the map
is missing any keys, then a new instance of the class registered
with the data registry is created and added to the map. |
Navigable[] |
getNavigables()
Returns an array whose contents are based on the Navigable
objects that have been registered. |
void |
registerData(java.lang.String name,
java.lang.Class dataClass)
Registers a data class whose instance is referred to by the specified name. |
void |
registerUI(Navigable navigable)
Registers the UI that is specified by the Navigable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NavigableRegistry()
| Method Detail |
public void registerData(java.lang.String name,
java.lang.Class dataClass)
null.
Copyable.
createData() will include the data class in the
returned Map. Order of registration for data classes is
not significant.
public void registerUI(Navigable navigable)
Navigable.
After this method is called to register some UI, subsequent calls
to getNavigables() will include the Navigable in
the returned array. Order of registration for Navigables
is significant; the order of the Navigables in the
returned array directly corresponds to the order in which they
were registered. The returned array of Navigables is a
copy of the registered Navigables, so any changes applied
to them will not be reflected in the registry.
public void deregisterUI(Navigable navigable)
Navigable.
public java.util.Map createData()
Map, which is returned.
public boolean ensureData(java.util.Map map)
map
is missing any keys, then a new instance of the class registered
with the data registry is created and added to the map.
This method solves the problem of having a half populated Map.
You usually get into this situation when reading the Map
from Disk or other storage. This method will ensure that if any key
is missing, it will be updated with the default values generated from
the default constructor for the data class.
The data registry is populated by registerData(String, Class)
map - The Map which will be sure to contain all keys
in the data registry on exit.
true if any entries were added to map.public Navigable[] getNavigables()
Navigable
objects that have been registered. The returned array contains
copies of the registered Navigables, so that changes to
the ones in the array will not be reflected in the registry.
The order of the returned Navigables is based on the
order of registration through registerUI(Navigable).
|
Extension SDK | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright © 1997, 2004, Oracle. All rights reserved.