|
||||||||||
| 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
The chart context is a subclass of java.awt.Panel or javax.swing.JPanel, depending
on whether AWT or Swing applications are developed with JetChart.
The GenericGraph class is the super class of all different chart contexts available
in the JetChart package.
| 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 |
CENTER
Constant used to place the background image at the center of the chart. |
static int |
TILE
Constant used to arrange the background image side by side. |
static int |
TOP_LEFT
Constant used to place the background image at the top left corner of the chart area. |
| 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 |
| Method Summary | |
void |
addLegend(Legend l)
Adds a new Legend box to the chart context. |
void |
addNote(Note note)
Adds a Note object to the chart context. |
void |
addSerie(AbstractSerie serie)
Adds series objects to the chart context. |
void |
addSerieListener(SerieListener serieListener)
Adds a series event listener to handle series events. |
protected void |
finalize()
|
BottomTitle |
getBottomTitle()
Returns a reference to the BottomTitle object. |
LeftTitle |
getLeftTitle()
Returns a reference to the LeftTitle object. |
Legend |
getLegend()
Deprecated. |
Legend |
getLegend(int index)
Returns the legend box with the given index. |
RightTitle |
getRightTitle()
Returns a reference to the RightTitle object. |
java.util.Vector |
getSeries()
Returns a collection of references to series added to the graphic context. |
ToolTip |
getToolTip()
Returns a reference to the ToolTip object. |
boolean |
isPainted()
Deprecated. |
protected void |
processMouseEvent(java.awt.event.MouseEvent evt)
Overrides the processMouseEvent method to control dispatch of mouse events. |
protected void |
processMouseMotionEvent(java.awt.event.MouseEvent evt)
Overrides the processMouseMotionEvent method to control dispatch of mouse motion events. |
void |
readXMLData(java.io.Reader reader)
Reads chart properties from an xml character stream. |
void |
refresh()
Refreshes chart. |
void |
removeAllNotes()
Removes all Note objects from the chart context. |
void |
removeAllSeries()
Removes all series from the graphic context. |
void |
removeLegend(Legend l)
Removes a Legend box. |
void |
removeNote(Note note)
Removes a Note object from the chart context. |
void |
removeSerie(AbstractSerie serie)
Removes a series from the graphic context. |
void |
removeSerieListener(SerieListener serieListener)
Removes a series event listener. |
void |
set3DEnabled(boolean is3DEnabled)
Enables/disables 3D chart. |
void |
setBackgroundImage(java.awt.Image backgroundImage,
int imagePosition)
Defines an image to be painted as the chart background. |
void |
setBorderColor(java.awt.Color borderColor)
Sets the color of the border painted around the chart area. |
void |
setBorderEnabled(boolean isBorderEnabled)
Enables/disables a border around the chart area. |
void |
setBorderThickness(int borderThickness)
Sets the thickness of the border painted around the chart area. |
void |
setBottomMargin(int bottomMargin)
Sets chart bottom margin, in pixels. |
void |
setBufferedImageEnabled(boolean isBufferedImageEnabled,
int bufferedImageType)
Enables/disables generation of offscreen images on a BufferedImage object. |
void |
setConnection(java.lang.String jdbcURL,
java.lang.String user,
java.lang.String password)
Sets the database URL, user name and password to connect to a database and get chart labels and series values. |
void |
setDefaultCursor(java.awt.Cursor defaultCursor)
Sets the default cursor of this component. |
void |
setDraggingBoxColor(java.awt.Color draggingBoxColor)
Sets the dragging box color. |
void |
setDraggingEnabled(boolean isDraggingEnabled)
Enables/disables chart dragging. |
void |
setDriver(java.lang.String jdbcDriver)
Sets a JDBC driver to connect to a database and get chart labels and series values. |
void |
setLabelsQuery(java.lang.String labelsQuery)
Sets a sql statement to access a database and get chart labels. |
void |
setLeftMargin(int leftMargin)
Sets chart left margin, in pixels. |
void |
setLegendEnabled(boolean isLegendEnabled)
Deprecated. |
void |
setOffScreenGraphEnabled(boolean isOffScreenGraphEnabled)
Enables chart image generation from an offscreen application. |
void |
setRightMargin(int rightMargin)
Sets chart right margin, in pixels. |
void |
setTitle(java.lang.String[] title)
Sets chart title. |
void |
setTitleFont(java.awt.Font font)
Sets chart title font. |
void |
setTitleForeground(java.awt.Color titleForeground)
Sets chart title color. |
void |
setTitleGap(int titleGap)
Sets the chart title gap. |
void |
setTopMargin(int topMargin)
Sets chart top margin, in pixels. |
void |
setValueFormat(java.lang.String valueFormat)
Deprecated. |
| Methods inherited from class com.jinsight.jetchart.GradientPanel |
paint, 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, update, 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 TILE
public static final int TOP_LEFT
public static final int CENTER
| Method Detail |
public void addSerieListener(SerieListener serieListener)
serieListener - A SerieListener object.removeSerieListener(com.jinsight.jetchart.SerieListener),
SerieListener,
SerieEventpublic void removeSerieListener(SerieListener serieListener)
serieListener - A SerieListener object.addSerieListener(com.jinsight.jetchart.SerieListener),
SerieListener,
SerieEventpublic void addSerie(AbstractSerie serie)
Only series belonging to the same type of chart context can be combined. For example, a line series can be combined with another line series, a bar series, an area series, etc., but can not be combined with an xy series, whose chart context is ScatterGraph.
serie - Any series that extends the AbstractSerie class.AbstractSerie,
GraphExceptionpublic java.util.Vector getSeries()
public void removeSerie(AbstractSerie serie)
serie - Any series that extends the AbstractSerie class and that was previously added
to the chart context.AbstractSeriepublic void removeAllSeries()
public void addLegend(Legend l)
l - A Legend object.removeLegend(com.jinsight.jetchart.Legend),
Legendpublic void removeLegend(Legend l)
l - A Legend object.addLegend(com.jinsight.jetchart.Legend),
Legendpublic Legend getLegend(int index)
index - An integer number.addLegend(com.jinsight.jetchart.Legend),
removeLegend(com.jinsight.jetchart.Legend),
Legendpublic void addNote(Note note)
note - A Note object.Notepublic void removeNote(Note note)
note - A Note object.Notepublic void removeAllNotes()
Notepublic void setOffScreenGraphEnabled(boolean isOffScreenGraphEnabled)
setSize()
method.setBufferedImageEnabled is set
to true, a BufferedImage object is used to paint chart, rather than a
invisible Frame object.
isOffScreenGraphEnabled - A boolean value(true/false).ChartEncoder,
setBufferedImageEnabled(boolean, int)
public void setBufferedImageEnabled(boolean isBufferedImageEnabled,
int bufferedImageType)
Component.createImage(int width,int
height) method. If this method is set to true, a BufferedImage
object is used instead.GenericGraph.createImage when producing the left and
right rotated titles, the bottom title and the rotated vertical
labels, as well as when a chart is encoded into a GIF, JPEG or PNG
image using the ChartEncoder class. Unless the GenericGraph instance
is laid out on a valid container, like a Frame object, a null Image is
returned and a NullPointerException is raised during execution of any
of the processes above mentioned.GenericGraph.createImage
raises a NullPointerException. If this method is set to true, the
offscreen images are created using the BufferedImage class, and no
exception is raised.
isBufferedImageEnabled - A boolean value(true/false).bufferedImageType - The image type, which can be one of the constants
defined in the BufferedImage class.setOffScreenGraphEnabled(boolean),
ChartEncoder,
BufferedImagepublic void setDraggingEnabled(boolean isDraggingEnabled)
Pie chart dragging is performed by clicking the area outside a pie series bounds. Chart dragging is disabled, by default.
isDraggingEnabled - A boolean value(true/false).PieSeriepublic void setTitleGap(int titleGap)
titleGap - An integer number.
public void setBackgroundImage(java.awt.Image backgroundImage,
int imagePosition)
backgroundImage - An Image object.imagePosition - One of the following constants: GenericGraph.TILE,
GenericGraph.TOP_LEFT, GenericGraph.CENTER.TILE,
TOP_LEFT,
CENTERpublic boolean isPainted()
public void setDefaultCursor(java.awt.Cursor defaultCursor)
defaultCursor - A Cursor object.public void setLabelsQuery(java.lang.String labelsQuery)
labelsQuery - A sql statement.setDriver(java.lang.String),
setConnection(java.lang.String, java.lang.String, java.lang.String)public void setDriver(java.lang.String jdbcDriver)
jdbcDriver - A JDBC driver to connect to a database.setConnection(java.lang.String, java.lang.String, java.lang.String),
Graph.setLabelsQuery(java.lang.String),
AbstractSerie.setValuesQuery(java.lang.String)
public void setConnection(java.lang.String jdbcURL,
java.lang.String user,
java.lang.String password)
jdbcURL - The database URLuser - The user namepassword - The user passwordsetDriver(java.lang.String),
Graph.setLabelsQuery(java.lang.String),
AbstractSerie.setValuesQuery(java.lang.String)public void setTitle(java.lang.String[] title)
title - An array of strings.public void setTitleForeground(java.awt.Color titleForeground)
titleForeground - A Color object.public void setTitleFont(java.awt.Font font)
font - A Font object.public void setValueFormat(java.lang.String valueFormat)
AbstractSerie.setValueFormat(java.lang.String)public void setLeftMargin(int leftMargin)
leftMargin - An integer representing left margin.public void setRightMargin(int rightMargin)
rightMargin - An integer representing right margin.public void setTopMargin(int topMargin)
topMargin - An integer representing top margin.public void setBottomMargin(int bottomMargin)
bottomMargin - An integer representing bottom margin.public void set3DEnabled(boolean is3DEnabled)
is3DEnabled - A boolean value(true/false).public Legend getLegend()
getLegend(int index),
Legendpublic ToolTip getToolTip()
ToolTippublic LeftTitle getLeftTitle()
LeftTitlepublic RightTitle getRightTitle()
RightTitlepublic BottomTitle getBottomTitle()
BottomTitlepublic void setLegendEnabled(boolean isLegendEnabled)
getLegend(int index).setEnabled(boolean isEnabled) instead.
isLegendEnabled - A boolean value(true/false).addLegend(com.jinsight.jetchart.Legend),
removeLegend(com.jinsight.jetchart.Legend),
Legendpublic void setDraggingBoxColor(java.awt.Color draggingBoxColor)
draggingBoxColor - A Color object.setDraggingEnabled(boolean)public void setBorderEnabled(boolean isBorderEnabled)
isBorderEnabled - A boolean value(true/false)public void setBorderColor(java.awt.Color borderColor)
borderColor - A Color object.setBorderEnabled(boolean)public void setBorderThickness(int borderThickness)
borderThickness - An integer value greater than zero.setBorderEnabled(boolean)
public void readXMLData(java.io.Reader reader)
throws java.io.IOException
reader - The reader from which to retrieve the XML data.
java.io.IOException - If an error occured while reading the input.
GraphException - If the XML data does not follow certain rules related to the definition
of acceptable tags.AbstractSerie.getId()public void refresh()
protected void processMouseEvent(java.awt.event.MouseEvent evt)
protected void processMouseMotionEvent(java.awt.event.MouseEvent evt)
protected void finalize()
throws java.lang.Throwable
finalize in class GradientPaneljava.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||