|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.cke.graph.GraphModel
Field Summary | |
protected java.beans.PropertyChangeSupport |
changeListeners
List of change listeners. |
double |
hSpacing
|
protected boolean |
suspendChangeNotices
True if we are to not send out change notifications. |
double |
vSpacing
|
Constructor Summary | |
GraphModel()
|
Method Summary | |
void |
addChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to this model. |
boolean |
addEntity(VisualEntity node)
|
boolean |
addEntityList(VertexList nodes)
Add the given list of entities to the graph. |
boolean |
addRelation(VisualRelation relation)
Add a relation to the graph. |
boolean |
addRelationList(RelationList relations)
Add the given list of relations to the graph. |
boolean |
deleteEntityList(VertexList nodes)
Delete the given list of entities from the graph. |
boolean |
deleteRelationList(RelationList edges)
|
VisualEntity |
findVisualEntity(Entity e)
|
VisualRelation |
findVisualRelation(Relation rel)
|
void |
fireChange()
Let all the change listeners know of a recent change in the model data. |
protected void |
fireSelection()
Let all the selection change listeners know of a recent change in the selection of a data object. |
Relation[] |
getActiveRelations(VisualEntity ved)
Return the reference to the entity list contained in this graph. |
VisualRelation[] |
getActiveVisualRelations(VisualEntity ved)
|
VertexList |
getEntities()
Return the reference to the entity list contained in this graph. |
Graph |
getGraph()
|
RelationList |
getRelations()
|
VisualEntity[] |
getSelectedEntities()
Gets the list of the selected entities in the graph. |
void |
markDirty()
Utility method to cause a change event to be fired off to all the listeners. |
boolean |
moveEntityList(VertexList el,
int dx,
int dy)
Moves a list of entities to a new location, given by the dx, dy, dz coordinates. |
boolean |
relationIsActive(VisualRelation vRelation)
|
void |
removeChangeListener(java.beans.PropertyChangeListener listener)
Remove a change listener from the listener list. |
boolean |
removeEntity(Entity e)
|
void |
removeEntity(VisualEntity node)
Remove a node from the model. |
boolean |
removeEntityList(Entity[] nodes)
|
boolean |
removeEntityList(VertexList nodes)
Remove a list of nodes from the model. |
boolean |
removeRelation(Relation rel)
|
boolean |
removeRelation(VisualRelation edgeToRemove)
Remove an relation from the graph. |
boolean |
removeRelationList(Relation[] edges)
|
boolean |
removeRelationList(RelationList edges)
|
void |
replace(Graph grp)
|
void |
selectRelations(boolean state,
RelationList rList)
Mark all of the edges in the graph as selected. |
void |
selectVertices(boolean state,
VertexList vList)
Mark all the entities in the List as selected. |
void |
setSelected(VisualEntity v,
boolean s)
Set the given entity to the selected state given. |
void |
setSelected(VisualRelation e,
boolean s)
Set the given edge to the selected state given. |
protected boolean |
suspendChanges(boolean suspend)
Tells us to suspend sending out change notifications. |
void |
unselectAllEdges()
Mark all of the edges in the graph as unselected. |
void |
unselectAllVertices()
Mark all the entities in the graph as unselected. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected transient java.beans.PropertyChangeSupport changeListeners
protected transient boolean suspendChangeNotices
public double hSpacing
public double vSpacing
Constructor Detail |
public GraphModel()
Method Detail |
public boolean addEntity(VisualEntity node)
addEntity
in interface CreekModel
public boolean addEntityList(VertexList nodes)
addEntityList
in interface CreekModel
nodes
- list of entities to add
public void removeEntity(VisualEntity node)
removeEntity
in interface CreekModel
node
- node to remove
public boolean removeEntity(Entity e)
removeEntity
in interface CreekModel
public boolean removeEntityList(VertexList nodes)
removeEntityList
in interface CreekModel
nodes
- list of nodes to remove
public boolean removeEntityList(Entity[] nodes)
removeEntityList
in interface CreekModel
public boolean deleteEntityList(VertexList nodes)
deleteEntityList
in interface CreekModel
nodes
- list of entities to remove
public VertexList getEntities()
getEntities
in interface CreekModel
public VisualEntity[] getSelectedEntities()
getSelectedEntities
in interface CreekModel
public void selectVertices(boolean state, VertexList vList)
selectVertices
in interface CreekModel
public void setSelected(VisualEntity v, boolean s)
setSelected
in interface CreekModel
v
- entity to select or unselects
- true to mark entity selected, false unselectedpublic void unselectAllVertices()
unselectAllVertices
in interface CreekModel
public VisualEntity findVisualEntity(Entity e)
findVisualEntity
in interface CreekModel
public boolean moveEntityList(VertexList el, int dx, int dy)
moveEntityList
in interface CreekModel
dx
- x position changedy
- y position change
public boolean addRelation(VisualRelation relation)
addRelation
in interface CreekModel
relation
- relation to add to matrix
public boolean addRelationList(RelationList relations)
addRelationList
in interface CreekModel
relations
- list of relations to add
public RelationList getRelations()
getRelations
in interface CreekModel
public boolean removeRelation(VisualRelation edgeToRemove)
removeRelation
in interface CreekModel
edgeToRemove
- the edge to remove from the graph
public boolean removeRelation(Relation rel)
removeRelation
in interface CreekModel
public boolean removeRelationList(RelationList edges)
removeRelationList
in interface CreekModel
public boolean removeRelationList(Relation[] edges)
removeRelationList
in interface CreekModel
public boolean deleteRelationList(RelationList edges)
deleteRelationList
in interface CreekModel
public void setSelected(VisualRelation e, boolean s)
setSelected
in interface CreekModel
e
- edge to select or unselects
- true to mark edge selected, false unselectedpublic void selectRelations(boolean state, RelationList rList)
selectRelations
in interface CreekModel
public void unselectAllEdges()
unselectAllEdges
in interface CreekModel
public VisualRelation findVisualRelation(Relation rel)
findVisualRelation
in interface CreekModel
public boolean relationIsActive(VisualRelation vRelation)
public Relation[] getActiveRelations(VisualEntity ved)
getActiveRelations
in interface CreekModel
public VisualRelation[] getActiveVisualRelations(VisualEntity ved)
public Graph getGraph()
getGraph
in interface CreekModel
public void markDirty()
markDirty
in interface CreekModel
public void addChangeListener(java.beans.PropertyChangeListener listener)
addChangeListener
in interface CreekModel
listener
- new listener to add notification listremoveChangeListener(java.beans.PropertyChangeListener)
public void fireChange()
fireChange
in interface CreekModel
protected void fireSelection()
public void removeChangeListener(java.beans.PropertyChangeListener listener)
removeChangeListener
in interface CreekModel
listener
- listener to remove from notification listaddChangeListener(java.beans.PropertyChangeListener)
protected boolean suspendChanges(boolean suspend)
boolean oldState = suspendChanges( true ); ... suspendChanges( oldState );
suspend
- true to suspend notifications
public void replace(Graph grp)
replace
in interface CreekModel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |