com.togethersoft.openapi.ide.inspector.util.property
Class PropertyMapInspectorProperty

java.lang.Object
  |
  +--java.beans.FeatureDescriptor
        |
        +--com.togethersoft.openapi.ide.inspector.IdeInspectorProperty
              |
              +--com.togethersoft.openapi.ide.inspector.util.property.PropertyMapInspectorProperty
Direct Known Subclasses:
MultipleDirectPropertyMapInspectorProperty, MultiplePropertyMapInspectorProperty

public class PropertyMapInspectorProperty
extends IdeInspectorProperty

Allows to inspect certain property from existing PropertyMap.

Author:
TogetherSoft

Field Summary
 protected final ObjectmyKey
           
 protected final PropertyMapmyPropertyMap
           
 protected booleanmyReadable
           
 protected booleanmyWritable
           

Fields inherited from class com.togethersoft.openapi.ide.inspector.IdeInspectorProperty
MULTI_VALUE_TAG, PROP_VALUE, UNDEFINED_VALUE

Constructor Summary
PropertyMapInspectorProperty(PropertyMap map, Object key, Class valueType)
           Constructs new PropertyMapInspectorProperty without editor class.
PropertyMapInspectorProperty(PropertyMap map, Object key, Class valueType, Class editorClass)
           Constructs new PropertyMapInspectorProperty with an editor class.

Method Summary
 booleancanSetValue(Object value)
           Checks whether it is possible to set new value to this property.
 ObjectgetValue()
           Returns value of property specified by the key in constructor.
 booleanisReadable()
           Checks whether it is possible to read value of this property.
 booleanisWritable()
           Checks whether it is possible to write value to this property.
 voidsetReadable(boolean state)
           Sets new value to readable state.
 voidsetValue(Object value)
           Sets new value to inspected property.
 voidsetWritable(boolean state)
           Sets new value to writable state.

Methods inherited from class com.togethersoft.openapi.ide.inspector.IdeInspectorProperty
addPropertyChangeListener, firePropertyChange, getPropertyEditor, getValueType, removePropertyChangeListener, setPropertyEditor, update

Methods inherited from class java.beans.FeatureDescriptor
getName, setName, getDisplayName, setDisplayName, isExpert, setExpert, isHidden, setHidden, isPreferred, setPreferred, getShortDescription, setShortDescription, setValue, getValue, attributeNames

Methods inherited from class java.lang.Object
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize

Field Detail

myKey

protected final Object myKey

myPropertyMap

protected final PropertyMap myPropertyMap

myReadable

protected boolean myReadable

myWritable

protected boolean myWritable
Constructor Detail

PropertyMapInspectorProperty

public PropertyMapInspectorProperty(PropertyMap map, Object key, Class valueType)
Constructs new PropertyMapInspectorProperty without editor class.
Parameters:
map - PropertyMap which contains property to be inspected
key - Name of this property
valueType - Type of values in PropertyMap

PropertyMapInspectorProperty

public PropertyMapInspectorProperty(PropertyMap map, Object key, Class valueType, Class editorClass)
Constructs new PropertyMapInspectorProperty with an editor class.
Parameters:
map - PropertyMap which contains property to be inspected
key - Name of this property
valueType - Type of values in PropertyMap
editorClass - Class which will be used to edit this property
Method Detail

canSetValue

public boolean canSetValue(Object value)
Checks whether it is possible to set new value to this property.
Parameters:
value - Value to be checked
Returns: true if so, false otherwise

getValue

public Object getValue()
Returns value of property specified by the key in constructor.
Returns: Value of this property

isReadable

public boolean isReadable()
Checks whether it is possible to read value of this property.
Returns: true if so, false otherwise

isWritable

public boolean isWritable()
Checks whether it is possible to write value to this property.
Returns: true if so, false otherwise

setReadable

public void setReadable(boolean state)
Sets new value to readable state.
Parameters:
state

setValue

public void setValue(Object value)
Sets new value to inspected property.
Parameters:
value - New value

setWritable

public void setWritable(boolean state)
Sets new value to writable state.
Parameters:
state

Association Links

to Class com.togethersoft.openapi.util.propertyMap.PropertyMap