com.threerings.editor
Class ArgumentPathProperty

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.editor.Property
          extended by com.threerings.editor.PathProperty
              extended by com.threerings.editor.ArgumentPathProperty
All Implemented Interfaces:
Copyable, Cloneable

public class ArgumentPathProperty
extends PathProperty

Extends PathProperty to read values from and write values to a Map, using the reference object passed to the constructor as a source of default values.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.editor.PathProperty
PathProperty.IndexProperty
 
Field Summary
protected  Object _reference
          The reference object from which we obtain the default values.
 
Fields inherited from class com.threerings.editor.PathProperty
_paths
 
Fields inherited from class com.threerings.editor.Property
_argumentTypes, _configTypes, _genericArgumentTypes, _name
 
Constructor Summary
ArgumentPathProperty(ConfigManager cfgmgr, String name, Object reference, String path)
          Creates a new map property.
 
Method Summary
 Object get(Object object)
          Retrieves the value of the property.
 Object getMemberObject(Object object)
          Returns a reference to the member object (the object to whose member Property.getMember() refers, given the object one would pass to Property.get(java.lang.Object) or Property.set(java.lang.Object, java.lang.Object)).
 void set(Object object, Object value)
          Sets the value of the property.
 
Methods inherited from class com.threerings.editor.PathProperty
coerce, createPath, getColorName, getGenericType, getMaximum, getMaxSize, getMember, getMinimum, getMinSize, getMode, getProperty, getProperty, getScale, getStep, getType, getUnits, setProperty, shouldTranslateName
 
Methods inherited from class com.threerings.editor.Property
addSubtypes, addSubtypes, getAnnotation, getAnnotation, getArgumentType, getArgumentTypes, getBoolean, getByte, getChar, getComponentSubtypes, getComponentType, getComponentTypeLabel, getDouble, getEditorTypes, getFloat, getGenericArgumentType, getGenericArgumentTypes, getGenericComponentType, getInt, getLong, getMessageBundle, getName, getShort, getSubtypes, getSubtypes, getTypeArguments, getTypeArguments, getTypeArguments, getTypeClass, getTypeLabel, getTypeLabel, isAnnotationPresent, isLegalValue, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, toString
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_reference

@Shallow
protected Object _reference
The reference object from which we obtain the default values.

Constructor Detail

ArgumentPathProperty

public ArgumentPathProperty(ConfigManager cfgmgr,
                            String name,
                            Object reference,
                            String path)
                     throws InvalidPathsException
Creates a new map property.

Parameters:
cfgmgr - the config manager to use when resolving references.
name - the name of the property.
reference - the reference object from which we derive our property chains and default values.
path - the path.
Throws:
InvalidPathsException - if the path is invalid.
Method Detail

getMemberObject

public Object getMemberObject(Object object)
Description copied from class: Property
Returns a reference to the member object (the object to whose member Property.getMember() refers, given the object one would pass to Property.get(java.lang.Object) or Property.set(java.lang.Object, java.lang.Object)).

Overrides:
getMemberObject in class PathProperty

get

public Object get(Object object)
Description copied from class: Property
Retrieves the value of the property.

Overrides:
get in class PathProperty

set

public void set(Object object,
                Object value)
Description copied from class: Property
Sets the value of the property.

Overrides:
set in class PathProperty