ClusterPanel
public abstract class Plot
extends java.awt.Component
Modifier and Type | Field | Description |
---|---|---|
protected java.awt.Graphics |
osg |
|
protected int |
umax |
|
protected int |
umin |
|
protected int |
vmax |
|
protected int |
vmin |
|
protected double |
xmax_ |
|
protected double |
xmin_ |
|
protected int |
xPixels |
|
protected double |
ymax_ |
|
protected double |
ymin_ |
|
protected int |
yPixels |
Constructor | Description |
---|---|
Plot() |
Constructor sets default size of the plot
|
Plot(java.awt.Color background,
int xSize,
int ySize) |
Modifier and Type | Method | Description |
---|---|---|
void |
circle(double x1,
double x2,
double y1,
double y2) |
|
void |
clear() |
Clears the plot.
|
void |
floodCircle(double x1,
double x2,
double y1,
double y2) |
|
void |
floodInside(double x1,
double x2,
double y1,
double y2) |
|
java.awt.Dimension |
getDimension(double dx,
double dy) |
Computes the separation in pixels of two points in the world window.
|
abstract void |
paint() |
Classes which inherit from Plot must define this method.
|
void |
paint(java.awt.Graphics g) |
|
void |
plotBox(double x1,
double x2,
double y1,
double y2) |
|
void |
plotLine(double x1,
double y1,
double x2,
double y2) |
|
void |
plotString(java.lang.String s,
double x,
double y) |
|
void |
plotStringCenter(java.lang.String s,
double x,
double y) |
|
void |
setColor(java.lang.String s) |
|
void |
setSize(int x,
int y) |
Sets width and height of plot in pixels.
|
void |
setWindow(double xmin,
double xmax,
double ymin,
double ymax) |
Sets up a mapping from physical units to pixel units.
|
void |
update(java.awt.Graphics g) |
|
int |
xPixel(double x) |
Computes the x pixel value of a point in the world window.
|
int |
yPixel(double y) |
Computes the y pixel value of a point in the world window.
|
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, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
protected int xPixels
protected int yPixels
protected double xmin_
protected double xmax_
protected double ymin_
protected double ymax_
protected int umin
protected int umax
protected int vmin
protected int vmax
protected java.awt.Graphics osg
public Plot()
public Plot(java.awt.Color background, int xSize, int ySize)
public void setSize(int x, int y)
setSize
in class java.awt.Component
x
- the plot width in pixelsy
- the plot height in pixelspublic void setWindow(double xmin, double xmax, double ymin, double ymax)
xmin
- the left edge of the physical windowxmax
- the right edge of the physical windowymin
- the bottom edge of the physical windowymax
- the top edge of the physical windowpublic int xPixel(double x)
x
- the x coordinate of the point in the world windowy
- the y coordinate of the point in the world windowpublic int yPixel(double y)
x
- the x coordinate of the point in the world windowy
- the y coordinate of the point in the world windowpublic java.awt.Dimension getDimension(double dx, double dy)
dx
- the x coordinate difference of the two points in the worlddy
- the y coordinate difference of the two points in the worldpublic abstract void paint()
public void clear()
public void plotLine(double x1, double y1, double x2, double y2)
public void plotString(java.lang.String s, double x, double y)
public void plotStringCenter(java.lang.String s, double x, double y)
public void plotBox(double x1, double x2, double y1, double y2)
public void floodInside(double x1, double x2, double y1, double y2)
public void floodCircle(double x1, double x2, double y1, double y2)
public void circle(double x1, double x2, double y1, double y2)
public void update(java.awt.Graphics g)
update
in class java.awt.Component
public void paint(java.awt.Graphics g)
paint
in class java.awt.Component
public void setColor(java.lang.String s)