|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component net.sourceforge.webcompmath.draw.Drawable net.sourceforge.webcompmath.draw.RiemannArcLength
public class RiemannArcLength
A RiemannArcLength displays segments used in computing the length of a curve. It supports standard functions as well as parametric and polar curves.
Nested Class Summary |
---|
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 int |
lineWidth
The width, in pixels, of the line segments. |
static int |
PARAMETRIC
Type of curve is a parametric curve |
static int |
POLAR
Type of curve is a polar curve |
static int |
STANDARD
Type of curve is a standard function |
Fields inherited from class net.sourceforge.webcompmath.draw.Drawable |
---|
canvas, coords |
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 | |
---|---|
RiemannArcLength()
Construct a RiemannArcLength object that initially has nothing to draw and that is set up to use the default number of intervals, 5. |
|
RiemannArcLength(Function f,
Function f2,
Value i,
int type)
Construct a new RiemannArcLength object |
|
RiemannArcLength(Function f,
Value i,
int type)
Construct a new RiemannArcLength object. |
Method Summary | |
---|---|
void |
compute()
This is generally called by a Controller. |
void |
draw(java.awt.Graphics g,
boolean coordsChanged)
Draw the Riemann arc segments. |
java.awt.Color |
getColor()
Get the current (positive) color used to draw the line segments |
Function |
getFuction()
Returns the function whose arc length is computed. |
Function |
getFuction2()
Returns the second function. |
Value |
getIntervalCount()
Get the number of intervals used. |
int |
getLineWidth()
Get the width, in pixels, of lines that are drawn. |
int |
getType()
Get the type. |
Value |
getValueObject()
Gets a Value object that gives the value of the Riemann arc length |
Value |
getXMax()
Get the max x value |
Value |
getXMin()
Get the min x value |
boolean |
isInverse()
Get whether to display inverse version |
void |
setColor(java.awt.Color c)
Set the color used to draw the line segments. |
void |
setFunction(Function func)
Set the function whose arc length is to be computed. |
void |
setFunction2(Function func)
Set the second function, used to specify the y function when computing the arc length of a parametric curve. |
void |
setIntervalCount(Value c)
Set the interval count (the RiemannArcLength will be redrawn after this function is called). |
void |
setInverse(boolean inverse)
Set whether to show as inverse |
void |
setLineWidth(int width)
Set the width, in pixels, of lines that are drawn. |
void |
setType(int type)
Set the type, one of STANDARD, PARAMETRIC, or POLAR |
void |
setXMax(Value max)
Set the max x value. |
void |
setXMin(Value min)
Set the min x value. |
Methods inherited from class net.sourceforge.webcompmath.draw.Drawable |
---|
getVisible, needsRedraw, setOwnerData, setVisible |
Methods inherited from class java.awt.Component |
---|
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, paint, 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, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int STANDARD
public static final int PARAMETRIC
public static final int POLAR
protected int lineWidth
Constructor Detail |
---|
public RiemannArcLength()
public RiemannArcLength(Function f, Value i, int type)
i
- a Value object representing the number of intervals. If null,
five intervals are used.f
- a Function object used to derive the Riemann arc length. If
null, nothing is drawn.type
- one of STANDARD, PARAMETRIC, or POLARpublic RiemannArcLength(Function f, Function f2, Value i, int type)
f
- a Function object used to derive the Riemann arc length. If
null, nothing is drawn.f2
- the second functioni
- a Value object representing the number of intervals. If null,
five intervals are used. *type
- one of STANDARD, PARAMETRIC, or POLARMethod Detail |
---|
public java.awt.Color getColor()
public void setColor(java.awt.Color c)
c
- rectangle colorpublic void setFunction(Function func)
func
- function to computer Riemann sum forpublic Function getFuction()
public void setFunction2(Function func)
func
- second functionpublic Function getFuction2()
public void setLineWidth(int width)
width
- line widthpublic int getLineWidth()
public void compute()
compute
in interface Computable
public Value getIntervalCount()
public void setIntervalCount(Value c)
c
- a Value object representing the interval countpublic Value getXMax()
public void setXMax(Value max)
max
- The xMax to set.public Value getXMin()
public void setXMin(Value min)
min
- The xMin to set.public void draw(java.awt.Graphics g, boolean coordsChanged)
draw
in class Drawable
g
- graphics contextcoordsChanged
- true or falsepublic Value getValueObject()
public boolean isInverse()
public void setInverse(boolean inverse)
inverse
- true for inversepublic int getType()
public void setType(int type)
type
- the type to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |