|
|||||||||
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 | +--javax.swing.JComponent | +--org.concord.util.LineGraph
Plot a function of time.
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
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.awt.Color |
backColor
|
protected java.awt.Image |
bi
|
protected java.awt.Graphics |
big
|
protected int |
cellSize
|
protected java.util.Vector |
colorList
|
protected boolean |
drawBoundsValues
|
protected java.text.DecimalFormat |
format
|
protected java.util.Vector |
functions
|
protected java.awt.Color |
gridColor
|
protected int |
height
|
protected boolean |
showingNegative
|
protected java.awt.event.ComponentAdapter |
sizeChanged
|
protected javax.swing.JSlider |
slider
|
protected javax.swing.event.ChangeListener |
sliderChanged
|
protected java.awt.Font |
smallFont
|
protected java.awt.Color |
textColor
|
protected int |
width
|
protected double |
yMax
|
protected double |
yOrigin
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface org.concord.util.ValueGraph |
colors |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
LineGraph()
|
Method Summary | |
int |
getCellSize()
|
java.awt.Color |
getColor(int index)
Returns color associated with a particular index. |
double |
getMax()
|
javax.swing.JSlider |
getSlider()
|
boolean |
isShowingNegative()
|
protected double |
log10(double x)
|
static void |
main(java.lang.String[] args)
|
void |
paintComponent(java.awt.Graphics g)
|
void |
reset()
|
void |
setBackColor(java.awt.Color color)
|
void |
setBoundsValuesVisible(boolean visible)
|
void |
setCellSize(int cell)
|
void |
setColor(java.awt.Color color,
int index)
Sets the color associated with a particular index. |
void |
setGridColor(java.awt.Color color)
|
protected void |
setLineGraphSize(java.awt.Dimension size)
|
void |
setMax(double yMax)
|
void |
setMax(float yMax)
|
void |
setScaleMax(int scale)
|
void |
setShowingNegative(boolean negative)
|
void |
setSlider(javax.swing.JSlider slider)
|
void |
setSliderValue()
|
void |
setTextColor(java.awt.Color color)
|
void |
setYOrigin(double yOrigin)
|
void |
setYOrigin(float yOrigin)
|
void |
sleep(int time)
|
void |
update(java.awt.Graphics g)
|
void |
updateValue(double x)
|
void |
updateValue(double x,
int index)
Updates graph element at index with new value. |
void |
updateValue(float x)
|
void |
updateValue(float x,
int index)
|
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, 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.awt.Font smallFont
protected java.awt.Image bi
protected java.awt.Graphics big
protected int width
protected int height
protected java.util.Vector functions
protected java.util.Vector colorList
protected double yOrigin
protected double yMax
protected boolean showingNegative
protected int cellSize
protected java.awt.Color backColor
protected java.awt.Color gridColor
protected java.awt.Color textColor
protected boolean drawBoundsValues
protected java.text.DecimalFormat format
protected javax.swing.event.ChangeListener sliderChanged
protected javax.swing.JSlider slider
protected java.awt.event.ComponentAdapter sizeChanged
Constructor Detail |
public LineGraph()
Method Detail |
public void setBackColor(java.awt.Color color)
public void setGridColor(java.awt.Color color)
public void setTextColor(java.awt.Color color)
public boolean isShowingNegative()
public void setShowingNegative(boolean negative)
public int getCellSize()
public void setCellSize(int cell)
public void setColor(java.awt.Color color, int index)
setColor
in interface ValueGraph
color
- - Color of graph element.index
- - int index of graph element.public java.awt.Color getColor(int index)
getColor
in interface ValueGraph
index
- - int index of graph element.public javax.swing.JSlider getSlider()
public void setSlider(javax.swing.JSlider slider)
public void setYOrigin(double yOrigin)
public void setYOrigin(float yOrigin)
public double getMax()
public void setMax(double yMax)
public void setScaleMax(int scale)
protected double log10(double x)
public void setSliderValue()
public void setMax(float yMax)
public void setBoundsValuesVisible(boolean visible)
public void reset()
protected void setLineGraphSize(java.awt.Dimension size)
public void updateValue(double x, int index)
updateValue
in interface ValueGraph
x
- - double value to update.index
- - int index of graph element.public void updateValue(double x)
updateValue
in interface ValueGraph
public void updateValue(float x, int index)
updateValue
in interface ValueGraph
public void updateValue(float x)
updateValue
in interface ValueGraph
public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public void update(java.awt.Graphics g)
update
in class javax.swing.JComponent
public void sleep(int time)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |