|
Venice 0.7beta | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.mov.chart.Chart
public class Chart
New swing component that allows creation of charts. This charting component supports graphing levels and also highlighting of a graph region.
ChartModule,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
|---|
| 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 java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
Chart()
Create a new Chart component. |
|
| Method Summary | |
|---|---|
void |
add(Graph graph,
int index)
Chart a new graph at the given level. |
void |
clearHighlightedRegion()
Clear the highlighted region. |
boolean |
contains(int x,
int y)
Return whether the x,y coordinate is within this component. |
int |
count()
Return the number of graphs in the chart. |
ChartDrawingModel |
getChartDrawingModel()
|
double |
getDifference(java.lang.Integer x,
java.lang.Integer y,
int index)
Generate the equation of the line passing through points specified by index, and return the difference between those points and x,y |
java.lang.Comparable |
getEndX()
Get the last X value that appears in the chart. |
java.awt.Color |
getGraphColour(Graph graph)
Return the colour that the given graph will be drawn. |
java.lang.Comparable |
getHighlightedEnd()
Get the end X of the highlighted region. |
java.lang.Comparable |
getHighlightedStart()
Get the start X of the highlighted region. |
java.awt.image.BufferedImage |
getImage()
|
java.util.Vector |
getLevels()
Return all the graphs for each level. |
java.lang.Comparable |
getStartX()
Get the first X value that appears in the chart. |
java.util.Vector |
getSymbols()
Return the window symbols. |
java.lang.String |
getTitle()
Return the window title. |
java.lang.String |
getUIClassID()
Returns a string that specifies the name of the l&f class that renders this component. |
java.lang.Comparable |
getXAtPoint(int x)
Return the X value at the given x coordinate. |
java.util.Vector |
getXRange()
Get the range of X values which appear in the chart. |
java.lang.Double |
getYAtPoint(int y)
Return the Y value at the given y coordinate. |
void |
handleAnnotation(Graph graph,
boolean enabled)
Set whether the given graph should display its annotations. |
boolean |
isAnnotated(Graph graph)
Query whether the given graph is displaying its annotations. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
Coordinate |
move(java.lang.Integer x,
java.lang.Integer y)
Find the line intersecting at x,y. |
void |
remove(Graph graph)
Remove the graph from the chart. |
void |
resetBuffer()
Reset the double buffer, forcing the graph to redraw. |
void |
setDrawnLineEnd(java.lang.Comparable dataX,
java.lang.Double dataY,
java.lang.Integer absY)
Sets the end point of a drawn line. |
void |
setDrawnLineStart(java.lang.Comparable dataX,
java.lang.Double dataY,
java.lang.Integer absY)
Sets the end point of a drawn line. |
void |
setErase(java.lang.Comparable dataX,
java.lang.Double dataY,
java.lang.Integer absY)
Find the graph element intersecting at x,y and delete it |
void |
setHighlightedEnd(java.lang.Comparable x)
Sets the end X point of the highlighted region. |
void |
setHighlightedStart(java.lang.Comparable x)
Sets the start X point of the highlighted region. |
void |
setPoint(java.lang.Comparable dataX,
java.lang.Double dataY,
java.lang.Integer absY)
Puts a point on a chart. |
void |
setPoint(Coordinate coord)
Puts a point on a chart. |
void |
setText(java.lang.String text,
java.lang.Comparable dataX,
java.lang.Double dataY,
java.lang.Integer absY)
Put text at x,y. |
void |
setUI(BasicChartUI ui)
Sets the L&F object that renders this component. |
void |
updateUI()
Resets the UI property to a value from the current look and feel. |
void |
zoomToDefaultRegion()
Draw the graph back at its default zoom. |
void |
zoomToHighlightedRegion()
Draw the graph zoomed into the given highlighted region. |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Chart()
| Method Detail |
|---|
public java.util.Vector getXRange()
Vector of Comparablespublic java.lang.Comparable getStartX()
public java.lang.Comparable getEndX()
public void handleAnnotation(Graph graph,
boolean enabled)
graph - the graph to modifyenabled - true to turn on graph annotations;
false to turn them offpublic boolean isAnnotated(Graph graph)
graph - the graph to query
true if the graph is displaying its annotations;
false otherwise
public void add(Graph graph,
int index)
graph - the new graph to chartindex - the level indexpublic int count()
public void remove(Graph graph)
graph - the graph to removepublic java.util.Vector getLevels()
Vector where each element represents a
a graph level. Each element in the Vector
is another Vector containing the graphs at that
level.public java.awt.Color getGraphColour(Graph graph)
graph - the graph to query
public void setUI(BasicChartUI ui)
ui - the ButtonUI L&F objectpublic void updateUI()
updateUI in class javax.swing.JComponentpublic java.lang.Comparable getXAtPoint(int x)
x - an x coordinate on the screen
public java.lang.Double getYAtPoint(int y)
y - an x coordinate on the screen
public boolean contains(int x,
int y)
contains in class javax.swing.JComponentx - the x coordinatey - the y coordinate
true if the point is within this component;
false otherwise.public java.lang.String getUIClassID()
getUIClassID in class javax.swing.JComponentpublic void setHighlightedStart(java.lang.Comparable x)
x - the starting x valuepublic void setHighlightedEnd(java.lang.Comparable x)
x - the starting x value
public void setDrawnLineStart(java.lang.Comparable dataX,
java.lang.Double dataY,
java.lang.Integer absY)
dataX - the x data point corresponding to the start of the linedataY - the y data point corresponding to the start of the line.absY - the absolute y coordinate of the start of the line
public void setDrawnLineEnd(java.lang.Comparable dataX,
java.lang.Double dataY,
java.lang.Integer absY)
dataX - the x data point corresponding to the end of the linedataY - the y data point corresponding to the end of the line.absY - the absolute y coordinate of the end of the linenewline - a flag indicating if the line drawn is new, or being
continued.public void setPoint(Coordinate coord)
coord - the coordinate
public void setPoint(java.lang.Comparable dataX,
java.lang.Double dataY,
java.lang.Integer absY)
coord - the coordinate
public double getDifference(java.lang.Integer x,
java.lang.Integer y,
int index)
x - the x coordinatedataY - the y coordinateindex - the index a drawn line
public void setErase(java.lang.Comparable dataX,
java.lang.Double dataY,
java.lang.Integer absY)
dataX - the x data corresponding to the selected pointdataY - the y data corresponding to the selected pointabsY - the y coordinate of the selected point
public Coordinate move(java.lang.Integer x,
java.lang.Integer y)
x - The X Coordinate of the selected point.y - The Y Coordinate of the selected point.
public void setText(java.lang.String text,
java.lang.Comparable dataX,
java.lang.Double dataY,
java.lang.Integer absY)
x - the x coordinate of the selected pointy - the y coordinate of the selected pointpublic java.lang.Comparable getHighlightedStart()
public java.lang.Comparable getHighlightedEnd()
public ChartDrawingModel getChartDrawingModel()
public void clearHighlightedRegion()
public void zoomToHighlightedRegion()
public void zoomToDefaultRegion()
public void resetBuffer()
public java.lang.String getTitle()
public java.util.Vector getSymbols()
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic java.awt.image.BufferedImage getImage()
|
Venice 0.7beta | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||