|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GraphObject
Base for objects populating graphs. GraphObjects have three
main traits: a name, a owner graph and attributes. Attributes
should be implemented by setting or clearing a bit(s) in an
int. It is recommanded that implementing classes
or children interfaces define constants to represent attributes.
| Field Summary | |
|---|---|
static int |
ATTR_ALL
An attribute mask representing all attributes. |
static int |
ATTR_NONE
An attribute mask representing no attribute. |
| Method Summary | |
|---|---|
void |
clearAttributes(int attributeMask)
Sets one or more attributes of the object. |
int |
getAttributes()
Returns a bitmask of all set attributes. |
Graph |
getGraph()
Gets the owner graph of the object. |
java.lang.String |
getName()
Gets the object's name. |
boolean |
hasAttributes(int attributeMask)
Returns true if all the attributes specified by the bit mask are set. |
void |
setAttributes(int attributeMask)
Sets one or more attributes of the object. |
| Field Detail |
|---|
static final int ATTR_ALL
static final int ATTR_NONE
| Method Detail |
|---|
Graph getGraph()
java.lang.String getName()
void setAttributes(int attributeMask)
setAttributes(ATTR_ONE | ATTR_TWO);
attributeMask - a bit mask of attributes to set.int getAttributes()
void clearAttributes(int attributeMask)
clearAttributes(ATTR_ONE | ATTR_TWO);
attributeMask - a bit mask of attributes to clean.boolean hasAttributes(int attributeMask)
attributeMask - a bit mask of attributes to test.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||