|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.CanvasPane
diva.canvas.GraphicsPane
diva.graph.GraphPane
ptolemy.vergil.basic.BasicGraphPane
public class BasicGraphPane
A simple graph pane that has an associated Ptolemy model and handles getting the background color from the preferences.
Red (eal) |
Yellow (eal) |
Field Summary | |
---|---|
private static int |
_backgroundWarningCount
Counter to ensure that no more than one message is printed when we fail to find the default preferences in the configuration. |
private java.awt.Color |
_defaultColor
The default color from the configuration. |
private NamedObj |
_entity
The Ptolemy object being displayed. |
Fields inherited from class diva.canvas.GraphicsPane |
---|
_backgroundEventLayer, _backgroundLayer, _foregroundEventLayer, _foregroundLayer, _layers, _overlayLayer |
Constructor Summary | |
---|---|
BasicGraphPane(GraphController controller,
GraphModel model,
NamedObj entity)
Create a pane that updates the background color on each repaint if there is a preference attribute. |
Method Summary | |
---|---|
private void |
_setBackground()
If the model contains local preferences, use that to set the background color. |
void |
repaint()
Override the base class to set the background. |
void |
repaint(DamageRegion damage)
Override the base class to set the background. |
Methods inherited from class diva.graph.GraphPane |
---|
getGraphController, getGraphModel |
Methods inherited from class diva.canvas.GraphicsPane |
---|
_rebuildLayerArray, getBackgroundEventLayer, getBackgroundLayer, getForegroundEventLayer, getForegroundLayer, getOverlayLayer, layersFromBack, layersFromFront, setBackgroundEventLayer, setBackgroundLayer, setForegroundEventLayer, setForegroundLayer, setOverlayLayer |
Methods inherited from class diva.canvas.CanvasPane |
---|
_initNewLayer, _nullifyLayer, dispatchEvent, getCanvas, getParent, getSize, getToolTipText, getTransformContext, isAntialiasing, isEnabled, layers, paint, paint, processLayerEvent, scale, setAntialiasing, setCanvas, setEnabled, setParent, setSize, setSize, setTransform, translate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static int _backgroundWarningCount
private java.awt.Color _defaultColor
private NamedObj _entity
Constructor Detail |
---|
public BasicGraphPane(GraphController controller, GraphModel model, NamedObj entity)
controller
- The controller.model
- The graph model.entity
- The Ptolemy II model being displayed.Method Detail |
---|
public void repaint()
repaint
in interface CanvasComponent
repaint
in class CanvasPane
public void repaint(DamageRegion damage)
repaint
in interface CanvasComponent
repaint
in class CanvasPane
private void _setBackground()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |