public abstract class BasicGraphController extends AbstractGraphController implements DebugListener, ValueListener
Red (johnr) |
Red (eal) |
Modifier and Type | Class and Description |
---|---|
class |
BasicGraphController.OpenBaseClassAction
An action that will open the base class of a subclass or the class
of an instance.
|
static class |
BasicGraphController.SchematicContextMenuFactory
Factory for context menus.
|
class |
BasicGraphController.UnitSolverDialogAction
An action that will create a UnitSolverDialog.
|
Modifier and Type | Field and Description |
---|---|
protected Figure |
_animated
Currently animated state, if any.
|
protected SelectionRenderer |
_animationRenderer
Renderer for animation.
|
protected static ConfigureAction |
_configureAction
The configure action.
|
protected static MenuActionFactory |
_configureMenuFactory
The submenu for configure actions.
|
protected MenuCreator |
_menuCreator
The interactor for creating context sensitive menus on the
graph itself.
|
protected PtolemyMenuFactory |
_menuFactory
The factory belonging to the menu creator.
|
protected BasicGraphController.OpenBaseClassAction |
_openBaseClassAction
The open base class action.
|
protected BasicGraphController.UnitSolverDialogAction |
_unitSolverDialogAction
The UnitSolverDialog action.
|
Constructor and Description |
---|
BasicGraphController()
Create a new basic controller.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_addHotKeys(JGraph jgraph)
Add hot keys to the actions in the given JGraph.
|
protected boolean |
_areThereActiveErrorHighlights()
Return true if there are active highlights.
|
protected void |
_createControllers()
Create the controllers for nodes in this graph.
|
protected ChangeRequest |
_getClearAllErrorHighlightsChangeRequest()
Return a change request that clears all the highlights.
|
protected void |
_initializeInteraction(NamedObjController controller)
Initialize interactions for the specified controller.
|
void |
addToMenuAndToolbar(javax.swing.JMenu menu,
javax.swing.JToolBar toolbar)
Add commands to the specified menu and toolbar, as appropriate
for this controller.
|
void |
clearAllErrorHighlights()
Request a change that clears all the error highlights.
|
void |
clearAnimation()
Clear any animation highlight that might currently be active.
|
void |
event(DebugEvent event)
React to an event.
|
long |
getAnimationDelay()
Get the time delay for animation.
|
Configuration |
getConfiguration()
Return the configuration that has been specified by setConfiguration(),
or null if none.
|
MenuActionFactory |
getConfigureMenuFactory()
Return the configuration menu factory.
|
BasicGraphFrame |
getFrame()
Get the graph frame, or null if there is none.
|
NodeController |
getNodeController(java.lang.Object object)
Return the node controller appropriate for the given object.
|
void |
highlightError(Nameable culprit)
Highlight the specified object and all its containers to
indicate that it is the source of an error.
|
protected void |
initializeInteraction()
Initialize all interaction on the graph pane.
|
void |
message(java.lang.String message)
React to a debug message.
|
void |
setAnimationDelay(long time)
Set the time delay for animation.
|
void |
setConfiguration(Configuration configuration)
Set the configuration.
|
void |
setFigure(java.lang.Object semanticObject,
Figure figure)
Set the figure associated with the given semantic object, and if
that semantic object is Settable, then set up a value listener
so that if its value changes, then the valueChanged() method
is invoked.
|
void |
setFrame(BasicGraphFrame frame)
Set the graph frame.
|
void |
valueChanged(Settable settable)
React to the fact that the specified Settable has changed.
|
addEdge, addEdge, addGraphViewListener, addNode, addNode, addNode, addNode, clear, clearEdge, clearNode, dispatch, drawEdge, drawNode, drawNode, getEdgeController, getFigure, getGraphModel, getGraphPane, getSelectionModel, removeEdge, removeGraphViewListener, removeNode, rerender, rerenderEdge, rerenderNode, setGraphModel, setGraphPane, setSelectionModel
protected Figure _animated
protected SelectionRenderer _animationRenderer
protected static ConfigureAction _configureAction
protected static MenuActionFactory _configureMenuFactory
protected MenuCreator _menuCreator
protected PtolemyMenuFactory _menuFactory
protected BasicGraphController.OpenBaseClassAction _openBaseClassAction
protected BasicGraphController.UnitSolverDialogAction _unitSolverDialogAction
public BasicGraphController()
public void clearAllErrorHighlights()
public void highlightError(Nameable culprit)
culprit
- The culprit.public void addToMenuAndToolbar(javax.swing.JMenu menu, javax.swing.JToolBar toolbar)
menu
- The menu to add to, or null if none.toolbar
- The toolbar to add to, or null if none.public void clearAnimation()
public void event(DebugEvent event)
event
in interface DebugListener
event
- The debug event.public long getAnimationDelay()
setAnimationDelay(long)
public Configuration getConfiguration()
setConfiguration(Configuration)
public MenuActionFactory getConfigureMenuFactory()
public BasicGraphFrame getFrame()
setFrame(BasicGraphFrame)
public NodeController getNodeController(java.lang.Object object)
getNodeController
in interface GraphController
getNodeController
in class AbstractGraphController
object
- The object to get a controller for.public void message(java.lang.String message)
message
in interface DebugListener
message
- The message.public void setAnimationDelay(long time)
time
- Time to sleep, in milliseconds.getAnimationDelay()
public void setConfiguration(Configuration configuration)
GetDocumentationAction.GetDocumentationAction(int)
.
This attribute is used to select the Kepler-specific
KeplerDocumentationAttribute.configuration
- The configuration.getConfiguration()
public void setFigure(java.lang.Object semanticObject, Figure figure)
setFigure
in interface GraphController
setFigure
in class AbstractGraphController
semanticObject
- The semantic object (normally a Locatable).figure
- The figure.public void setFrame(BasicGraphFrame frame)
frame
- The graph frame, or null if there is none.getFrame()
public void valueChanged(Settable settable)
valueChanged
in interface ValueListener
settable
- The object that has changed value.protected void _addHotKeys(JGraph jgraph)
jgraph
- The JGraph to which hot keys are to be added.protected void _createControllers()
protected boolean _areThereActiveErrorHighlights()
protected ChangeRequest _getClearAllErrorHighlightsChangeRequest()
protected void _initializeInteraction(NamedObjController controller)
controller
- The controller for which to initialize interaction.protected void initializeInteraction()
initializeInteraction
in class AbstractGraphController