. There are special methods for setting attributes
whose values are common built-in types: double
, float
,int
,
boolean
,and char
.
You can query the state of the Appearance by using getAttribute(String)
. If
not attribute has been defined for this key, the special object INHERITED
is returned.
If you wish to remove an attribute value from the key foo, call
setAttribute(foo, Appearance.INHERITED);
Some wiser person will have to tell you when the special object DEFAULT
is returned.
TODO: fire ONE single event that reports all changed attributes
- Author:
- Unknown
Method Summary |
void |
accept(SceneGraphVisitor v)
The accept method for a SceneGraphVisitor. |
void |
addAppearanceListener(AppearanceListener listener)
|
Object |
getAttribute(String key)
|
Object |
getAttribute(String key,
Class type)
|
Set |
getStoredAttributes()
|
void |
removeAppearanceListener(AppearanceListener listener)
|
void |
setAttribute(String key,
boolean value)
|
void |
setAttribute(String key,
char value)
|
void |
setAttribute(String key,
double value)
|
void |
setAttribute(String key,
float value)
|
void |
setAttribute(String key,
int value)
|
void |
setAttribute(String key,
long value)
|
void |
setAttribute(String key,
Object value)
|
void |
setAttribute(String key,
Object value,
Class declaredType)
|
DEFAULT
public static final Object DEFAULT
INHERITED
public static final Object INHERITED
Appearance
public Appearance(String name)
Appearance
public Appearance()
getAttribute
public Object getAttribute(String key)
getAttribute
public Object getAttribute(String key,
Class type)
setAttribute
public void setAttribute(String key,
Object value)
setAttribute
public void setAttribute(String key,
Object value,
Class declaredType)
setAttribute
public void setAttribute(String key,
double value)
setAttribute
public void setAttribute(String key,
float value)
setAttribute
public void setAttribute(String key,
int value)
setAttribute
public void setAttribute(String key,
long value)
setAttribute
public void setAttribute(String key,
boolean value)
setAttribute
public void setAttribute(String key,
char value)
addAppearanceListener
public void addAppearanceListener(AppearanceListener listener)
removeAppearanceListener
public void removeAppearanceListener(AppearanceListener listener)
getStoredAttributes
public Set getStoredAttributes()
accept
public void accept(SceneGraphVisitor v)
- Description copied from class:
SceneGraphNode
- The accept method for a SceneGraphVisitor.
- Overrides:
accept
in class SceneGraphNode