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.

Constructor Index

 o Attribute(String, String, Object, int)
The constructor initializes the value for the attribute.

Method Index

 o addFlags(int)
 o clone()
Shallow clone for this attribute.
 o flagged(int)
 o getDefaultValue()
 o getFlags()
 o getName()
 o getType()
 o getValue()
 o isModified()
 o reset()
Resets the value to the default
 o setValue(Object)
Sets the value of the attribute.

Constructors

 o 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.

Methods

 o getName
  public String getName()
 o getType
  public String getType()
 o getDefaultValue
  public Object getDefaultValue()
 o isModified
  public boolean isModified()
 o reset
  public void reset()
Resets the value to the default
 o getValue
  public Object getValue()
 o setValue
  public void setValue(Object value)
Sets the value of the attribute.
 o getFlags
  public int getFlags()
 o addFlags
  public void addFlags(int flags)
 o flagged
  public boolean flagged(int flags)
 o 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