|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfr.esrf.tangoatk.core.DeviceProperty
public class DeviceProperty
DeviceProperty is a class which is responsible for holding
information about a given property of a given Device. DeviceProperties have
the following characteristics
stored, a presentation
propertychange event is fired, so that the listeners of this property
can update its values.
| Field Summary | |
|---|---|
protected boolean |
editable
|
protected java.lang.String |
name
|
protected java.lang.String[] |
oldValue
|
protected Device |
parent
|
protected java.beans.PropertyChangeSupport |
propChanges
|
protected boolean |
specified
|
protected java.lang.String[] |
value
|
| Constructor Summary | |
|---|---|
DeviceProperty()
Creates a new Property instance,
with empty name ("") and value ([]). |
|
DeviceProperty(Device theParent,
java.lang.String name,
java.lang.String[] value)
Creates a new Property instance. |
|
DeviceProperty(Device theParent,
java.lang.String name,
java.lang.String[] value,
boolean isEditable)
Creates a new Property instance. |
|
| Method Summary | |
|---|---|
void |
addPresentationListener(java.beans.PropertyChangeListener l)
addPresentationListener add a presentation-listener for
this property |
java.lang.String |
getName()
getName returns the name of the property |
java.lang.String |
getStringValue()
getStringValue returns the value of the property as a
String. |
java.lang.String[] |
getValue()
getValue return the value of the property |
java.lang.String |
getVersion()
|
boolean |
isEditable()
isEditable true if this property is editable, else false |
boolean |
isSpecified()
isSpecified returns true if this property's value is
specified, false if not. |
void |
refresh()
Gets the value from database. |
void |
removePresentationListener(java.beans.PropertyChangeListener l)
removePresentationListener remove a presentation-listener
for this property |
void |
setName(java.lang.String s)
setName sets the name of the property |
void |
setSpecified(boolean b)
setSpecified lets you set the specified property of this
property. |
void |
setValue(java.lang.String s)
setValue sets the value of the property, transforming the
String into a String Array, using carriage return as separator
This will not affect the database. |
void |
setValue(java.lang.String[] o)
setValue sets the value of the property
This will not affect the database. |
void |
store()
store asks the Device of this property to
store the property. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
protected java.lang.String[] value
protected java.lang.String[] oldValue
protected boolean editable
protected Device parent
protected boolean specified
protected java.beans.PropertyChangeSupport propChanges
| Constructor Detail |
|---|
public DeviceProperty()
Property instance,
with empty name ("") and value ([]).
This property is editable but has no device associated.
public DeviceProperty(Device theParent,
java.lang.String name,
java.lang.String[] value)
Property instance.
This property is editable.
theParent - the IDevice this property belongs toname - the name of this propertyvalue - the value of this property, specified as a String[]
public DeviceProperty(Device theParent,
java.lang.String name,
java.lang.String[] value,
boolean isEditable)
Property instance.
theParent - the IDevice this property belongs toname - the name of this propertyvalue - the value of this property, specified as a String[]isEditable - true if this property is editable| Method Detail |
|---|
public void addPresentationListener(java.beans.PropertyChangeListener l)
addPresentationListener add a presentation-listener for
this property
l - a PropertyChangeListener valuepublic void removePresentationListener(java.beans.PropertyChangeListener l)
removePresentationListener remove a presentation-listener
for this property
l - a PropertyChangeListener valuepublic void refresh()
public boolean isEditable()
isEditable true if this property is editable, else false
public void setSpecified(boolean b)
setSpecified lets you set the specified property of this
property. Setting it to true means that the value of this
property is meaningfull, false means it's garbage
b - a boolean valuepublic boolean isSpecified()
isSpecified returns true if this property's value is
specified, false if not.
boolean valuepublic void setName(java.lang.String s)
setName sets the name of the property
s - a String valuepublic void setValue(java.lang.String[] o)
setValue sets the value of the property
This will not affect the database. To apply the modification in database
(and in the device), you have to use the store() method
after.
o - a String[] containing the valuepublic void setValue(java.lang.String s)
setValue sets the value of the property, transforming the
String into a String Array, using carriage return as separator
This will not affect the database. To apply the modification in database
(and in the device), you have to use the store() method
after.
o - a String[] containing the valuepublic java.lang.String getName()
getName returns the name of the property
String valuepublic java.lang.String[] getValue()
getValue return the value of the property
String[] valuepublic java.lang.String getStringValue()
getStringValue returns the value of the property as a
String. The separator used is "\n" (new line).
String valuepublic java.lang.String toString()
toString in class java.lang.Objectpublic void store()
store asks the Device of this property to
store the property. This method also results in a propertyChange event
for the presentation property.
public java.lang.String getVersion()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||