|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.util.graph.Graph
jcreek.gui.conceptmap.ConceptMapModel
This is and extention of the Graph class that serves as a model (in the model-view-controller paradigm) for the ConceptMapView. This model is made with the assumption that the nodes and edges are VisualEntities and VisualRelations. In addition to this, the model has a selction set that keeps the currently selected entities at all times. This selection set is not saved when the model is serialized.
Field Summary |
Fields inherited from class jcreek.util.graph.Graph |
changeListeners, edgeList, nodeList |
Constructor Summary | |
ConceptMapModel(KnowledgeModel km)
Creates a new, empty ConceptMapModel. |
Method Summary | |
void |
addEdge(Edge edge)
Overrides the addEdge() method in Graph to ensure this is a VisualRelation. |
VisualEntity |
addEntity(Entity entity,
java.awt.Point pos)
Adds an Entity to the ConceptMapModel by creating a VisualEntity that is a wrapper for the Entity, containg the position of it within the model. |
void |
addNode(Node node)
Overrides the addNode() method in Graph to ensure this is a VisualEntity and that all VisualEntities in the graph encapsulates entities in the same KnowledgeModel. |
VisualRelation |
addRelation(Relation rel)
Adds a Relation to the ConceptMap by creating a VisualRealtion that is a wrapper for the Relation. |
boolean |
contains(Entity entity)
Returns true if this model has a node representing the given entity. |
boolean |
contains(Relation rel)
Returns true if this model has an edge representing the given relation. |
KnowledgeModel |
getKnowledgeModel()
Returns the KnowledgeModel of this model. |
SelectionSet |
getSelectionSet()
Returns the SelectionSet of the model - i.e. the VisualEntities that are currently marked as being selected. |
VisualEntity |
getVisualEntity(Entity entity)
Returns the VisualEntity that represents the given entity in this model. |
VisualRelation |
getVisualRelation(Relation rel)
Returns the VisualRelation that represents the given relation in this model. |
void |
modelChanged(ModelChangeEvent e)
|
void |
remove()
Removes the ConceptMapModel and unregisteres it with the KnowledgeModel. |
void |
removeEdge(Edge edge)
Remove an edge from the graph. |
void |
removeNode(Node node)
Remove a node from the graph. |
SubModel |
toSubModel()
Returns a Submodel that contains all the entities and relations currently activated in this Concept Map. |
Methods inherited from class jcreek.util.graph.Graph |
addGraphChangeListener, clone, contains, contains, edgeSize, getEdgeIterator, getEdgeIterator, getEdges, getNodeIterator, getNodes, nodeSize, removeGraphChangeListener, toString, triggerEdgeAddedEvent, triggerEdgeChangeEvent, triggerEdgeRemovedEvent, triggerNodeAddedEvent, triggerNodeChangeEvent, triggerNodeRemovedEvent |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ConceptMapModel(KnowledgeModel km)
Method Detail |
public void remove()
public VisualEntity addEntity(Entity entity, java.awt.Point pos)
entity
- The jcreek.representation Entity added to this ConceptMapModelpos
- The initial position of the new VisualEntity.
public VisualRelation addRelation(Relation rel)
public void addNode(Node node)
addNode
in class Graph
node
- The node to add.public void removeNode(Node node)
Graph
removeNode
in class Graph
node
- The node to remove.public VisualEntity getVisualEntity(Entity entity)
public boolean contains(Entity entity)
public void addEdge(Edge edge)
addEdge
in class Graph
edge
- The edge to add.public void removeEdge(Edge edge)
Graph
removeEdge
in class Graph
edge
- The edge to remove.public VisualRelation getVisualRelation(Relation rel)
public boolean contains(Relation rel)
public SelectionSet getSelectionSet()
public KnowledgeModel getKnowledgeModel()
getKnowledgeModel
in interface Context
public void modelChanged(ModelChangeEvent e)
modelChanged
in interface ModelChangeListener
public SubModel toSubModel()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |