Class sunsoft.jws.visual.rt.base.Attribute
All Packages Class Hierarchy This Package Previous Next Index
Class sunsoft.jws.visual.rt.base.Attribute
java.lang.Object
|
+----sunsoft.jws.visual.rt.base.Attribute
- public class Attribute
- extends Object
- implements Cloneable
Storage for a single attribute.
-
Attribute(String, String, Object, int)
- The constructor initializes the value for the attribute.
-
addFlags(int)
-
-
clone()
- Shallow clone for this attribute.
-
flagged(int)
-
-
getDefaultValue()
-
-
getFlags()
-
-
getName()
-
-
getType()
-
-
getValue()
-
-
isModified()
-
-
reset()
- Resets the value to the default
-
setValue(Object)
- Sets the value of the attribute.
Attribute
public Attribute(String name,
String type,
Object defaultValue,
int flags)
- The constructor initializes the value for the attribute.
The initial value of the attribute is set to be the same
as the default value. If the default value is not a simple type, you
may want to set the value again after cloning the default value,
otherwise, directly setting internal members of the value will change
the default value as well.
getName
public String getName()
getType
public String getType()
getDefaultValue
public Object getDefaultValue()
isModified
public boolean isModified()
reset
public void reset()
- Resets the value to the default
getValue
public Object getValue()
setValue
public void setValue(Object value)
- Sets the value of the attribute.
getFlags
public int getFlags()
addFlags
public void addFlags(int flags)
flagged
public boolean flagged(int flags)
clone
public Object clone()
- Shallow clone for this attribute. It's not a deep clone, only the
references to the value and default value are cloned, not the actual
values themselves.
- Overrides:
- clone in class Object
All Packages Class Hierarchy This Package Previous Next Index