|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
com.jinsight.jetchart.GradientPanel
com.jinsight.jetchart.GenericGraph
com.jinsight.jetchart.ScatterGraph
The ScatterGraph class implements the graphic context of scatter series. The data points
of scatter series are associated with two values, plotted against a horizontal and a vertical
scales and based on a cartesian coordinates system.
A chart context implemented by the ScatterGraph class can be dragged or resized. To drag a chart,
just place the mouse cursor on the chart area, then click and hold the left button while
dragging. To resize chart, double-click mouse on the chart area and then click
and hold the left button while dragging. A double-click alternates between dragging and
resizing chart.
GenericGraph,
ScatterSerie,
GenericGraph.setDraggingEnabled(boolean),
Serialized Form| Nested Class Summary |
| Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
static int |
GRAPH_AREA
Constant used to clip the background area where an image can be painted or the gradient colors effect can be displayed. |
static int |
PARENT_AREA
Constant used to set the chart container bounds as the area where a background image can be painted or the gradient colors effect can be displayed. |
| Fields inherited from class com.jinsight.jetchart.GenericGraph |
CENTER, TILE, TOP_LEFT |
| Fields inherited from class com.jinsight.jetchart.GradientPanel |
BOTTOM_TO_TOP, LEFT_TO_RIGHT, RIGHT_TO_LEFT, TOP_TO_BOTTOM |
| 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 | |
ScatterGraph()
Creates a ScatterGraph object. |
|
| Method Summary | |
void |
addSerie(ScatterSerie serie)
|
void |
addTargetLine(TargetLine tl)
Adds a target line. |
protected void |
finalize()
|
Grid |
getGrid()
Returns a reference to the grid object. |
GridCrossedLines |
getGridCrossedLines()
Returns a reference to the GridCrossedLines object. |
Scale |
getHScale()
Returns a reference to the horizontal scale object. |
SeriesBase |
getHSeriesBase()
Returns a reference to the horizontal series base object. |
Quadrant |
getQuadrant(int quadrantNr)
Returns a reference to one of the four available Quadrant objects. |
YAxis |
getRYAxis()
Returns a reference to the vertical axis placed to the right of the chart area. |
ScatterGraphEventListener |
getScatterGraphEventListener()
Returns a reference to a ScatterGraphEventListener object. |
XAxis |
getTXAxis()
Returns a reference to horizontal axis placed at the top of the chart area. |
Scale |
getVScale()
Returns a reference to the vertical scale object. |
SeriesBase |
getVSeriesBase()
Returns a reference to the vertical series base object. |
Wall |
getWall()
Returns a reference to the Wall object. |
XAxis |
getXAxis()
Returns a reference to the horizontal axis placed at the bottom of the chart area. |
YAxis |
getYAxis()
Returns a reference to the vertical axis placed to the left of the chart area. |
void |
paint(java.awt.Graphics gr)
Overrides the Component class paint() method. |
void |
readXMLData(java.io.Reader reader)
Reads chart properties from an xml character stream. |
void |
refresh()
Refreshes chart. |
void |
removeAllSeries()
Removes all series from the graphic context. |
void |
removeAllTargetLines()
Removes all target lines. |
void |
removeSerie(ScatterSerie serie)
|
void |
removeTargetLine(TargetLine tl)
Removes a target line. |
void |
setBackgroundImageArea(int backgroundImageArea)
Sets the area on which a background image is painted. |
void |
setDateGraphEnabled(boolean isDateGraphEnabled)
Enables/disables a date graph. |
void |
setGradientColorsArea(int gradientColorsArea)
Sets the area on which the gradient colors effect is displayed. |
void |
setZoomAreaColor(java.awt.Color zoomAreaColor)
Sets the color to paint chart area selected for zooming. |
void |
setZoomEnabled(boolean isZoomEnabled)
Enables/disables zoom. |
void |
update(java.awt.Graphics gr)
Overrides the Component class update() method,
to avoid flickering. |
| Methods inherited from class com.jinsight.jetchart.GradientPanel |
setGradientColors, setGradientOrientation |
| Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int PARENT_AREA
public static final int GRAPH_AREA
| Constructor Detail |
public ScatterGraph()
| Method Detail |
public void addSerie(ScatterSerie serie)
public void removeSerie(ScatterSerie serie)
public void removeAllSeries()
GenericGraph
removeAllSeries in class GenericGraphpublic void addTargetLine(TargetLine tl)
tl - A TargetLine object.TargetLinepublic void removeTargetLine(TargetLine tl)
tl - A TargetLine object.TargetLinepublic void removeAllTargetLines()
TargetLinepublic XAxis getXAxis()
XAxispublic XAxis getTXAxis()
XAxis,
getHScale(),
Scalepublic YAxis getYAxis()
YAxispublic YAxis getRYAxis()
YAxis,
getVScale(),
Scalepublic Grid getGrid()
Gridpublic GridCrossedLines getGridCrossedLines()
GridCrossedLinespublic Scale getVScale()
Scalepublic Scale getHScale()
Scalepublic SeriesBase getVSeriesBase()
SeriesBasepublic SeriesBase getHSeriesBase()
SeriesBasepublic Wall getWall()
Wallpublic Quadrant getQuadrant(int quadrantNr)
quadrantNr - An integer number, ranging from 1 to 4.Quadrantpublic ScatterGraphEventListener getScatterGraphEventListener()
ScatterGraphEventListener
public void readXMLData(java.io.Reader reader)
throws java.io.IOException
GenericGraph
readXMLData in class GenericGraphreader - The reader from which to retrieve the XML data.
java.io.IOException - If an error occured while reading the input.AbstractSerie.getId()public void setBackgroundImageArea(int backgroundImageArea)
backgroundImageArea - An integer value.PARENT_AREA,
GRAPH_AREApublic void setGradientColorsArea(int gradientColorsArea)
gradientColorsArea - An integer value.PARENT_AREA,
GRAPH_AREApublic void setDateGraphEnabled(boolean isDateGraphEnabled)
isDateGraphEnabled - a boolean value(true/false).ScatterSerie.setDateValues(java.lang.String[]),
ScatterSerie.setDateFormat(java.lang.String)public void setZoomEnabled(boolean isZoomEnabled)
isZoomEnabled - A boolean value(true/false).GenericGraph.setDraggingEnabled(boolean),
setZoomAreaColor(java.awt.Color)public void setZoomAreaColor(java.awt.Color zoomAreaColor)
zoomAreaColor - A Color object.setZoomEnabled(boolean)public void refresh()
refresh in class GenericGraphpublic void update(java.awt.Graphics gr)
update() method,
to avoid flickering.
gr - A Graphics object, where painting is done. This
object is automatically created by the AWT classes and passed
to the update() method, which in turn sends it
to the paint() method.paint(java.awt.Graphics)public void paint(java.awt.Graphics gr)
paint() method.
Chart plotting starts in this method, basically
by delegating the painting process to each one of the
objects of the chart context.
paint in class GradientPanelgr - A Graphics object.update(java.awt.Graphics)
protected void finalize()
throws java.lang.Throwable
finalize in class GenericGraphjava.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||