public class PlottingPanel extends InteractivePanel
InteractivePanel.IADMouseControllerDrawingPanel.ZoomBoxjavax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponentcontainsInteractive, interactive, MOUSE_CLICKED, MOUSE_DRAGGED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED, mouseAction, mouseEventadjustableGutter, antialiasShapeOn, antialiasTextOn, autoscaleMargin, autoscaleX, autoscaleY, bgColor, blMessageBox, BOTTOM_LEFT, BOTTOM_RIGHT, bottomGutter, bottomGutterPreferred, brMessageBox, clipAtGutter, coordinateStrBuilder, customInspector, decimalFormat, dimensionSetter, drawableList, enableZoom, fixedPixelPerUnit, glassPanel, glassPanelLayout, height, leftGutter, leftGutterPreferred, mouseController, offscreenImage, optionController, pixelMatrix, pixelTransform, popupmenu, propertiesItem, rightGutter, rightGutterPreferred, scaleItem, scientificFormat, showCoordinates, snapshotItem, squareAspect, tlMessageBox, TOP_LEFT, TOP_RIGHT, topGutter, topGutterPreferred, trMessageBox, validImage, viewRect, width, workingImage, xceil, xfloor, xMarginPercentage, xmax, xmaxPreferred, xmin, xminPreferred, xPixPerUnit, yceil, yfloor, yMarginPercentage, ymax, ymaxPreferred, ymin, yminPreferred, yPixPerUnit, zoomBox, zoomInItem, zoomMode, zoomOutItemaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
PlottingPanel(int _xAxisType,
int _yAxisType)
Constructs a new PlottingPanel that uses the given X axis type and Y axis
type.
|
PlottingPanel(java.lang.String xlabel,
java.lang.String ylabel,
java.lang.String plotTitle)
Constructs a new PlottingPanel that uses the given X axis label, Y axis
label, and plot title.
|
PlottingPanel(java.lang.String xlabel,
java.lang.String ylabel,
java.lang.String plotTitle,
int xAxisType,
int yAxisType)
Constructs a new PlottingPanel with cartesian axes that use the given X axis label, Y axis
label, and plot title.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeGutters()
Computes the size of the gutters using a Dimensioned object.
|
DrawableAxes |
getAxes()
Gets the axes.
|
Interactive |
getInteractive()
Gets the interactive drawable that was accessed by the last mouse event.
|
static XML.ObjectLoader |
getLoader()
Returns an XML.ObjectLoader to save and load object data.
|
java.awt.geom.AffineTransform |
getPixelTransform()
Gets the affine transformation that converts from world to pixel coordinates.
|
boolean |
isLogScaleX()
Gets the logScaleX value.
|
boolean |
isLogScaleY()
Gets the logScaleY value.
|
protected void |
paintFirst(java.awt.Graphics g)
Paints before the panel iterates through its list of Drawables.
|
double |
pixToX(int pix)
Converts pixel to x world units.
|
double |
pixToY(int pix)
Converts pixel to x world units.
|
void |
recomputeTransform()
Recomputes the pixel transforamtion based on the current minimum and maximum values and the gutters.
|
void |
setAxes(DrawableAxes _axes)
Sets the axes.
|
void |
setAxesVisible(boolean isVisible)
Sets the visibility of the axes.
|
void |
setCartesian(java.lang.String xLabel,
java.lang.String yLabel,
java.lang.String plotTitle)
Converts this panel to cartesian coordinates.
|
void |
setLogScale(boolean _logScaleX,
boolean _logScaleY)
Sets Cartesian axes to log scale.
|
void |
setLogScaleX(boolean _logScaleX)
Sets Cartesian x-axes to log scale.
|
void |
setLogScaleY(boolean _logScaleY)
Sets Cartesian axes to log scale.
|
void |
setPixelScale()
Calculates min and max values and the affine transformation based on the
current size of the panel and the squareAspect boolean.
|
void |
setPolar(java.lang.String plotTitle,
double deltaR)
Converts this panel to polar coordinates
|
void |
setTitle(java.lang.String title)
Sets the title.
|
void |
setTitle(java.lang.String title,
java.lang.String font_name)
Sets the title and font.
|
void |
setXLabel(java.lang.String label)
Sets the label for the X (horizontal) axis.
|
void |
setXLabel(java.lang.String label,
java.lang.String font_name)
Sets the label and font for the X (horizontal) axis.
|
void |
setYLabel(java.lang.String label)
Sets the label for the Y (vertical) axis.
|
void |
setYLabel(java.lang.String label,
java.lang.String font_name)
Sets the label and font for the Y (vertical) axis.
|
int |
xToPix(double x)
Converts x from world to pixel units.
|
int |
yToPix(double y)
Converts y from world to pixel units.
|
addDrawable, clear, getCurrentDraggable, getMouseAction, getMouseButton, getMouseClickCount, getMouseIntX, getMouseIntY, getMouseX, getMouseY, handleMouseAction, saveMouseEvent, setInteractiveMouseHandler, setShowCoordinatesactionPerformed, addDrawables, buildPopupmenu, checkWorkingImage, enableInspector, findViewRect, getAspectRatio, getBottomGutter, getCoordinateStringBuilder, getDimensionSetter, getDrawables, getDrawables, getGlassPanel, getGutters, getHeight, getImageRatio, getLeftGutter, getMaxPixPerUnit, getMeasure, getObjectOfClass, getPixelMatrix, getPopupMenu, getPreferredXMax, getPreferredXMin, getPreferredYMax, getPreferredYMin, getRightGutter, getScale, getTopGutter, getVideoTool, getViewRect, getWidth, getXMax, getXMin, getXPixPerUnit, getYMax, getYMin, getYPixPerUnit, getZoomBox, hasInspector, hideInspector, invalidateImage, isAdjustableGutter, isAntialiasShapeOn, isAntialiasTextOn, isAutoscaleX, isAutoscaleY, isBuffered, isClipAtGutter, isIconified, isPointInside, isSquareAspect, isZoom, limitAutoscaleX, limitAutoscaleY, measure, paint, paintComponent, paintDrawableList, paintEverything, paintLast, project, refreshGUI, removeDrawable, removeDrawables, removeObjectsOfClass, removeOptionController, render, render, replaceDrawable, resetGutters, scale, scale, scaleX, scaleY, setAdjustableGutter, setAntialiasShapeOn, setAntialiasTextOn, setAutoscaleMargin, setAutoscaleX, setAutoscaleY, setBounds, setBounds, setBuffered, setClipAtGutter, setCoordinateStringBuilder, setCustomInspector, setFontLevel, setGutters, setGutters, setIgnoreRepaint, setMessage, setMessage, setMouseCursor, setPixelsPerUnit, setPopupMenu, setPreferredGutters, setPreferredMinMax, setPreferredMinMaxX, setPreferredMinMaxY, setSquareAspect, setVideoTool, setVisible, setXMarginPercentage, setYMarginPercentage, setZoom, showInspector, snapshot, zoomIn, zoomOutgetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, hide, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic PlottingPanel(java.lang.String xlabel,
java.lang.String ylabel,
java.lang.String plotTitle)
xlabel - The X axis label.ylabel - The Y axis label.plotTitle - The plot title.public PlottingPanel(int _xAxisType,
int _yAxisType)
_xAxisType - The X axis type._yAxisType - The Y axis type.public PlottingPanel(java.lang.String xlabel,
java.lang.String ylabel,
java.lang.String plotTitle,
int xAxisType,
int yAxisType)
xlabel - The X axis label.ylabel - The Y axis label.plotTitle - The plot title.xAxisType - Description of ParameteryAxisType - Description of Parameterpublic Interactive getInteractive()
getInteractive in class InteractivePanelpublic DrawableAxes getAxes()
public void setAxes(DrawableAxes _axes)
_axes - the new axespublic void setPolar(java.lang.String plotTitle,
double deltaR)
plotTitle - StringdeltaR - doublepublic void setCartesian(java.lang.String xLabel,
java.lang.String yLabel,
java.lang.String plotTitle)
xLabel - StringyLabel - StringplotTitle - Stringpublic void setXLabel(java.lang.String label)
label - the labelpublic void setYLabel(java.lang.String label)
label - the labelpublic void setTitle(java.lang.String title)
title - the titlepublic void setXLabel(java.lang.String label,
java.lang.String font_name)
label - the labelfont_name - the optional new fontpublic void setYLabel(java.lang.String label,
java.lang.String font_name)
label - the labelfont_name - the optional new fontpublic void setTitle(java.lang.String title,
java.lang.String font_name)
title - font_name - the optional new fontpublic void setAxesVisible(boolean isVisible)
isVisible - public void setLogScale(boolean _logScaleX,
boolean _logScaleY)
_logScaleX - The new logScale value_logScaleY - The new logScale valuepublic void setLogScaleX(boolean _logScaleX)
_logScaleX - The new logScale valuepublic boolean isLogScaleX()
public void setLogScaleY(boolean _logScaleY)
_logScaleY - The new logScale valuepublic boolean isLogScaleY()
protected void computeGutters()
computeGutters in class DrawingPanelprotected void paintFirst(java.awt.Graphics g)
paintFirst in class DrawingPanelg - Graphicspublic double pixToX(int pix)
pixToX in class DrawingPanelpix - public int xToPix(double x)
xToPix in class DrawingPanelx - public double pixToY(int pix)
pixToY in class DrawingPanelpix - public int yToPix(double y)
yToPix in class DrawingPanely - public void setPixelScale()
setPixelScale in class DrawingPanelpublic void recomputeTransform()
recomputeTransform in class DrawingPanelpublic java.awt.geom.AffineTransform getPixelTransform()
getPixelTransform in class DrawingPanelpublic static XML.ObjectLoader getLoader()