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.


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
createPath, getColorName, getGenericType, getMaximum, getMaxSize, getMember, getMinimum, getMinSize, getMode, getScale, getStep, getType, getUnits, shouldTranslateName
 
Methods inherited from class com.threerings.editor.Property
getAnnotation, getAnnotation, getArgumentType, getArgumentTypes, getBoolean, getByte, getChar, getComponentSubtypes, getComponentType, getComponentTypeLabel, getDouble, getFloat, getGenericArgumentType, getGenericArgumentTypes, getGenericComponentType, getInt, getLong, getMessageBundle, getName, getShort, getSubtypes, 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
getClass, notify, notifyAll, wait, wait, wait
 

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


Copyright © 2011. All Rights Reserved.