|
NCSA Portfolio | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--java.util.Hashtable | +--java.util.Properties | +--ncsa.j3d.ui.PortfolioProperties
This object is derived from the properties object. It is custom tailored to load objects specified in these property files. And allows instantiating of a list of objects. Here a list of objects is defined by appending monotonically increasing numbers (starting at 0) to a string of characters.
e.g. InputSource0=ncsa.j3d.ui.events.KeyPress InputSource1=ncsa.j3d.ui.events.KeyRelease InputSource2=ncsa.j3d.ui.events.MouseDown InputSource3=ncsa.j3d.ui.events.MouseUp InputSource4=ncsa.j3d.ui.events.MouseDrag
Method Summary | |
java.util.Enumeration |
getEnumeration(java.lang.String text)
This is the same as getVector except that an Enumeration is returned. |
java.lang.Object |
getObject(java.lang.String text)
This method searches through the portfolio.properties file and tries to instantiate the object that is identified by the supplied key. |
java.lang.Object[] |
getObjects(java.lang.String text)
This is the same as getVector except that an Object[] is returned. |
java.util.Vector |
getVector(java.lang.String text)
Allows a list of objects to be loaded. |
static PortfolioProperties |
instance()
|
static void |
main(java.lang.String[] args)
This is test of sorts. |
static void |
makeDefault(java.util.Properties p)
This adds/overwrites the following entries in the properties file. |
static void |
reload()
|
static void |
save(java.util.Properties p)
Saves the properties file to portfolio.properties in the current directory. |
Methods inherited from class java.util.Properties |
getProperty,
getProperty,
list,
list,
load,
propertyNames,
save,
setProperty,
store |
Methods inherited from class java.util.Hashtable |
clear,
clone,
contains,
containsKey,
containsValue,
elements,
entrySet,
equals,
get,
hashCode,
isEmpty,
keys,
keySet,
put,
putAll,
remove,
size,
toString,
values |
Methods inherited from class java.lang.Object |
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Method Detail |
public static PortfolioProperties instance()
public static void reload()
public java.util.Vector getVector(java.lang.String text)
e.g.
InputSource4=ncsa.j3d.ui.events.MouseDrag
InputSource3=ncsa.j3d.ui.events.MouseUp
InputSource2=ncsa.j3d.ui.events.MouseDown
InputSource1=ncsa.j3d.ui.events.KeyRelease
InputSource0=ncsa.j3d.ui.events.KeyPress
And supplying "InputSource" as the argument, would return a vector containing these objects with the InputSource0 object in the first entry of the Vector(etc..).
text
- The text portion of the list to load.public java.util.Enumeration getEnumeration(java.lang.String text)
text
- The text portion of the list to load.public java.lang.Object[] getObjects(java.lang.String text)
text
- The text portion of the list to load.public java.lang.Object getObject(java.lang.String text)
text
- The key to search for.public static void main(java.lang.String[] args)
It contains.
InputSource0=ncsa.j3d.ui.events.KeyPress
InputSource1=ncsa.j3d.ui.events.KeyRelease
InputSource2=ncsa.j3d.ui.events.MouseDown
InputSource3=ncsa.j3d.ui.events.MouseUp
InputSource4=ncsa.j3d.ui.events.MouseDrag
ActiveTool=ncsa.j3d.ui.tools.PickTool
InactiveTool0=ncsa.j3d.ui.tools.ViewTool
public static void makeDefault(java.util.Properties p)
InputSource0=ncsa.j3d.ui.events.KeyPress
InputSource1=ncsa.j3d.ui.events.KeyRelease
InputSource2=ncsa.j3d.ui.events.MouseDown
InputSource3=ncsa.j3d.ui.events.MouseUp
InputSource4=ncsa.j3d.ui.events.MouseDrag
ActiveTool=ncsa.j3d.ui.tools.PickTool
InactiveTool0=ncsa.j3d.ui.tools.ViewTool
p
- The Properties object.public static void save(java.util.Properties p)
p
- The portfolio properties object or any properties object.
|
NCSA Portfolio | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |