public class XYPresenterPanel extends PresenterPanel
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
boolean |
doLabelXOrigin |
boolean |
doLabelYOrigin |
Group |
itsGroup |
int |
labelGap |
boolean |
labelXGrid |
boolean |
labelYGrid |
java.awt.Point |
originPoint |
dashedStroke, drawFrame, fontMetrics, kFrameLook, kOriginLook, strHeight, X, Y, Z
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
XYPresenterPanel()
Standard constructor for the XYPresenterPanel class
|
Modifier and Type | Method and Description |
---|---|
int |
getHLabelPos(double hCoord,
java.lang.String theStr)
returns the horizontal position for the String
|
int |
getSpatialMapLook()
returns the look of the Map
|
int |
getVLabelPos(double vCoord)
returns the horizontal position for the String
|
void |
labelHighX(java.awt.Graphics2D g2d)
plots the high X axis label
|
void |
labelHighY(java.awt.Graphics2D g2d)
plots the high X axis label
|
void |
labelXGridItem(java.awt.Graphics2D g2d,
java.lang.String aStr,
int xPos,
boolean labelTop,
boolean labelBottom)
labels the X axis grid
|
void |
labelYGridItem(java.awt.Graphics2D g2d,
java.lang.String aStr,
int yPos,
boolean labelLeft,
boolean labelRight)
labels the Y axis grid
|
java.awt.Point |
mapSpatialVectorToPanel(double X,
double Y)
returns the coordinates of the point mapped into the panel
|
java.awt.Point |
mapSpatialVectorToPanel(SpatialVector theVector)
returns the coordinates of the point mapped into the panel
|
int |
mapVCoordToPanel(double Y)
returns the horizontal coordinate mapped into the panel
|
int |
mapXCoordToPanel(double X)
returns the horizontal coordinate mapped into the panel
|
void |
paintComponent(java.awt.Graphics g)
paint method
|
void |
plotData(java.awt.Graphics2D g2d,
CaptureVariable theCaps)
plots the coordinates
|
void |
plotGrids(java.awt.Graphics2D g2d)
plots the grids
|
void |
plotGroupToSpatialMap(java.awt.Graphics2D g2d,
Group theGroup)
plots the group of CaptureVariables
|
void |
plotMapFrame(java.awt.Graphics2D g2d)
draws the frame for the map and labels the coordinates
|
void |
plotXGrid(java.awt.Graphics2D g2d)
plots the X axis grid
|
void |
plotXYOriginAxes(java.awt.Graphics2D g2d)
draws the frame for the map and labels the coordinates
|
void |
plotYGrid(java.awt.Graphics2D g2d)
plots the vertical grid
|
void |
setSpatialMapLook(int theLook)
sets the look of the Map
|
void |
showGrids(boolean doGrid)
sets whether the grid lines will be drawn
|
void |
showXGrid(boolean doGrid)
sets whether the horizontal grid will be drawn
|
void |
showYGrid(boolean doGrid)
sets whether the vertical grid will be drawn
|
void |
useData(CaptureVariable theCaps)
draws the frame for the circle and labels the angles
|
void |
useData(Group theGroup)
sets the data to use for the panel
|
void |
useData(NumberVariable theXVar,
NumberVariable theYVar,
boolean connected)
sets the Data and calculates what it needs
|
drawBGImage, drawFrame, getBotLabelPos, getCoordMapRect, getGridSpace3D, getLeftLabelPos, getRightLabelPos, getTopLabelPos, setBGImage, setCoordMapRect, setGrid, setGridSpace3D
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, 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, 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, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, 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, setVisible, unregisterKeyboardAction, update
add, 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, validateTree
action, 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, 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, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public boolean labelXGrid
public boolean labelYGrid
public java.awt.Point originPoint
public boolean doLabelXOrigin
public boolean doLabelYOrigin
public int labelGap
public Group itsGroup
public XYPresenterPanel()
public void useData(NumberVariable theXVar, NumberVariable theYVar, boolean connected) throws java.lang.Exception
theXVar
- the x-coordinate variable to plottheYVar
- the y-coordinate variable to plotjava.lang.Exception
public void useData(CaptureVariable theCaps) throws java.lang.Exception
theCaps
- the CaptureVariable to graphjava.lang.Exception
public void useData(Group theGroup) throws java.lang.Exception
theGroup
- the group of CaptureVariables to plotjava.lang.Exception
public void plotData(java.awt.Graphics2D g2d, CaptureVariable theCaps) throws java.lang.Exception
g2d
- the Graphics2D port to usetheCaps
- the variable containing the captures to plotjava.lang.Exception
public void setSpatialMapLook(int theLook)
theLook
- the specific appearance used for the presenterpublic int getSpatialMapLook()
public int getHLabelPos(double hCoord, java.lang.String theStr)
hCoord
- the horizontal coordinate to map into a panel screen coordinatetheStr
- the label stringpublic int getVLabelPos(double vCoord)
vCoord
- the horizontal coordinate to map into a panel screen coordinatepublic void plotXYOriginAxes(java.awt.Graphics2D g2d)
public void plotMapFrame(java.awt.Graphics2D g2d)
public void showXGrid(boolean doGrid)
doGrid
- specifies whether lines are drawnpublic void showYGrid(boolean doGrid)
doGrid
- specifies whether lines are drawnpublic void showGrids(boolean doGrid)
doGrid
- specifies whether lines are drawnpublic void labelHighX(java.awt.Graphics2D g2d)
public void labelHighY(java.awt.Graphics2D g2d)
public void labelXGridItem(java.awt.Graphics2D g2d, java.lang.String aStr, int xPos, boolean labelTop, boolean labelBottom)
public void labelYGridItem(java.awt.Graphics2D g2d, java.lang.String aStr, int yPos, boolean labelLeft, boolean labelRight)
public int mapXCoordToPanel(double X)
X
- the horizontal coordinate to map into a panel screen coordinatepublic int mapVCoordToPanel(double Y)
Y
- the horizontal coordinate to map into a panel screen coordinatepublic java.awt.Point mapSpatialVectorToPanel(double X, double Y)
X
- the horizontal coordinate to map into a panel screen coordinateY
- the horizontal coordinate to map into a panel screen coordinatepublic java.awt.Point mapSpatialVectorToPanel(SpatialVector theVector)
theVector
- the location to map into panel screen coordspublic void plotXGrid(java.awt.Graphics2D g2d)
public void plotYGrid(java.awt.Graphics2D g2d)
public void plotGrids(java.awt.Graphics2D g2d)
public void plotGroupToSpatialMap(java.awt.Graphics2D g2d, Group theGroup) throws java.lang.Exception
g2d
- the Graphics2D port to usetheGroup
- the Organizer for the data seriesjava.lang.Exception
public void paintComponent(java.awt.Graphics g)
paintComponent
in class PresenterPanel
RH, 2017