maspack.properties
Class EditingProperty

java.lang.Object
  extended by maspack.properties.EditingProperty
All Implemented Interfaces:
InheritableProperty, Property

public class EditingProperty
extends java.lang.Object
implements InheritableProperty

Stub property that interfaces to a common property of one or more underlying property hosts.


Field Summary
 
Fields inherited from interface maspack.properties.Property
AutoValue, DEFAULT_DOUBLE, IllegalValue, VoidValue
 
Constructor Summary
EditingProperty(PropTreeCell cell, HostList hostList, boolean isLive)
           
 
Method Summary
static java.util.LinkedList<Property> createProperties(PropTreeCell tree, HostList hostList, boolean isLive)
           
 java.lang.Object get()
          Returns the value associated with this property.
 PropTreeCell getCell()
           
 HasProperties getHost()
          Assuming this is not needed ...
 HostList getHostList()
           
 PropertyInfo getInfo()
          Gets static information about the property.
 PropertyMode getMode()
          Returns the current mode for this property.
 java.lang.String getName()
          Returns the name associated with this Property.
 Range getRange()
          Returns a range that indicates what values are legal for for this property, or null if the property does not have any range limits (i.e., if any value of appropriate type specified to Property.get() is valid.
 boolean isLive()
           
 void set(java.lang.Object value)
          Sets the value associated with this property.
 void setMode(PropertyMode mode)
          Sets the mode for this property.
 void updateValue()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditingProperty

public EditingProperty(PropTreeCell cell,
                       HostList hostList,
                       boolean isLive)
Method Detail

updateValue

public void updateValue()

get

public java.lang.Object get()
Description copied from interface: Property
Returns the value associated with this property. By default, the caller should (defensively) assume that this value is returned by reference, and that modifying it will therefore cause changes within the host.

Specified by:
get in interface Property
Returns:
value object
See Also:
Property.getInfo()

set

public void set(java.lang.Object value)
Description copied from interface: Property
Sets the value associated with this property. This routine will have no effect if the PropertyInfo method isReadOnly returns true.

Specified by:
set in interface Property
Parameters:
value - object containing the value to be set.
See Also:
Property.getInfo()

getRange

public Range getRange()
Description copied from interface: Property
Returns a range that indicates what values are legal for for this property, or null if the property does not have any range limits (i.e., if any value of appropriate type specified to Property.get() is valid.

Specified by:
getRange in interface Property
Returns:
range limits for the property, or null if there are no limits.

getMode

public PropertyMode getMode()
Description copied from interface: InheritableProperty
Returns the current mode for this property.

Specified by:
getMode in interface InheritableProperty
Returns:
current property mode
See Also:
InheritableProperty.setMode(maspack.properties.PropertyMode)

setMode

public void setMode(PropertyMode mode)
Description copied from interface: InheritableProperty
Sets the mode for this property. The mode should be either PropertyMode.Explicit, PropertyMode.Inherited, or PropertyMode.Inactive.

Specified by:
setMode in interface InheritableProperty
Parameters:
mode - new mode for this property.
See Also:
InheritableProperty.getMode()

getName

public java.lang.String getName()
Description copied from interface: Property
Returns the name associated with this Property. This is a convenience routine, since the name can also be obtained using
 getInfo().getName();
 

Specified by:
getName in interface Property
Returns:
name associated with this property

getHost

public HasProperties getHost()
Assuming this is not needed ...

Specified by:
getHost in interface Property
Returns:
host exporting this property

getInfo

public PropertyInfo getInfo()
Description copied from interface: Property
Gets static information about the property.

Specified by:
getInfo in interface Property
Returns:
static property information

getHostList

public HostList getHostList()

isLive

public boolean isLive()

getCell

public PropTreeCell getCell()

createProperties

public static java.util.LinkedList<Property> createProperties(PropTreeCell tree,
                                                              HostList hostList,
                                                              boolean isLive)