|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectantsnest.datastructure.DefaultAntNode
antsnest.datastructure.DefaultAntElement
public class DefaultAntElement
Implementation of AntElement
AntElement,
Serialized Form| Constructor Summary | |
|---|---|
DefaultAntElement()
Constructs a new element |
|
DefaultAntElement(Definition definition)
Constructs a new element from a definition |
|
| Method Summary | |
|---|---|
void |
addAttribute(AntAttribute attribute)
Adds an attribute to the end of the node |
void |
addAttribute(AntAttribute attribute,
int position)
Adds an attribute to this node |
void |
addNode(AntNode node,
int position)
Adds a node to this node |
void |
changeAttribute(AntAttribute attribute)
Changes an attribute in the list |
AntNode |
cloneNode(IDPool idPool)
Gets a clone of this node |
void |
fireChange(ChangeEvent event)
Alerts all interested parties that a change has occured |
String |
getID()
Get the ID of this element |
String |
getTaskname()
Get the taskname of this element |
void |
introduceAttributes()
Lets all the node's attributes discover the status of each other |
boolean |
isProperty()
Finds out whether this element is a property |
void |
removeNode(AntNode node)
Removes a node from this node |
void |
removeNode(int position)
Removes a node from this node |
void |
setID(String id)
Set the ID of this element |
void |
setTaskname(String taskname)
Set the taskname of this element |
String |
toString()
Provides a string representation of this element |
| Methods inherited from class antsnest.datastructure.DefaultAntNode |
|---|
addNode, equals, getAttribute, getAttribute, getAttributeSize, getData, getDescription, getIDPool, getName, getNode, getNodeID, getNodeSize, getNodeText, getParent, getType, getTypeAt, indexOfAttribute, indexOfNode, moveAttribute, moveNode, removeAttribute, removeAttribute, setData, setDescription, setIDPool, setName, setNodeID, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface antsnest.datastructure.AntNode |
|---|
addNode, getAttribute, getAttribute, getAttributeSize, getData, getDescription, getIDPool, getName, getNode, getNodeID, getNodeSize, getNodeText, getParent, getType, getTypeAt, indexOfAttribute, indexOfNode, moveAttribute, moveNode, removeAttribute, removeAttribute, setData, setDescription, setIDPool, setName, setNodeID, setParent |
| Constructor Detail |
|---|
public DefaultAntElement()
public DefaultAntElement(Definition definition)
definition - the definition of a task or type| Method Detail |
|---|
public String getID()
getID in interface AntElementpublic void setID(String id)
setID in interface AntElementid - the new IDpublic String getTaskname()
getTaskname in interface AntElementpublic void setTaskname(String taskname)
setTaskname in interface AntElementtaskname - the new tasknamepublic boolean isProperty()
isProperty in interface AntElement
public void addAttribute(AntAttribute attribute,
int position)
addAttribute in interface AntNodeaddAttribute in class DefaultAntNodeattribute - the attribute to addposition - the index to place the attributepublic void addAttribute(AntAttribute attribute)
addAttribute in interface AntNodeaddAttribute in class DefaultAntNodeattribute - the attribute to addpublic void changeAttribute(AntAttribute attribute)
changeAttribute in interface AntNodechangeAttribute in class DefaultAntNodeattribute - the new version of an attribute
public void addNode(AntNode node,
int position)
throws CannotAddNodeException
addNode in interface AntNodeaddNode in class DefaultAntNodenode - the node to addposition - the the index where to place the node
CannotAddNodeException - if the node is not allowed to be addedpublic void removeNode(AntNode node)
removeNode in interface AntNoderemoveNode in class DefaultAntNodenode - the node to removepublic void removeNode(int position)
removeNode in interface AntNoderemoveNode in class DefaultAntNodeposition - the index of the node to removepublic void fireChange(ChangeEvent event)
event - the event that encapsulates information about the changepublic String toString()
toString in class Objectpublic void introduceAttributes()
introduceAttributes in interface AntElementpublic AntNode cloneNode(IDPool idPool)
cloneNode in interface AntNodecloneNode in class DefaultAntNodeidPool - an ID pool to use
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||