|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.graph.AbstractGraphController
ptolemy.vergil.basic.BasicGraphController
ptolemy.vergil.basic.WithIconGraphController
public abstract class WithIconGraphController
A base class for Ptolemy II graph controllers for objects that can have icons. This adds to the base class the context menu items "Edit Custom Icon" and "Remove Custom Icon". This also adds a port controller.
Red (johnr) |
Red (eal) |
Nested Class Summary | |
---|---|
class |
WithIconGraphController.NewPortAction
An action to create a new port. |
Nested classes/interfaces inherited from class ptolemy.vergil.basic.BasicGraphController |
---|
BasicGraphController.OpenBaseClassAction, BasicGraphController.SchematicContextMenuFactory, BasicGraphController.UnitSolverDialogAction |
Field Summary | |
---|---|
protected static EditIconAction |
_editIconAction
The edit custom icon action. |
private static double |
_PORT_OFFSET
Offset of ports from the visible border. |
protected NamedObjController |
_portController
The port controller. |
protected static RemoveIconAction |
_removeIconAction
The remove custom icon action. |
Fields inherited from class ptolemy.vergil.basic.BasicGraphController |
---|
_animated, _animationRenderer, _configureAction, _configureMenuFactory, _menuCreator, _menuFactory, _openBaseClassAction, _unitSolverDialogAction |
Constructor Summary | |
---|---|
WithIconGraphController()
Create a new controller. |
Method Summary | |
---|---|
protected void |
_createControllers()
Create the controllers for nodes in this graph. |
private static double[] |
_offsetFigure(double x,
double y,
double xOffset,
double yOffset,
GraphPane pane,
BasicGraphFrame frame)
Offset a figure if another figure is already at that location. |
static double[] |
getNewPortLocation(GraphPane pane,
BasicGraphFrame frame,
IOPort _prototype)
Get a location for a port that hasn't got a location yet. |
protected void |
initializeInteraction()
Initialize all interaction on the graph pane. |
void |
setConfiguration(Configuration configuration)
Set the configuration. |
Methods inherited from class ptolemy.vergil.basic.BasicGraphController |
---|
_addHotKeys, _initializeInteraction, addToMenuAndToolbar, clearAnimation, event, getAnimationDelay, getConfiguration, getConfigureMenuFactory, getFrame, getNodeController, 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, getEdgeController, getFigure, getGraphModel, getGraphPane, getSelectionModel, removeEdge, removeGraphViewListener, removeNode, rerender, rerenderEdge, rerenderNode, setGraphModel, setGraphPane, setSelectionModel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final EditIconAction _editIconAction
protected NamedObjController _portController
protected static final RemoveIconAction _removeIconAction
private static double _PORT_OFFSET
Constructor Detail |
---|
public WithIconGraphController()
Method Detail |
---|
public static double[] getNewPortLocation(GraphPane pane, BasicGraphFrame frame, IOPort _prototype)
pane
- The GraphPane.frame
- The BasicGraphFrame._prototype
- The port.
public void setConfiguration(Configuration configuration)
setConfiguration
in class BasicGraphController
configuration
- The configuration.BasicGraphController.getConfiguration()
protected void _createControllers()
_createControllers
in class BasicGraphController
protected void initializeInteraction()
initializeInteraction
in class BasicGraphController
private static double[] _offsetFigure(double x, double y, double xOffset, double yOffset, GraphPane pane, BasicGraphFrame frame)
x
- The x value of the proposed location.y
- The y value of the proposed location.xOffset
- The x offset to be used if a figure is found.yOffset
- The x offset to be used if a figure is found.pane
- The GraphPane.frame
- The BasicGraphFrame.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |