|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.steema.teechart.TeeBase
com.steema.teechart.Chart
public class Chart
Title: Chart class
Description: Chart contents.
Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
Nested Class Summary | |
---|---|
class |
Chart.ChartToolTip
Title: Tooltips class |
Field Summary | |
---|---|
protected Aspect |
aspect
|
protected Axes |
axes
|
AxisSavedScales |
bottom
|
protected Rectangle |
chartBounds
|
protected Rectangle |
chartRect
|
boolean |
clipWhenMetafiling
|
boolean |
clipWhenPrinting
|
protected IGraphics3D |
graphics3D
|
protected boolean |
iClicked
|
AxisSavedScales |
left
|
protected Legend |
legend
|
protected ChartPen |
legendPen
|
protected int |
maxZOrder
|
protected Page |
page
|
protected IChart |
parent
|
protected boolean |
printing
|
protected boolean |
restoredAxisScales
|
AxisSavedScales |
right
|
protected SeriesCollection |
series
|
protected int |
seriesHeight3D
|
protected int |
seriesWidth3D
|
AxisSavedScales |
top
|
protected Zoom |
zoom
|
Fields inherited from class com.steema.teechart.TeeBase |
---|
chart |
Constructor Summary | |
---|---|
Chart()
|
|
Chart(IChart parent)
|
|
Chart(IChart parent,
java.awt.Cursor cursor)
|
Method Summary | |
---|---|
Series |
activeSeriesLegend(int itemIndex)
Returns the Active series (visible) that corresponds to the ItemIndex position in the Legend. When the Legend style is "Series", returns the series that corresponds to the Legend "ItemIndex" position. |
int |
addSeries(Series value)
|
TeeEvent |
broadcastEvent(Series s,
SeriesEventStyle e)
|
void |
broadcastEvent(TeeEvent event)
|
protected void |
broadcastMouseEvent(java.awt.event.MouseEvent e)
|
protected java.awt.Cursor |
broadcastMouseEvent(java.awt.event.MouseEvent e,
java.awt.Cursor c)
|
protected void |
broadcastToolEvent(ChartDrawEvent ce)
|
boolean |
canClip()
Returns the number of active (visible) series. CanClip returns if the Chart Drawing Canvas has the capability of "clipping" lines and polygons. "Clipping" means the feature that allows hiding drawing outside the rectangle or polygon specifed by the developer. CanClip returns false when the Chart is displayed in OpenGL 3D, or when the Chart is printed and the TeeClipWhenPrinting constant is true, or when the Chart is converted to a metafile image and the TeeClipWhenMetafiling constant is true. |
boolean |
canDrawPanelBack()
|
static void |
changeAllSeriesType(Chart chart,
java.lang.Class newClass)
|
static Series |
changeSeriesType(Series series,
java.lang.Class newClass)
|
protected int |
chartRectHeight()
|
protected int |
chartRectWidth()
|
protected void |
checkZoomPanning(java.awt.event.MouseEvent e)
|
java.lang.Object |
clone()
|
int |
countActiveSeries()
Returns the number of active (visible) series. In other words it is a count of Series in Chart that have their Active property set to true. |
void |
doBaseInvalidate()
|
void |
doChangedBrush(ChartBrush value)
|
void |
doChangedFont(ChartFont value)
|
Rectangle |
doDrawLegend(IGraphics3D g,
Rectangle tmp)
|
java.awt.Cursor |
doMouseMove(int x,
int y,
java.awt.Cursor c)
|
void |
doZoom(double topx,
double topy,
double bottomx,
double bottomy,
double leftx,
double lefty,
double rightx,
double righty)
|
void |
doZoom(java.awt.geom.Point2D.Double top,
java.awt.geom.Point2D.Double bot,
java.awt.geom.Point2D.Double lef,
java.awt.geom.Point2D.Double rig)
|
java.lang.String |
formattedLegend(int seriesOrValueIndex)
Returns the text string corresponding to a Legend position. The Legend position depends on Legend.LegendStyle. If LegendStyle is lsSeries, then the text string will be the SeriesOrValueIndexth Active Series Title. If LegendStyle is lsValues, then the text string will be the formatted SeriesOrValueIndexth value of the first Active Series in the Chart. If LegendStyle is lsAuto and only one Active Series exists in the Chart, then the LegendStyle is considered to be lsValues. If there's more than one Active Series then LegendStyle will be lsSeries. |
java.lang.String |
formattedValueLegend(Series aSeries,
int valueIndex)
Returns the String to display at Legend for a given series and point index. In other words it returns the string representation of a Series Point value just as it would appear in Chart.Legend. |
Color |
freeSeriesColor(boolean checkBackground)
Returns a color from the default color palette not used by any Series. |
Aspect |
getAspect()
3D view parameters. |
boolean |
getAutoRepaint()
Returns if the Chart should automatically repaint itself when a property has been changed. |
Axes |
getAxes()
Accesses the five axes, Top, Left, Right, Bottom and z depthas well as custom axis objects. |
Series |
getAxisSeries(Axis axis)
Returns the first Series that depends on the specified Axis. If no Series depends on Axis, the null value is returned. |
int |
getBottom()
|
Rectangle |
getChartBounds()
(Read only) Used to get the four sides of the Chart (Left, Top, Right and Bottom) |
Rectangle |
getChartRect()
Returns the rectangle that contains the four main Chart axes. |
protected int |
getChartRectBottom()
|
Exports |
getExport()
Accesses Chart export attributes. |
Series |
getFirstActiveSeries()
Returns first active (visible) series. |
Footer |
getFooter()
Defines the Text and formatting attributes to be drawn at the bottom of the Chart. Use Text to enter the desired Footer lines, set Visible to true and change Font, Frame and Brush. Use Alignment to control text output position. |
IGraphics3D |
getGraphics3D()
Accesses TeeChart Draw attributes. |
Header |
getHeader()
Defines the Text and formatting attributes to be drawn at the top of the Chart. Use Text to enter the desired Header lines, set Visible to true and change Font, Frame and Brush. |
int |
getHeight()
The Chart Height in pixels. |
Imports |
getImport()
Accesses Chart import attributes. |
Series |
getItem(int index)
Default indexer. Example: |
int |
getLeft()
|
Legend |
getLegend()
Determines the Legend characteristics. Legend determines the text and drawing attributes of Chart's textual representation of Series and Series values. |
ChartPen |
getLegendPen()
|
TeeEventListeners |
getListeners()
Returns array list of objects that implement the TeeEventListener interface. |
int |
getMaxValuesCount()
|
double |
getMaxXValue(Axis axis)
Returns the Maximum Value of the Series X Values List. |
double |
getMaxYValue(Axis axis)
Returns the highest of all the current Series Y point values. |
int |
getMaxZOrder()
|
double |
getMinXValue(Axis axis)
Returns the Minimum Value of the Series X Values List. |
double |
getMinYValue(Axis axis)
Returns the Minimum Value of the Series Y Values List. |
int |
getNumPages()
|
Page |
getPage()
Accesses multiple page characteristics of the Chart. |
Panel |
getPanel()
Accesses all visible Background attributes.. |
Scroll |
getPanning()
Sets the scrolling direction or denies scrolling. |
IChart |
getParent()
|
Printer |
getPrinter()
Printing related attributes. |
boolean |
getPrinting()
Determines when Chart is being printed. |
int |
getRight()
|
SeriesCollection |
getSeries()
Collection of Series contained in this Chart. |
Series |
getSeries(int seriesIndex)
|
int |
getSeriesCount()
Returns the number of Series associated to this Chart. |
int |
getSeriesHeight3D()
|
int |
getSeriesIndexOf(Series value)
|
java.lang.String |
getSeriesTitleLegend(int seriesIndex,
boolean onlyActive)
Returns the Series.Title string. |
int |
getSeriesWidth3D()
|
Footer |
getSubFooter()
Defines the Text and formatting attributes to be drawn at the bottom of the Chart, just above the Footer text. Use Text to enter the desired SubFooter lines, set Visible to true and change Font, Frame and Brush. Use Alignment to control text output position. |
Header |
getSubHeader()
Defines the Text and formatting attributes to be drawn at the top of the Chart, just below the Header text. Use Text to enter the desired SubHeader lines, set Visible to true and change Font, Frame and Brush. Use Alignment to control text output position. |
Header |
getSubTitle()
Obsolete. Please use SubHeader instead. |
Header |
getTitle()
Obsolete. Please use Header instead. |
Tool |
getTool(int index)
Gets the index'th tool in getTools() collection |
ToolsCollection |
getTools()
Collection of Tool components contained in this Chart. |
ToolTip |
getToolTip()
Displays a text box at the cursor. |
int |
getTop()
|
Walls |
getWalls()
Accesses left, bottom and back wall characteristics of the Chart. |
int |
getWidth()
The Chart width in pixels. |
Zoom |
getZoom()
Accesses the Zoom characteristics of the Chart. |
java.awt.Image |
image(int width,
int height)
|
protected void |
internalDraw(IGraphics3D g)
Main drawing procedure. |
double |
internalMinMax(Axis aAxis,
boolean isMin,
boolean isX)
|
boolean |
isAxisCustom(Axis axis)
|
boolean |
isAxisVisible(Axis a)
|
boolean |
isFreeSeriesColor(Color color,
boolean checkBackground)
Returns whether the AColor parameter is used by any Series or not. |
boolean |
isValidDataSource(Series s,
java.lang.Object source)
|
int |
maxMarkWidth()
Returns the Maximum width of the Active Series Marks. Series Marks must be Visible. |
int |
maxTextWidth()
Returns the Maximum width in pixels of all Series Labels, whether active or not. This applies only to Series which have Labels. |
java.awt.Cursor |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
moveSeriesTo(Series value,
int newIndex)
|
MultiLine |
multiLineTextWidth(java.lang.String s)
|
void |
paint()
|
void |
paint(IGraphics3D g)
Paints the Chart on the Drawing Canvas g. |
void |
paint(IGraphics3D g,
int width,
int height)
|
void |
paint(IGraphics3D g,
Rectangle rect)
Paints the Chart in your preferred Canvas and region. |
protected java.lang.Object |
readResolve()
|
Rectangle |
recalcWidthHeight(Rectangle r)
|
protected void |
removeAllComponents()
|
protected void |
removeListener(ITeeEventListener sender)
|
void |
removeSeries(Series value)
Removes a Series from the Chart series list, without disposing it. |
void |
restoreAxisScales()
|
java.util.Iterator |
series()
|
Series |
seriesLegend(int itemIndex,
boolean onlyActive)
Returns the series that corresponds to the Legend "ItemIndex" position, when the Legend style is "Series". The "OnlyActive" parameter, when false, takes into account all series, visibly active or not. |
void |
setAspect(Aspect value)
|
void |
setAutoRepaint(boolean value)
Sets if this Chart should automatically repaint after a property change. |
void |
setAxes(Axes value)
|
void |
setBrushCanvas(Color aColor,
ChartBrush aBrush,
Color aBackColor)
|
void |
setCancelMouse(boolean value)
|
void |
setChartBounds(Rectangle value)
Sets the four sides of the Chart (Left, Top, Right and Bottom) |
void |
setChartRect(Rectangle value)
Sets the rectangle to contain the four main Chart axes. |
void |
setExport(Exports value)
|
void |
setFooter(Footer value)
|
void |
setGraphics3D(IGraphics3D value)
|
void |
setHeader(Header value)
|
void |
setHeight(int value)
Sets the Chart Height in pixels. |
void |
setImport(Imports value)
|
void |
setItem(int index,
Series value)
Default indexer. |
void |
setLegend(Legend value)
|
void |
setLegendPen(ChartPen value)
|
void |
setMaxZOrder(int value)
|
void |
setPage(Page value)
|
void |
setPanel(Panel value)
|
void |
setPanning(Scroll panning)
|
void |
setParent(IChart value)
Internal use. |
void |
setPrinter(Printer value)
|
void |
setPrinting(boolean value)
Determines when Chart is being printed. |
void |
setSeries(SeriesCollection value)
|
void |
setSubFooter(Footer value)
|
void |
setSubHeader(Header value)
|
void |
setTools(ToolsCollection value)
|
void |
setWalls(Walls value)
|
void |
setWidth(int value)
Sets the Chart width in pixels. |
void |
setZoom(Zoom zoom)
|
java.util.Iterator |
tools()
|
void |
undoZoom()
Obsolete. Please use tChart1.Zoom.Undo method. |
Methods inherited from class com.steema.teechart.TeeBase |
---|
getChart, invalidate, setBooleanProperty, setChart, setColorProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.steema.teechart.IBaseChart |
---|
invalidate |
Field Detail |
---|
protected Aspect aspect
protected transient boolean iClicked
protected Axes axes
protected transient IGraphics3D graphics3D
protected Legend legend
protected SeriesCollection series
protected transient IChart parent
protected Page page
protected transient boolean restoredAxisScales
protected transient ChartPen legendPen
protected transient boolean printing
public boolean clipWhenMetafiling
public boolean clipWhenPrinting
protected transient int seriesWidth3D
protected transient int seriesHeight3D
protected transient int maxZOrder
protected Rectangle chartBounds
protected Rectangle chartRect
protected Zoom zoom
public AxisSavedScales left
public AxisSavedScales top
public AxisSavedScales right
public AxisSavedScales bottom
Constructor Detail |
---|
public Chart()
public Chart(IChart parent)
public Chart(IChart parent, java.awt.Cursor cursor)
Method Detail |
---|
protected java.lang.Object readResolve()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.awt.Image image(int width, int height)
image
in interface IBaseChart
public Rectangle getChartBounds()
getChartBounds
in interface IBaseChart
public void setChartBounds(Rectangle value)
value
- Rectanglepublic int getWidth()
getWidth
in interface IBaseChart
public void setWidth(int value)
setWidth
in interface IBaseChart
value
- intpublic int getHeight()
getHeight
in interface IBaseChart
public void setHeight(int value)
setHeight
in interface IBaseChart
value
- intpublic int getLeft()
getLeft
in interface IBaseChart
public int getRight()
getRight
in interface IBaseChart
public int getTop()
getTop
in interface IBaseChart
protected int getChartRectBottom()
protected int chartRectWidth()
protected int chartRectHeight()
public void doChangedBrush(ChartBrush value)
doChangedBrush
in interface IBaseChart
public void doChangedFont(ChartFont value)
doChangedFont
in interface IBaseChart
public boolean canDrawPanelBack()
canDrawPanelBack
in interface IBaseChart
public boolean getPrinting()
getPrinting
in interface IBaseChart
public void setPrinting(boolean value)
setPrinting
in interface IBaseChart
value
- booleanpublic void setCancelMouse(boolean value)
setCancelMouse
in interface IBaseChart
public static Series changeSeriesType(Series series, java.lang.Class newClass)
public static void changeAllSeriesType(Chart chart, java.lang.Class newClass)
protected void removeAllComponents()
public TeeEventListeners getListeners()
protected void removeListener(ITeeEventListener sender)
public boolean isValidDataSource(Series s, java.lang.Object source)
public void restoreAxisScales()
restoreAxisScales
in interface IBaseChart
public int getNumPages()
getNumPages
in interface IBaseChart
public ToolTip getToolTip()
getToolTip
in interface IBaseChart
public Series activeSeriesLegend(int itemIndex)
activeSeriesLegend
in interface IBaseChart
itemIndex
- int
public java.lang.String getSeriesTitleLegend(int seriesIndex, boolean onlyActive)
getSeriesTitleLegend
in interface IBaseChart
seriesIndex
- intonlyActive
- boolean
protected void internalDraw(IGraphics3D g)
g
- IGraphics3Dpublic Zoom getZoom()
public void setZoom(Zoom zoom)
public Scroll getPanning()
public void setPanning(Scroll panning)
protected void checkZoomPanning(java.awt.event.MouseEvent e)
protected void broadcastMouseEvent(java.awt.event.MouseEvent e)
protected java.awt.Cursor broadcastMouseEvent(java.awt.event.MouseEvent e, java.awt.Cursor c)
protected void broadcastToolEvent(ChartDrawEvent ce)
public void broadcastEvent(TeeEvent event)
broadcastEvent
in interface IBaseChart
public TeeEvent broadcastEvent(Series s, SeriesEventStyle e)
broadcastEvent
in interface IBaseChart
public int getSeriesIndexOf(Series value)
getSeriesIndexOf
in interface IBaseChart
public SeriesCollection getSeries()
getSeries
in interface IBaseChart
public Series getSeries(int seriesIndex)
getSeries
in interface IBaseChart
public void setSeries(SeriesCollection value)
public void mousePressed(java.awt.event.MouseEvent e)
public java.awt.Cursor mouseMoved(java.awt.event.MouseEvent e)
public java.awt.Cursor doMouseMove(int x, int y, java.awt.Cursor c)
public void doZoom(double topx, double topy, double bottomx, double bottomy, double leftx, double lefty, double rightx, double righty)
doZoom
in interface IBaseChart
public void doZoom(java.awt.geom.Point2D.Double top, java.awt.geom.Point2D.Double bot, java.awt.geom.Point2D.Double lef, java.awt.geom.Point2D.Double rig)
doZoom
in interface IBaseChart
public void mouseReleased(java.awt.event.MouseEvent e)
public void undoZoom()
public void setBrushCanvas(Color aColor, ChartBrush aBrush, Color aBackColor)
setBrushCanvas
in interface IBaseChart
public boolean canClip()
canClip
in interface IBaseChart
public Rectangle recalcWidthHeight(Rectangle r)
recalcWidthHeight
in interface IBaseChart
public Series getAxisSeries(Axis axis)
axis
- Axis
public double internalMinMax(Axis aAxis, boolean isMin, boolean isX)
internalMinMax
in interface IBaseChart
public int maxTextWidth()
maxTextWidth
in interface IBaseChart
public int maxMarkWidth()
maxMarkWidth
in interface IBaseChart
public MultiLine multiLineTextWidth(java.lang.String s)
multiLineTextWidth
in interface IBaseChart
public double getMaxXValue(Axis axis)
getMaxXValue
in interface IBaseChart
axis
- Axis
public double getMaxYValue(Axis axis)
getMaxYValue
in interface IBaseChart
axis
- Axis
public double getMinXValue(Axis axis)
getMinXValue
in interface IBaseChart
axis
- Axis
public double getMinYValue(Axis axis)
getMinYValue
in interface IBaseChart
axis
- Axis
public boolean isFreeSeriesColor(Color color, boolean checkBackground)
color
- ColorcheckBackground
- boolean When true, uses current Chart background
public Color freeSeriesColor(boolean checkBackground)
freeSeriesColor
in interface IBaseChart
checkBackground
- boolean
public void paint(IGraphics3D g, Rectangle rect)
paint
in interface IBaseChart
g
- IGraphics3Drect
- Rectanglepublic void paint()
public void paint(IGraphics3D g)
paint
in interface IBaseChart
g
- IGraphics3Dpublic void paint(IGraphics3D g, int width, int height)
public Series getItem(int index)
tChart1[0].Color=Color.Blue; is equivalent to tChart1.Series[0].Color=Color.Blue;
index
- int
public void setItem(int index, Series value)
index
- intvalue
- Seriespublic boolean isAxisVisible(Axis a)
isAxisVisible
in interface IBaseChart
public Series getFirstActiveSeries()
getFirstActiveSeries
in interface IBaseChart
public java.lang.String formattedValueLegend(Series aSeries, int valueIndex)
formattedValueLegend
in interface IBaseChart
aSeries
- SeriesvalueIndex
- int
public Rectangle doDrawLegend(IGraphics3D g, Rectangle tmp)
doDrawLegend
in interface IBaseChart
public int countActiveSeries()
countActiveSeries
in interface IBaseChart
public boolean isAxisCustom(Axis axis)
isAxisCustom
in interface IBaseChart
public Series seriesLegend(int itemIndex, boolean onlyActive)
seriesLegend
in interface IBaseChart
itemIndex
- intonlyActive
- boolean
public java.lang.String formattedLegend(int seriesOrValueIndex)
formattedLegend
in interface IBaseChart
seriesOrValueIndex
- int
public int getMaxValuesCount()
getMaxValuesCount
in interface IBaseChart
public Panel getPanel()
getPanel
in interface IBaseChart
public void setPanel(Panel value)
public void setParent(IChart value)
value
- IChartpublic Printer getPrinter()
public void setPrinter(Printer value)
public Page getPage()
getPage
in interface IBaseChart
public void setPage(Page value)
public Legend getLegend()
getLegend
in interface IBaseChart
public void setLegend(Legend value)
setLegend
in interface IBaseChart
public Header getHeader()
getHeader
in interface IBaseChart
public void setHeader(Header value)
public Header getTitle()
public Header getSubTitle()
public Header getSubHeader()
public void setSubHeader(Header value)
public Footer getFooter()
public void setFooter(Footer value)
public Footer getSubFooter()
public void setSubFooter(Footer value)
public Aspect getAspect()
getAspect
in interface IBaseChart
public void setAspect(Aspect value)
public IGraphics3D getGraphics3D()
getGraphics3D
in interface IBaseChart
public void setGraphics3D(IGraphics3D value)
setGraphics3D
in interface IBaseChart
public Tool getTool(int index)
index
- int
public ToolsCollection getTools()
getTools
in interface IBaseChart
public void setTools(ToolsCollection value)
public Walls getWalls()
getWalls
in interface IBaseChart
public void setWalls(Walls value)
public Axes getAxes()
getAxes
in interface IBaseChart
public void setAxes(Axes value)
public Exports getExport()
public void setExport(Exports value)
public Imports getImport()
public void setImport(Imports value)
public int getSeriesHeight3D()
getSeriesHeight3D
in interface IBaseChart
public int getSeriesWidth3D()
getSeriesWidth3D
in interface IBaseChart
public ChartPen getLegendPen()
getLegendPen
in interface IBaseChart
public void setLegendPen(ChartPen value)
setLegendPen
in interface IBaseChart
public void moveSeriesTo(Series value, int newIndex)
moveSeriesTo
in interface IBaseChart
public void removeSeries(Series value)
removeSeries
in interface IBaseChart
value
- Seriespublic int addSeries(Series value)
addSeries
in interface IBaseChart
public int getBottom()
getBottom
in interface IBaseChart
public int getMaxZOrder()
getMaxZOrder
in interface IBaseChart
public void setMaxZOrder(int value)
setMaxZOrder
in interface IBaseChart
public boolean getAutoRepaint()
getAutoRepaint
in interface IBaseChart
public void setAutoRepaint(boolean value)
setAutoRepaint
in interface IBaseChart
value
- booleanpublic Rectangle getChartRect()
getChartRect
in interface IBaseChart
public void setChartRect(Rectangle value)
setChartRect
in interface IBaseChart
value
- Rectanglepublic int getSeriesCount()
getSeriesCount
in interface IBaseChart
public java.util.Iterator series()
public java.util.Iterator tools()
public void doBaseInvalidate()
doBaseInvalidate
in interface IBaseChart
public IChart getParent()
getParent
in interface IBaseChart
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |