|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--jmathlib.Plotter
Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
protected java.util.Vector |
curveArray
a list of curve to be drawn in this Plotter |
protected java.lang.String |
title
plotter title |
protected Axis |
xAxis
x-axis |
protected Axis |
yAxis
y-axis |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
Plotter(Curve curve,
java.lang.String title,
java.awt.Color backGround,
Axis xAxis,
Axis yAxis)
Construct a new plotter |
Method Summary | |
void |
addCurve(Curve curve)
Add the given curve to the list of curves |
java.awt.Insets |
getInsets()
Overriden so as to return (10,10,10,10) |
void |
paint(java.awt.Graphics g)
awt.Component paint method |
void |
redrawBackground()
Forces an overall repainting of the component |
void |
removeAllCurves()
Remove all curves from this plotter's list of curves |
void |
setRepaintAllMode(boolean repaintAll)
Set rendering policy ; |
void |
setTitle(java.lang.String title,
java.awt.Color titleColor)
Set this plotter's title |
void |
setXAxis(Axis axis)
Set X-axis to the given Axis |
void |
setYAxis(Axis axis)
Set Y-axis to the given Axis |
double[] |
toGraphCoordinates(java.awt.Point m)
Converts mouse-coordinates to graph-coordinates |
java.awt.Point |
toMouseCoordinates(double[] c)
Converts graph-coordinates to mouse-coordinates |
void |
update(java.awt.Graphics g)
Overriden so as to avoid use of double-buffering ; simply call paint(g) w/o repainting the background, except if it's called from redrawBackground. |
Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.Vector curveArray
protected Axis xAxis
protected Axis yAxis
protected java.lang.String title
Constructor Detail |
public Plotter(Curve curve, java.lang.String title, java.awt.Color backGround, Axis xAxis, Axis yAxis)
curve
- the first curve ; can be nullbackGround
- the backGround colorxAxis
- the x-axisyAxis
- the y-axisMethod Detail |
public java.awt.Insets getInsets()
getInsets
in class java.awt.Container
public void addCurve(Curve curve)
public void removeAllCurves()
public void setXAxis(Axis axis)
public void setYAxis(Axis axis)
public void setTitle(java.lang.String title, java.awt.Color titleColor)
public java.awt.Point toMouseCoordinates(double[] c)
c
- the graph-coordinate of the point to be convertedpublic double[] toGraphCoordinates(java.awt.Point m)
m
- a Point encapsulating mouse-coordinatespublic void setRepaintAllMode(boolean repaintAll)
repaintAll
- If true, every call to repaint() yields an overall repainting of the component ;
Otherwise, only points that have not been drawn yet get painted (so as to speed up intermediate rendering)public void redrawBackground()
public void update(java.awt.Graphics g)
update
in class java.awt.Container
public void paint(java.awt.Graphics g)
paint
in class java.awt.Container
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |