|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Canvas com.singularsys.jepexamples.applets.AbstractCanvas com.singularsys.jepexamples.applets.ParametrisedCanvas
public class ParametrisedCanvas
This class plots parametrised curves specified by two Jep expressions.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Canvas |
---|
java.awt.Canvas.AccessibleAWTCanvas |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected Jep |
jep
Math parser |
protected Variable |
t
"x" variable |
protected Node |
xExpression
Expression to evaluate |
protected Node |
yExpression
|
Fields inherited from class com.singularsys.jepexamples.applets.AbstractCanvas |
---|
axisColor, bgColor, cenX, cenY, defaultOffX, defaultOffY, defaultScaleX, defaultScaleY, dimensions, gridColor, labelColor, labelFont, lastpos, offX, offY, popup, scaleFont, scaleX, scaleY, showGrid, showScale, showTime, strategy |
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 | |
---|---|
ParametrisedCanvas(Jep jep,
Variable t,
double min,
double max,
int steps)
|
Method Summary | |
---|---|
void |
dump()
Dump the coordinates on the standard output |
Variable |
getT()
|
double |
getTMax()
|
double |
getTMin()
|
int |
getTSteps()
|
Node |
getXExpression()
|
protected double |
getXValue(double tValue)
|
Node |
getYExpression()
|
protected double |
getYValue(double tValue)
|
protected void |
paintCurve(java.awt.Graphics g)
Paints the graph of the function. |
void |
rescaled()
Called when scale, or offset changed Default action is to call repaint |
void |
setRange(double min,
double max,
int steps)
|
void |
setT(Variable t)
|
void |
setXExpression(Node xExpr)
|
void |
setYExpression(Node yExpr)
|
Methods inherited from class com.singularsys.jepexamples.applets.AbstractCanvas |
---|
center, clipX, clipY, componentHidden, componentMoved, componentResized, componentShown, getOffX, getOffY, getPopup, getScaleX, getScaleY, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, paint, paintAxes, paintCanvas, paintGrid, paintScale, paintTime, paintWhite, reset, resetCanvas, resized, setOffset, setScale, shiftCanvas, update, xAbsolute, xRelative, yAbsolute, yRelative, zoomCanvas |
Methods inherited from class java.awt.Canvas |
---|
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, 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, 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, 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, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Jep jep
protected Node xExpression
protected Node yExpression
protected Variable t
Constructor Detail |
---|
public ParametrisedCanvas(Jep jep, Variable t, double min, double max, int steps)
jep
- The Jep instancet
- A Variable object holding the parametermin
- minimum value for parametermax
- maximum value for parametersteps
- number of line segments to drawMethod Detail |
---|
public Variable getT()
public void setT(Variable t)
public Node getXExpression()
public Node getYExpression()
public void setXExpression(Node xExpr)
public void setYExpression(Node yExpr)
public double getTMin()
public double getTMax()
public int getTSteps()
public void setRange(double min, double max, int steps)
protected double getYValue(double tValue)
protected double getXValue(double tValue)
protected void paintCurve(java.awt.Graphics g)
paintCurve
in class AbstractCanvas
public void rescaled()
AbstractCanvas
rescaled
in class AbstractCanvas
public void dump()
dump
in class AbstractCanvas
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |