|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent com.objectplanet.chart.GenericChart
public abstract class GenericChart
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 | |
---|---|
protected java.lang.String |
chartType
|
protected static java.awt.Color[] |
DEFAULT_SAMPLE_COLORS
|
protected java.awt.Point |
depth3dPoint
|
protected boolean |
display3dOn
|
protected boolean |
displayVersionOn
|
protected java.lang.String |
dragged_label
|
protected Grid |
grid
This contains the grid data. |
protected GridRenderer |
gridRenderer
Used to paint the grid. |
protected Legend |
legend
This contains the legend data. |
protected LegendRenderer |
legendRenderer
Used to paint the legend. |
protected boolean[] |
legendSelection
|
protected boolean |
needChartCalculation
|
protected boolean |
needGraphBounds
|
protected boolean |
needRender
|
protected java.awt.Cursor |
new_cursor
|
protected java.awt.Cursor |
old_cursor
|
protected java.util.Vector |
overlayCharts
This contains any overlayed charts. |
protected ChartRenderer |
renderer
Used to paint the chart data and labels. |
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 | |
---|---|
GenericChart()
Initializes all common chart data. |
Method Summary | |
---|---|
void |
addImage(java.lang.String name,
java.awt.Image image)
Adds an image to the chart. |
int |
addOverlayChart(GenericChart chart)
Adds a new overlay chart. |
void |
autoRepaint()
Calls repaint() if the automaticRepaintOn is turned on. |
protected void |
checkDataIntegrity()
This method is called each time the sample count or series count changes, and ensures that all the data has the right size. |
protected void |
clearAngledLabelCache()
Clears the chache with angle label bounds. |
protected abstract java.lang.String |
constructLabel(int series,
int sample,
int style,
boolean paintSeriesOn,
java.lang.String percentLabel)
Constructs the combination of labels. |
java.awt.Image |
createImage_oldstyle(int width,
int height)
Uses Component.createImage() or Frame.createImage to create an offscreen image. |
java.awt.Image |
createImage(int width,
int height)
Creates an offscreen image. |
void |
forceRepaint()
Forces immidiate repaint of the chart. |
java.lang.String |
formatNumber(double value,
int decimals)
Formats a floating number to the number of decimals given. |
java.awt.Color |
getAlternateChartBackground()
Gets the alternate color of the chart background itself. |
java.awt.Color |
getBackground2()
Gets the secondary background of the chart component. |
java.awt.Color |
getChartBackground()
Gets the color of the chart background itself. |
java.awt.Color |
getChartBackground2()
Gets the secondary background of the chart grid itself. |
java.awt.Color |
getChartForeground()
Gets the color of the chart foreground itself. |
java.awt.Font |
getFont(java.lang.String label)
Gets the font for the specified label. |
java.awt.Rectangle |
getGraphBounds()
This method returns the bounding box for the chart grid. |
java.awt.Insets |
getGraphInsets()
Gets the graph insets. |
java.lang.String |
getGridImage(int index)
Gets the image that is used as background for the grid. |
protected abstract double |
getHighestValue(int rangeIndex)
Gets the highest value in the chart larger than 0. |
java.awt.Image |
getImage(int width,
int height)
Returns the current chart as an image. |
java.awt.Image |
getImage(java.lang.String name)
Gets the image with the specified name. |
java.lang.String |
getLabel(java.lang.String name)
Gets the specified label from the chart. |
int |
getLabelAngle(java.lang.String name)
Gets the angle of the specified label. |
java.lang.String |
getLabelAtPoint(int x,
int y)
Gets ID of the label which contains given x and y if the label has and URL assigned or if it points to any sample |
java.awt.Rectangle |
getLabelBounds(java.lang.String id)
Gets bounds of the label with given id. |
java.awt.Color |
getLabelColor(java.lang.String id)
Gets color of the specified label. |
java.awt.Point |
getLabelPosition(java.lang.String id)
Gets position of the specified label that has been set by setLabelPosition(String id, int x, int y); |
java.awt.Color |
getLegendColor(int index)
Gets legend entry's color value by it's index. |
java.awt.Color[] |
getLegendColors()
Gets the legend colors. |
int |
getLegendColumns()
Gets the number of columns used to display the legend labels. |
java.lang.String |
getLegendImage(int index)
Gets a legend entry's image name. |
java.lang.String[] |
getLegendLabels()
Gets the legend labels. |
int |
getLegendPosition()
Gets the legend position. |
java.util.Locale |
getLocale()
Gets the current locale used for numbers. |
protected abstract double |
getLowestValue(int rangeIndex)
Gets the lowest value in the chart. |
java.awt.Dimension |
getMinimumSize()
This method returns the minimum size of the chart. |
GenericChart |
getOverlayChart(int index)
Gets the specified overlay chart. |
double |
getOverlayInsets(int side)
Gets the relative distance between the chart bound's and the grid for the specified side. |
java.awt.Dimension |
getPreferredSize()
This method is called by the awt, and returns the preferred size of the chart. |
abstract int |
getSampleCount()
Gets the number of series. |
abstract int |
getSeriesCount()
Gets the number of series. |
java.awt.Dimension |
getSize()
Returns the size of the chart component. |
java.lang.String |
getThousandsDelimeter()
Gets the current thousands delimiter used for formatted numbers. |
java.lang.String |
getTitle()
Gets the chart title. |
protected java.awt.Rectangle |
getTotalGraphBounds()
Gets the bounds of the graph including all ranges and labels but without legend. |
static java.lang.String |
getVersion()
Returns the current version of the charts. |
protected void |
handleCustomLabels(java.awt.AWTEvent event)
Handles the custom label movement. |
boolean |
hasDataChangedSince(long time)
Checks if the data has been changed since the specified time. |
boolean |
is3DModeOn()
Checks if the 3D mode is turned on. |
boolean |
isAntialiasingOn()
Returns true if the anti-aliasing is turned on for this chart. |
boolean |
isAutomaticRepaintOn()
* Checks if the automatic repaint is on. |
boolean |
isFloatingOnLegendOn()
Checks if floating labels are displayed when the mouse moves over the legend. |
boolean |
isGridOutline3DOn()
Checks if the 3D grid outline is turned on. |
boolean |
isLegendOn()
Checks if the legend is turned on. |
boolean |
isLegendReverseOn()
Returns true if the inverted legend is on. |
boolean |
isMultiSeriesOn()
Checks if the multiseries mode is on. |
boolean |
isOverlayChartOn(int index)
Checks if the specified overlay chart is on. |
boolean |
isPrintAsBitmap()
Checks if the chart will be printed as a bitmap. |
boolean |
isSampleHighlightOn(int series)
Checks if the sample highlight is turned on or off for the series. |
abstract boolean |
isSeriesEmpty(int index)
Checks if the series contains any data. |
boolean |
isServletModeOn()
Checks if the servlet mode is turned on. |
boolean |
isTitleOn()
Checks if the title is turned on. |
boolean |
isZoomOn()
Checks if zoom is turned on. |
java.awt.Image |
loadImage(java.lang.String name)
Loads an image from the disk. |
void |
paint(java.awt.Graphics g)
This method is overridden to paint the chart using double buffering. |
void |
print(java.awt.Graphics g)
Call this methods if you want to print the chart from a java program. |
protected void |
processEvent(java.awt.AWTEvent event)
Handles the chart events. |
void |
removeExternalGraphics()
Removes external graphics context if there is one. |
void |
removeOverlayChart(int index)
Removes the specified overlay chart. |
void |
render(java.awt.Graphics g)
Renders the chart according to the current chart attributes and which charts features are turned on or off. |
protected void |
render(java.awt.Graphics g,
boolean offscreenOn)
Renders the chart according to the set attributes, the current features that are turned on and GUI state values. |
protected void |
renderOffScreen(java.awt.Graphics g)
A subclass should override this method to paint on top of the chart before it is painted to the AWT component. |
void |
reset()
Resets the chart data and features. |
void |
set3DModeOn(boolean on)
Turns on or off 3D look of the chart. |
void |
setAlternateChartBackground(java.awt.Color color)
Sets the alternate background color of the chart. |
void |
setAntialiasingOn(boolean on)
Turns on the anti-aliasing feature for this chart. |
void |
setAutomaticRepaintOn(boolean state)
Turns on or off the automatic repaint. |
void |
setBackground(java.awt.Color color)
Sets the chart component background color, outside the chart grid. |
void |
setBackground2(java.awt.Color color)
Sets the secondary chart component background color, outside the chart grid. |
void |
setChartBackground(java.awt.Color color)
Sets the background color of the chart itself. |
void |
setChartBackground2(java.awt.Color color)
Sets the secondary background color of the chart itself. |
void |
setChartForeground(java.awt.Color color)
Sets the foreground color of the chart itself. |
void |
setExternalGraphics(java.awt.Graphics g,
java.awt.Image image)
Sets an external graphics context to paint with. |
void |
setFloatingOnLegendOn(boolean on)
Turn on or off floating labels when the mouse moves over the legend. |
void |
setFont(java.lang.String label,
java.awt.Font font)
Sets the font for the specified label. |
void |
setForeground(java.awt.Color color)
Sets the color of the labels. |
void |
setGraphInsets(int top,
int left,
int bottom,
int right)
Sets the insets between the graph itself and the chart component edges. |
void |
setGridImage(java.lang.String name)
Sets an image to be used as background for the chart grid. |
void |
setGridOutline3DOn(boolean on)
Turns on the 3D grid outline. |
void |
setLabel(java.lang.String name,
java.lang.String label)
Sets the specified label in the chart. |
void |
setLabel(java.lang.String id,
java.lang.String text,
double x,
double y)
Sets a label to any point on the chart. |
void |
setLabel(java.lang.String id,
java.lang.String text,
double x,
double y,
int serie,
int sample)
Sets a label to any point on the chart. |
void |
setLabel(java.lang.String id,
java.lang.String text,
int x,
int y)
Sets a label to any point on the chart. |
void |
setLabel(java.lang.String id,
java.lang.String text,
int x,
int y,
int serie,
int sample)
Sets a label to any point on the chart. |
void |
setLabelAngle(java.lang.String name,
int angle)
Sets the angle of the specified label. |
static void |
setLabelAngleCacheSize(int count)
Sets the angled label cache size. |
void |
setLabelColor(java.lang.String id,
java.awt.Color color)
Sets color for the specified label. |
void |
setLabelPosition(java.lang.String id,
double x,
double y)
Sets position for the specified label. |
void |
setLabelPosition(java.lang.String id,
int x,
int y)
Sets position for a specified label. |
void |
setLabelURL(java.lang.String id,
java.lang.String adress)
Sets the url for any label. |
void |
setLegendColor(int index,
java.awt.Color color)
Sets a legend entry color. |
void |
setLegendColors(java.awt.Color[] colors)
Sets the legend colors. |
void |
setLegendColumns(int columns)
Sets the number of columns that should be used to display legend labels. |
void |
setLegendImage(int index,
java.lang.String name)
Sets an image to be used in front of the legend label. |
void |
setLegendLabels(java.lang.String[] labels)
Sets the legend labels. |
void |
setLegendOn(boolean on)
Turns on or off the label legend. |
void |
setLegendPosition(int position)
Sets the legend position. |
void |
setLegendReverseOn(boolean on)
Set on or off the inverted legend. |
void |
setLocale(java.util.Locale locale)
Sets the locale used to format numbers. |
void |
setMultiSeriesOn(boolean on)
Make the chart behave like it has multiple series even if it has only one. |
protected void |
setNeedChartCalculation(boolean state)
Sets the needChartCalculation to true for this chart and it's overlays. |
void |
setOverlayChart(int index,
GenericChart chart)
Sets the specified overlay chart. |
void |
setOverlayChartOn(int index,
boolean on)
Sets the specified overlay chart on or off. |
void |
setOverlayInsets(double top,
double left,
double bottom,
double right)
Sets the relative distance between this chart's bounds and the grid. |
void |
setPreferredSize(int width,
int height)
Sets the preferred size of the chart. |
void |
setPrintAsBitmap(boolean on)
Turns on printing as bimap. |
abstract void |
setSelection(int serie,
int sample,
boolean selected,
boolean clear,
boolean notify)
Marks a sample as selected or deselected. |
void |
setServletModeOn(boolean on)
Turns on or off servlet mode. |
void |
setThousandsDelimiter(java.lang.String delimiter)
Sets the delimiter for use in the display of numbers. |
void |
setTitle(java.lang.String title)
Sets the chart title. |
void |
setTitleOn(boolean on)
Turns on or off the chart title. |
void |
setZoomOn(boolean on)
Turns zoom on or off. |
java.lang.String |
toString()
Returns the title of the chart. |
void |
update(java.awt.Graphics g)
This method is overridden to avoid flicker when the chart is repainted. |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, 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, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateUI |
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, 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, 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, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, 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, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String chartType
protected static java.awt.Color[] DEFAULT_SAMPLE_COLORS
protected java.awt.Point depth3dPoint
protected boolean display3dOn
protected boolean displayVersionOn
protected java.lang.String dragged_label
protected Grid grid
protected GridRenderer gridRenderer
protected Legend legend
protected LegendRenderer legendRenderer
protected boolean[] legendSelection
protected boolean needChartCalculation
protected boolean needGraphBounds
protected boolean needRender
protected java.awt.Cursor new_cursor
protected java.awt.Cursor old_cursor
protected java.util.Vector overlayCharts
protected ChartRenderer renderer
Constructor Detail |
---|
public GenericChart()
Method Detail |
---|
public void addImage(java.lang.String name, java.awt.Image image)
name
- The unique name of the imageimage
- The image to add, use null to remove the image.public int addOverlayChart(GenericChart chart)
chart
- The chart to be layed over this one.
public void autoRepaint()
protected void checkDataIntegrity()
protected void clearAngledLabelCache()
protected abstract java.lang.String constructLabel(int series, int sample, int style, boolean paintSeriesOn, java.lang.String percentLabel)
series
- The series index.sample
- The sample index.style
- The style of the label: INSIDE, OUTSIDE, FLOATING or POINTING.paintSeriesOn
- True if the series label should be on.percentLabel
- A percent label for pie chart.
public java.awt.Image createImage_oldstyle(int width, int height)
width
- The width of the image in pixels.height
- The height of the image in pixels.public java.awt.Image createImage(int width, int height)
createImage
in class java.awt.Component
width
- The width of the image in pixels.height
- The height of the image in pixels.public void forceRepaint()
public java.lang.String formatNumber(double value, int decimals)
value
- The value to format.decimals
- The number of decimals to use.
public java.awt.Color getAlternateChartBackground()
public java.awt.Color getBackground2()
public java.awt.Color getChartBackground()
public java.awt.Color getChartBackground2()
public java.awt.Color getChartForeground()
public java.awt.Font getFont(java.lang.String label)
label
- The name of the label.
public java.awt.Rectangle getGraphBounds()
public java.awt.Insets getGraphInsets()
setGraphInsets(int, int, int, int)
public java.lang.String getGridImage(int index)
protected abstract double getHighestValue(int rangeIndex)
rangeIndex
- The index of the range (0 or 1).
public java.awt.Image getImage(int width, int height)
width
- The width of the chart in pixels.height
- The height of the chart in pixels.
public java.awt.Image getImage(java.lang.String name)
name
- The name of the image.
public java.lang.String getLabel(java.lang.String name)
name
- The name of the label.
setLabel(java.lang.String, java.lang.String)
public int getLabelAngle(java.lang.String name)
name
- The name of the label.
setLabel(java.lang.String, java.lang.String)
public java.lang.String getLabelAtPoint(int x, int y)
x
- The x coordinate.y
- The y coordinate.
public java.awt.Rectangle getLabelBounds(java.lang.String id)
id
- ID of the given label.
public java.awt.Color getLabelColor(java.lang.String id)
id
- The label id.
public java.awt.Point getLabelPosition(java.lang.String id)
id
- The label id.
public java.awt.Color getLegendColor(int index)
index
- The index of the legend entry to get color from.
public java.awt.Color[] getLegendColors()
public int getLegendColumns()
public java.lang.String getLegendImage(int index)
index
- The index of the legend entry.
public java.lang.String[] getLegendLabels()
setLegendLabels(java.lang.String[])
public int getLegendPosition()
public java.util.Locale getLocale()
getLocale
in class java.awt.Component
protected abstract double getLowestValue(int rangeIndex)
rangeIndex
- The index of the range (0 or 1)public java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.JComponent
public GenericChart getOverlayChart(int index)
index
- The index of the overlay chart.
public double getOverlayInsets(int side)
side
- Chart.TOP, Chart.LEFT, Chart.BOTTOM, Chart.RIGHT.
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public abstract int getSampleCount()
public abstract int getSeriesCount()
public java.awt.Dimension getSize()
getSize
in class java.awt.Component
public java.lang.String getThousandsDelimeter()
public java.lang.String getTitle()
setTitle(java.lang.String)
protected java.awt.Rectangle getTotalGraphBounds()
public static java.lang.String getVersion()
protected void handleCustomLabels(java.awt.AWTEvent event)
public boolean hasDataChangedSince(long time)
time
- The time to check for.
public boolean is3DModeOn()
public boolean isAntialiasingOn()
public boolean isAutomaticRepaintOn()
setAutomaticRepaintOn(boolean)
public boolean isFloatingOnLegendOn()
setFloatingOnLegendOn(boolean)
public boolean isGridOutline3DOn()
public boolean isLegendOn()
public boolean isLegendReverseOn()
public boolean isMultiSeriesOn()
public boolean isOverlayChartOn(int index)
index
- The index of the overlay chart.
public boolean isPrintAsBitmap()
public boolean isSampleHighlightOn(int series)
series
- The data series.
java.lang.IllegalArgumentException
- if the series or sample is invalid.public abstract boolean isSeriesEmpty(int index)
index
- The series index.
public boolean isServletModeOn()
public boolean isTitleOn()
public boolean isZoomOn()
public java.awt.Image loadImage(java.lang.String name)
name
- The file name of the image.
public final void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public final void print(java.awt.Graphics g)
print
in class javax.swing.JComponent
protected void processEvent(java.awt.AWTEvent event)
processEvent
in class java.awt.Container
event
- The event to process.public void removeExternalGraphics()
setExternalGraphics(java.awt.Graphics, java.awt.Image)
public void removeOverlayChart(int index)
index
- The index of the chart to be removed.
java.lang.IllegalArgumentException
- If the index is invalid.public void render(java.awt.Graphics g)
protected void render(java.awt.Graphics g, boolean offscreenOn)
protected void renderOffScreen(java.awt.Graphics g)
g
- The graphics context used to paint with.public void reset()
public void set3DModeOn(boolean on)
on
- True for 3D, false for 2D look.public void setAlternateChartBackground(java.awt.Color color)
color
- The color to use.public void setAntialiasingOn(boolean on)
on
- If true the anti-aliasing is turned on.public void setAutomaticRepaintOn(boolean state)
state
- True for on, false for off.public void setBackground(java.awt.Color color)
setBackground
in class javax.swing.JComponent
color
- The color to use.setChartBackground(java.awt.Color)
public void setBackground2(java.awt.Color color)
color
- The color to use.setChartBackground(java.awt.Color)
public void setChartBackground(java.awt.Color color)
color
- The color to use.public void setChartBackground2(java.awt.Color color)
color
- The color to use.public void setChartForeground(java.awt.Color color)
color
- The color to use.public void setExternalGraphics(java.awt.Graphics g, java.awt.Image image)
g
- The graphics context used for painting.image
- The image to which graphics context belongs.
See here for an example.public void setFloatingOnLegendOn(boolean on)
on
- True for on, false for off.public void setFont(java.lang.String label, java.awt.Font font)
label
- "titleFont" or "legendFont".font
- The font to set for the label.public void setForeground(java.awt.Color color)
setForeground
in class javax.swing.JComponent
color
- The color to use.setChartBackground(java.awt.Color)
public void setGraphInsets(int top, int left, int bottom, int right)
top
- The top insets in pixels.left
- The left insets in pixels.bottom
- The bottom insets in pixels.right
- The right insets in pixels.public void setGridImage(java.lang.String name)
name
- The image to use, null if you want to remove grid image.addImage(java.lang.String, java.awt.Image)
public void setGridOutline3DOn(boolean on)
on
- True for 3D grid outline.public void setLabel(java.lang.String name, java.lang.String label)
name
- The name of the label.label
- The label to use, null for no label.public void setLabel(java.lang.String id, java.lang.String text, double x, double y)
id
- The label id.text
- The label text.x
- The relative horizontal position of the label.y
- The relative vertical position of the label.public void setLabel(java.lang.String id, java.lang.String text, double x, double y, int serie, int sample)
id
- The label id.text
- The label text.x
- The relative horizontal position of the label.y
- The relative vertical position of the label.serie
- The serie if the sample, label should point to.sample
- The index of the sample, label should point to.public void setLabel(java.lang.String id, java.lang.String text, int x, int y)
id
- The label id.text
- The label text.x
- The x coordinate of the label.y
- The y coordinate of the label.public void setLabel(java.lang.String id, java.lang.String text, int x, int y, int serie, int sample)
id
- The label id.text
- The label text.x
- The x coordinate of the label.y
- The y coordinate of the label.serie
- The serie if the sample, label should point to.sample
- The index of the sample, label should point to.public void setLabelAngle(java.lang.String name, int angle)
name
- The name of the label.angle
- The angle to use for the label.public static void setLabelAngleCacheSize(int count)
count
- The image cache count, less than 0 to turn it off.public void setLabelColor(java.lang.String id, java.awt.Color color)
id
- The label id.color
- The color of the label.public void setLabelPosition(java.lang.String id, double x, double y)
id
- The label id.x
- The x coordinate of the label.y
- The y coordinate of the label.public void setLabelPosition(java.lang.String id, int x, int y)
id
- The label id.x
- The x coordinate of the label.y
- The y coordinate of the label.public void setLabelURL(java.lang.String id, java.lang.String adress)
id
- The label id.adress
- The URL string for the label.public void setLegendColor(int index, java.awt.Color color)
index
- The index of the legend entry to set Color for.color
- The color to set for the legend entry.setLegendColors(java.awt.Color[])
,
setLegendImage(int, java.lang.String)
public void setLegendColors(java.awt.Color[] colors)
colors
- The array with legend colors.
java.lang.IllegalArgumentException
- if the colors is null.setLegendColors(java.awt.Color[])
,
setLegendImage(int, java.lang.String)
public void setLegendColumns(int columns)
columns
- Number of columns to display legends on. If columns is
set to 0, the default legend rendering is used.public void setLegendImage(int index, java.lang.String name)
index
- The index of the legend entry to set the image for.name
- The image to use, null for the default legend box.addImage(java.lang.String, java.awt.Image)
public void setLegendLabels(java.lang.String[] labels)
labels
- The labels to use, null for default behavior.public void setLegendOn(boolean on)
on
- True if the legend should be displayed.setLegendPosition(int)
public void setLegendPosition(int position)
position
- TOP, BOTTOM, LEFT, or RIGHT.
java.lang.IllegalArgumentException
- If the position is invalid.public void setLegendReverseOn(boolean on)
on
- If true the legend entryes are displayed from bottom to
top and from right to left.public void setLocale(java.util.Locale locale)
setLocale
in class java.awt.Component
locale
- The locale to use, null for the default locale.public void setMultiSeriesOn(boolean on)
on
- True if the multiseries mode is on, false if off.protected void setNeedChartCalculation(boolean state)
state
- True if the chart data position should be recalculated
for the next render.public void setOverlayChart(int index, GenericChart chart)
index
- The index of the overlay chart.chart
- The chart to set for this overlay position.
java.lang.IllegalArgumentException
- If the index is invalid.public void setOverlayChartOn(int index, boolean on)
index
- The index of the overlay chart.on
- True for on, false for off (on by default).public void setOverlayInsets(double top, double left, double bottom, double right)
top
- The relative distance from the grid top.left
- The relative distance from the grid left edge.bottom
- The relative distance from the grid bottom.right
- The relative distance from the grid right edge.public void setPreferredSize(int width, int height)
width
- The preferred width.height
- The preferred height.public void setPrintAsBitmap(boolean on)
on
- True for on, false for off.public abstract void setSelection(int serie, int sample, boolean selected, boolean clear, boolean notify)
serie
- The series index.sample
- The sample index.selected
- True for selected, false for deselected.clear
- True if the other samples should be cleared.notify
- True if the listeners should be notified.
java.lang.IllegalArgumentException
- If the serie or sample is invalid.public void setServletModeOn(boolean on)
on
- True for servlet mode on, false for
servlet mode off.public void setThousandsDelimiter(java.lang.String delimiter)
delimiter
- The delimiter to set, use null for default, or off for no thousands grouping.public void setTitle(java.lang.String title)
title
- The title to set.getTitle()
,
setTitleOn(boolean)
public void setTitleOn(boolean on)
on
- True for on, false for off.setTitle(java.lang.String)
public void setZoomOn(boolean on)
on
- True for on, false for off.public java.lang.String toString()
toString
in class java.awt.Component
public final void update(java.awt.Graphics g)
update
in class javax.swing.JComponent
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |