Package ptolemy.vergil.ontologies
Class OntologySolverGraphController
- java.lang.Object
-
- diva.graph.AbstractGraphController
-
- ptolemy.vergil.basic.BasicGraphController
-
- ptolemy.vergil.basic.WithIconGraphController
-
- ptolemy.vergil.ontologies.OntologySolverGraphController
-
- All Implemented Interfaces:
GraphController
,DebugListener
,ValueListener
public class OntologySolverGraphController extends WithIconGraphController
A Graph Controller for ontology solver models.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Charles Shelton
- Pt.AcceptedRating:
- Red (cshelton)
- Pt.ProposedRating:
- Red (cshelton)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.vergil.basic.WithIconGraphController
WithIconGraphController.NewPortAction
-
Nested classes/interfaces inherited from class ptolemy.vergil.basic.BasicGraphController
BasicGraphController.OpenBaseClassAction, BasicGraphController.SchematicContextMenuFactory, BasicGraphController.UnitSolverDialogAction
-
-
Field Summary
Fields Modifier and Type Field Description protected AttributeInOntologyController
_attributeController
The controller for attribute objects in the model.protected OntologyEntityController
_ontologyController
The controller for ontologies in the ontology solver model.-
Fields inherited from class ptolemy.vergil.basic.WithIconGraphController
_editIconAction, _portController, _removeIconAction
-
Fields inherited from class ptolemy.vergil.basic.BasicGraphController
_animated, _animationRenderer, _configureAction, _configureMenuFactory, _menuCreator, _menuFactory, _openBaseClassAction, _unitSolverDialogAction
-
-
Constructor Summary
Constructors Constructor Description OntologySolverGraphController()
Create a new ontology graph controller object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_addHotKeys(JGraph jgraph)
Add hot keys to the actions in the given JGraph.protected void
_createControllers()
Initialize all the controller objects for elements in the ontology solver editor.EdgeController
getEdgeController(java.lang.Object object)
Return the edge controller appropriate for the given edge.NodeController
getNodeController(java.lang.Object object)
Return the node controller appropriate for the given node object.protected void
initializeInteraction()
Initialize interaction on the graph pane.void
setConfiguration(Configuration configuration)
Set the configuration.-
Methods inherited from class ptolemy.vergil.basic.WithIconGraphController
getNewPortLocation
-
Methods inherited from class ptolemy.vergil.basic.BasicGraphController
_areThereActiveErrorHighlights, _getClearAllErrorHighlightsChangeRequest, _initializeInteraction, addToMenuAndToolbar, clearAllErrorHighlights, clearAnimation, event, getAnimationDelay, getConfiguration, getConfigureMenuFactory, getFrame, highlightError, message, setAnimationDelay, setFigure, setFrame, valueChanged
-
Methods inherited from class diva.graph.AbstractGraphController
addEdge, addEdge, addGraphViewListener, addNode, addNode, addNode, addNode, clear, clearEdge, clearNode, dispatch, drawEdge, drawNode, drawNode, getFigure, getGraphModel, getGraphPane, getSelectionModel, removeEdge, removeGraphViewListener, removeNode, rerender, rerenderEdge, rerenderNode, setGraphModel, setGraphPane, setSelectionModel
-
-
-
-
Field Detail
-
_attributeController
protected AttributeInOntologyController _attributeController
The controller for attribute objects in the model.
-
_ontologyController
protected OntologyEntityController _ontologyController
The controller for ontologies in the ontology solver model.
-
-
Method Detail
-
getEdgeController
public EdgeController getEdgeController(java.lang.Object object)
Return the edge controller appropriate for the given edge. In the ontology solver editor, there are no edges, so this method returns null.- Specified by:
getEdgeController
in interfaceGraphController
- Specified by:
getEdgeController
in classAbstractGraphController
- Parameters:
object
- The given edge in the ontology solver model editor. No edges exist in the ontology solver model.- Returns:
- null.
-
getNodeController
public NodeController getNodeController(java.lang.Object object)
Return the node controller appropriate for the given node object. In the ontology solver editor, all nodes are ontology model objects or attributes for concept functions or adapter definitions, so the controller is always a OntologyController object or an AttributeInOntologyController.- Specified by:
getNodeController
in interfaceGraphController
- Overrides:
getNodeController
in classBasicGraphController
- Parameters:
object
- The given node in the ontology model editor.- Returns:
- Either a ConceptController object or an AttributeController object.
-
setConfiguration
public void setConfiguration(Configuration configuration)
Set the configuration. This is used by some of the controllers when opening files or URLs.- Overrides:
setConfiguration
in classWithIconGraphController
- Parameters:
configuration
- The configuration.- See Also:
BasicGraphController.getConfiguration()
-
_addHotKeys
protected void _addHotKeys(JGraph jgraph)
Add hot keys to the actions in the given JGraph. For the ontology solver graph controller, add the hot keys for the ontology controller and attribute controller.- Overrides:
_addHotKeys
in classBasicGraphController
- Parameters:
jgraph
- The JGraph to which hot keys are to be added.
-
_createControllers
protected void _createControllers()
Initialize all the controller objects for elements in the ontology solver editor. This consists of a controller for attributes and ontologies. The parent class WithIconGraphController also references a port controller, so we must initialize it here even though the ontology model editor has no visible ports.- Overrides:
_createControllers
in classWithIconGraphController
-
initializeInteraction
protected void initializeInteraction()
Initialize interaction on the graph pane. This method is called by the setGraphPane() method of the superclass AbstractGraphController. This initialization cannot be done in the constructor because the controller does not yet have a reference to its pane at that time.- Overrides:
initializeInteraction
in classWithIconGraphController
-
-