|
||||||||||
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.Sequence
public class Sequence
A Sequence is like a Graph1D, except that only integer values of the independent variable are used, and discrete points are plotted.
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 | |
---|---|
static int |
CIRCLE
Circle shape |
protected int |
lineWidth
The width, in pixels, of the outlines of the symbols. |
static int |
SQUARE
Square shape |
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 | |
---|---|
Sequence()
Construct a Sequence object that initially has nothing to draw. |
|
Sequence(Function f,
Value lower,
Value upper,
int shape)
Construct a new Sequence object. |
Method Summary | |
---|---|
void |
compute()
This is generally called by a Controller. |
void |
draw(java.awt.Graphics g,
boolean coordsChanged)
Draw the Sequence. |
java.awt.Color |
getFillColor()
Get the fill color |
Function |
getFuction()
Returns the function whose sequence is computed. |
int |
getLineWidth()
Get the width, in pixels, of outlines that are drawn. |
java.awt.Color |
getOutlineColor()
Get the (positive) color that is used to draw outlines around the symbols. |
int |
getShape()
Get the shape for the symbols. |
float |
getSymbolSize()
Get the size in pixels. |
Value |
getValueObject()
Gets a Value object that gives the value of the partial sum for the sequence. |
Value |
getXMax()
Get the max x value |
Value |
getXMin()
Get the min x value |
void |
setFillColor(java.awt.Color fillColor)
Set the fill color. |
void |
setFunction(Function func)
Set the function whose sequence is to be computed. |
void |
setLineWidth(int width)
Set the width, in pixels, of outlines. |
void |
setOutlineColor(java.awt.Color c)
Set the color that will be used to draw outlines around the symbols. |
void |
setShape(int shape)
Set the shape for the symbols. |
void |
setSymbolSize(float size)
Set the size in pixels. |
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 |
---|
protected int lineWidth
public static final int CIRCLE
public static final int SQUARE
Constructor Detail |
---|
public Sequence()
public Sequence(Function f, Value lower, Value upper, int shape)
f
- a Function object used to generate the sequence. If null,
nothing is drawn.lower
- the lower limitupper
- the upper limitshape
- the shape to use for symbolsMethod Detail |
---|
public int getShape()
public void setShape(int shape)
shape
- the shape to setpublic void setOutlineColor(java.awt.Color c)
c
- outline colorpublic java.awt.Color getOutlineColor()
public java.awt.Color getFillColor()
public void setFillColor(java.awt.Color fillColor)
fillColor
- the fillColor to setpublic void setFunction(Function func)
func
- functionpublic Function getFuction()
public void setLineWidth(int width)
width
- line widthpublic int getLineWidth()
public void compute()
compute
in interface Computable
public 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 float getSymbolSize()
public void setSymbolSize(float size)
size
- the size to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |