public abstract class GraphPanel extends OutputPanel implements PointClickedListener
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
GraphPanel(TabbedOutputPanel owner)
Default Constructor, creates a new OutputPanel given a TabbedOutputPanel
|
Modifier and Type | Method and Description |
---|---|
boolean |
canPrint()
As of right now all GraphPanels can print.
|
void |
clear()
Clears the displayed data, resets the scale settings to default, and
empties the PlotPanel and PlotState.
|
void |
equilibriumReceived()
Response when a new Equilibrium is available.
|
void |
errorCondition(java.lang.Exception ex)
Required by the PointClickedListener interface.
|
void |
errorCondition(java.lang.String error)
Required by the PointClickedListener interface.
|
void |
exportPostscript()
Exports the PlotPanel to a postscript file.
|
PlotPanel |
getPlotPanel()
Accessor function for the PlotPanel associated with this GraphPanel.
|
PlotState |
getPlotState()
Accessor function for the PlotState associated with this GraphPanel.
|
boolean |
isDirFieldPossible()
Returns whether the PlotPanel allows a direction field.
|
boolean |
isPlotOrbitPossible()
Returns whether the PlotPanel allows a Plot Orbit and Find Eq Points.
|
void |
paint(java.awt.Graphics g)
Paints the GraphPanel, and repaints the PlotPanel.
|
void |
pointClicked(java.awt.geom.Point2D.Double pt)
Action function required by the PointClickedListener interface.
|
void |
print()
Prints the graph, which in turn launches the printing dialog box.
|
void |
setAllAutoScale(boolean autoScaleOn)
This function is called any time auto-scaling is toggled.
|
void |
setAllDirField(boolean selected)
This function is called any time direction fields are enabled/disabled.
|
void |
setAllGrid(boolean gridOn)
This function is called any time the grid lines are toggled.
|
void |
setXLogScale(boolean xLogScaleOn)
This function is called any time the scaling for the horizontal axis is
changed.
|
void |
setYLogScale(boolean yLogScaleOn)
This function is called any time the scaling for the vertical axis is
changed.
|
void |
solutionReceived()
This function is called any time a new solution is to be painted on the
PlotPanel.
|
void |
updateLabelDialog()
This function updates the label dialog with the current labels; it is
called after labels are loaded when the user opens a .ode file.
|
void |
updateScaleDialog()
This function updates the scaling dialog with the current range values;
it is called after ranges are loaded when the user opens a .ode file.
|
void |
updateTool()
This function is called any time the mouse action tool is changed.
|
gainedFocus, getTabName
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public GraphPanel(TabbedOutputPanel owner)
owner
- the TabbedOutputPanel to which the GraphPanel belongspublic PlotPanel getPlotPanel()
public PlotState getPlotState()
public boolean isDirFieldPossible()
public boolean isPlotOrbitPossible()
public void setAllAutoScale(boolean autoScaleOn)
autoScaleOn
- the on/off state of the auto-scaling featurepublic void setAllDirField(boolean selected)
selected
- true if direction fields are enabled, false otherwisepublic void setXLogScale(boolean xLogScaleOn)
xLogScaleOn
- true if the horizontal axis is log-scaledpublic void setYLogScale(boolean yLogScaleOn)
yLogScaleOn
- true if the vertical axis is log-scaledpublic void setAllGrid(boolean gridOn)
gridOn
- true if grid lines are set to onpublic void updateTool()
public void updateLabelDialog()
public void updateScaleDialog()
public boolean canPrint()
canPrint
in class OutputPanel
public void print()
print
in class OutputPanel
public void clear()
clear
in class OutputPanel
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
g
- Graphics object corresponding to panel display.public void exportPostscript()
exportPostscript
in class OutputPanel
public void solutionReceived()
solutionReceived
in class OutputPanel
public void equilibriumReceived()
OutputPanel
equilibriumReceived
in class OutputPanel
public void pointClicked(java.awt.geom.Point2D.Double pt)
pointClicked
in interface PointClickedListener
pt
- the point being clockedpublic void errorCondition(java.lang.Exception ex)
errorCondition
in interface PointClickedListener
ex
- the exception to be handledpublic void errorCondition(java.lang.String error)
errorCondition
in interface PointClickedListener
error
- string describing error condition