public class RHComponent
extends java.awt.Component
Modifier and Type | Field and Description |
---|---|
java.awt.Graphics2D |
g2 |
java.awt.image.BufferedImage |
itsBuffImage |
java.awt.Image |
itsImage |
TrackerEngine |
itsTracker |
float |
xScale |
float |
yScale |
Constructor and Description |
---|
RHComponent(TrackerEngine trackEng,
int wid,
int hei)
Standard constructor for the Tracker class.
|
Modifier and Type | Method and Description |
---|---|
double |
getXScale()
returns the x scale for plotting the coordinates
|
double |
getYScale()
returns the x scale for plotting the coordinates
|
java.awt.Rectangle |
orderPointsForRect(java.awt.Point sPt,
java.awt.Point ePt)
creates a Rectangle from two corner Points
|
void |
paint(java.awt.Graphics g)
repaint the whole composition and blit to the JPanel.
|
java.awt.Point |
scale(java.awt.Point aPt)
scales a rectangle from native to window coordinates
|
java.awt.Shape |
scale(java.awt.Shape aShape)
scales a rectangle from native to window coordinates
|
void |
setImage(java.awt.Image anImage)
sets an Image for the Component
|
void |
setScale(java.awt.Dimension aDim)
sets the scale for plotting the coordinates
|
java.awt.Point |
unscale(java.awt.Point aPt)
translates a Point from window to native coordinate
|
java.awt.Shape |
unscale(java.awt.Shape aShape)
translates a Rectangle from window to native coordinate
|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
public java.awt.Graphics2D g2
public TrackerEngine itsTracker
public float xScale
public float yScale
public java.awt.image.BufferedImage itsBuffImage
public java.awt.Image itsImage
public RHComponent(TrackerEngine trackEng, int wid, int hei)
trackEng
- the videotracker that plots to this JPanelpublic void setImage(java.awt.Image anImage) throws java.lang.Exception
anImage
- the Imagejava.lang.Exception
public void setScale(java.awt.Dimension aDim)
aDim
- the native dimensions of the imagepublic double getXScale()
public double getYScale()
public java.awt.Point scale(java.awt.Point aPt)
aPt
- the point to scalepublic java.awt.Point unscale(java.awt.Point aPt)
aPt
- the Pointpublic java.awt.Shape scale(java.awt.Shape aShape)
aShape
- the shape to scalepublic java.awt.Shape unscale(java.awt.Shape aShape)
aShape
- the shapepublic java.awt.Rectangle orderPointsForRect(java.awt.Point sPt, java.awt.Point ePt)
sPt
- start PointePt
- end Pointpublic void paint(java.awt.Graphics g)
paint
in class java.awt.Component
g
- the graphics world of the plotting canvasRH, 2017