com.steema.teechart
Class TChart

java.lang.Object
  extended by Field
      extended by com.steema.teechart.TChart
All Implemented Interfaces:
IChart

public class TChart
extends Field
implements IChart

Title: TeeChart for BlackBerry

Description: TeeChart for BlackBerry

Copyright: (c) 2005-2012 by Steema Software. All Rights Reserved.

Company: Steema Software SL


Nested Class Summary
static interface TChart.Scrollable
           
 
Field Summary
protected  AxisLabelResolver axisLabelResolver
           
protected  LegendResolver legendResolver
           
 Point mousePosition
           
protected  TChart.Scrollable scrollable
           
 
Constructor Summary
TChart()
           
 
Method Summary
 Series addSeries(Series s)
          Adds a new Series.
 void checkBackground(java.lang.Object sender, FrameworkMouseEvent e)
           
 boolean checkClickSeries()
           
 Graphics3D checkGraphics()
           
 void checkTitle(Title aTitle, FrameworkMouseEvent e, ClickedParts c)
           
 void copyToClipboard(java.lang.Object content)
           
 void doAfterDraw()
           
 void doAfterDrawSeries()
           
 void doAllowScroll(Axis a, double delta, ScrollResult result)
           
 void doBeforeDraw()
           
 void doBeforeDrawAxes()
           
 void doBeforeDrawSeries()
           
 void doChartPrint()
           
 void doClickAxis(Axis a, FrameworkMouseEvent e)
           
 void doClickLegend(Legend legend, FrameworkMouseEvent e)
           
 void doClickSeries(java.lang.Object sender, Series s, int valueIndex, FrameworkMouseEvent e)
           
 void doDrawImage(IGraphics3D g)
           
 void doInvalidate()
           
 void doScroll(java.lang.Object sender)
           
 void doSetBuffered(boolean value)
           
 void doUnZoomed(java.lang.Object sender)
           
 void doZoomed(java.lang.Object sender)
           
protected  void fireChartAdded(ChartEvent e)
           
protected  boolean fireChartClicked(ChartMouseEvent e)
           
protected  void fireChartMotion(ChartEvent e)
           
protected  void fireChartPaint(ChartDrawEvent e)
           
protected  void fireChartPrint(ChartDrawEvent ce)
           
protected  void fireSeriesClick(SeriesMouseEvent seriesClickEvent)
           
 Aspect getAspect()
          Accesses view characteristics of the Chart.
 boolean getAutoRepaint()
          Enables/Disables repainting of Chart when points are added.
 Axes getAxes()
           
 AxisLabelResolver getAxisLabelResolver()
           
 Image getBackgroundImage()
          Returns background image of TChart
 IGraphics3D getCanvas()
           
 Chart getChart()
           
 java.lang.Object getControl()
           
 int getControlHeight()
           
 int getControlWidth()
           
 Exports getExport()
           
 Footer getFooter()
          Defines Text shown at the bottom of the Chart.
 java.lang.Object getGraphics()
           
 IGraphics3D getGraphics3D()
           
 Header getHeader()
          Defines the Text and formatting properties to be drawn at the top of the Chart.
 Imports getImport()
           
 Legend getLegend()
          Legend characteristics.
 LegendResolver getLegendResolver()
           
 Page getPage()
          Accesses multiple page characteristics of the Chart.
 Panel getPanel()
          Background visible attributes.
 Scroll getPanning()
          Accesses Panning characteristics.
 int getPreferredHeight()
           
 int getPreferredWidth()
           
 Printer getPrinter()
          Printing related attributes.
 int getScreenHeight()
           
 int getScreenWidth()
           
 SeriesCollection getSeries()
           
 Series getSeries(int index)
           
 int getSeriesCount()
          Returns the number of Series in Chart.
 Footer getSubFooter()
          Defines Text shown directly above Footer.
 Header getSubHeader()
          Defines Text shown directly below Header.
 Cursor getTeeCursor()
           
 java.lang.String getText()
          The text for the Footer, Header, SubFooter and SubHeader.
 ToolsCollection getTools()
           
 Walls getWalls()
           
 Zoom getZoom()
          Accesses the Zoom characteristics of the Chart.
 Image image(int width, int height)
           
 boolean invertedRotation()
           
 boolean isDesignTime()
           
 boolean isFocusable()
           
protected  void layout(int width, int height)
          Lay out the graph
 void mouseDragged(FrameworkMouseEvent e)
           
 void mouseMoved(FrameworkMouseEvent e)
          Captures current mouse position every time the mouse is moved.
protected  void onDraw(Graphics canvas)
           
 boolean onTouch(Field v, TouchEvent message)
           
 boolean onTrackballEvent(TouchEvent message)
           
protected  void paint(Graphics graphics)
           
 Point pointToScreen(Point p)
           
protected  void processMouseEvent(FrameworkMouseEvent e)
           
protected  void processMouseMotionEvent(FrameworkMouseEvent e)
           
 void refreshControl()
           
 void removeAllSeries()
          Removes all Series.
 void removeAxisLabelResolver()
           
 void removeLegendResolver()
           
 void removeScrollable()
           
 void setAutoRepaint(boolean value)
          Enables/Disables repainting of Chart when points are added.
 void setAxes(Axes axes)
           
 void setAxisLabelResolver(AxisLabelResolver resolver)
           
 void setBackground(Color value)
          Sets the color the Chart rectangle is filled with.
 void setCanvas(Graphics3D value)
           
 void setChart(Chart value)
           
 void setCursor(Cursor cursor)
           
 void setExtent(int xwidth, int xheight)
           
 void setFooter(Footer footer)
           
 void setGraphics3D(Graphics3D value)
           
 void setHeader(Header header)
           
 void setHeight(int value)
           
 void setLegend(Legend legend)
           
 void setLegendResolver(LegendResolver resolver)
           
 void setOpaque(boolean value)
           
 void setPage(Page page)
           
 void setPanel(Panel panel)
           
 void setPanning(Scroll panning)
           
 void setPrinter(Printer printer)
           
 void setScrollable(TChart.Scrollable scrollable)
           
 void setSeries(int index, Series value)
           
 void setSubFooter(Footer subFooter)
           
 void setSubHeader(Header subHeader)
           
 void setText(java.lang.String value)
          Sets the text for the Footer, Header, SubFooter and SubHeader.
 void setToolTip(ToolTip tooltip, java.lang.String text)
           
 void setWalls(Walls walls)
           
 void setWidth(int value)
           
 void setZoom(Zoom zoom)
           
 void showEditor()
          Shows the TeeChart editor dialog.
 void timerExec(int time, java.lang.Runnable runnable)
           
 Chart xmlDecode(java.io.InputStream stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.steema.teechart.IChart
isDisposing, setDisposing
 

Field Detail

mousePosition

public Point mousePosition

scrollable

protected TChart.Scrollable scrollable

legendResolver

protected transient LegendResolver legendResolver

axisLabelResolver

protected transient AxisLabelResolver axisLabelResolver
Constructor Detail

TChart

public TChart()
Method Detail

fireSeriesClick

protected void fireSeriesClick(SeriesMouseEvent seriesClickEvent)

fireChartAdded

protected void fireChartAdded(ChartEvent e)

fireChartClicked

protected boolean fireChartClicked(ChartMouseEvent e)

fireChartMotion

protected void fireChartMotion(ChartEvent e)

fireChartPaint

protected void fireChartPaint(ChartDrawEvent e)

fireChartPrint

protected void fireChartPrint(ChartDrawEvent ce)

getPreferredWidth

public int getPreferredWidth()

getPreferredHeight

public int getPreferredHeight()

setExtent

public void setExtent(int xwidth,
                      int xheight)

paint

protected void paint(Graphics graphics)

onDraw

protected void onDraw(Graphics canvas)

getTeeCursor

public Cursor getTeeCursor()
Specified by:
getTeeCursor in interface IChart

doBeforeDrawAxes

public void doBeforeDrawAxes()
Specified by:
doBeforeDrawAxes in interface IChart

doAfterDrawSeries

public void doAfterDrawSeries()
Specified by:
doAfterDrawSeries in interface IChart

doBeforeDrawSeries

public void doBeforeDrawSeries()
Specified by:
doBeforeDrawSeries in interface IChart

doAfterDraw

public void doAfterDraw()
Specified by:
doAfterDraw in interface IChart

doBeforeDraw

public void doBeforeDraw()
Specified by:
doBeforeDraw in interface IChart

doClickSeries

public void doClickSeries(java.lang.Object sender,
                          Series s,
                          int valueIndex,
                          FrameworkMouseEvent e)
Specified by:
doClickSeries in interface IChart

doAllowScroll

public void doAllowScroll(Axis a,
                          double delta,
                          ScrollResult result)
Specified by:
doAllowScroll in interface IChart

setCursor

public void setCursor(Cursor cursor)
Specified by:
setCursor in interface IChart

setOpaque

public void setOpaque(boolean value)
Specified by:
setOpaque in interface IChart

setToolTip

public void setToolTip(ToolTip tooltip,
                       java.lang.String text)
Specified by:
setToolTip in interface IChart

refreshControl

public void refreshControl()
Specified by:
refreshControl in interface IChart

checkTitle

public void checkTitle(Title aTitle,
                       FrameworkMouseEvent e,
                       ClickedParts c)
Specified by:
checkTitle in interface IChart

doClickLegend

public void doClickLegend(Legend legend,
                          FrameworkMouseEvent e)
Specified by:
doClickLegend in interface IChart

doScroll

public void doScroll(java.lang.Object sender)
Specified by:
doScroll in interface IChart

doZoomed

public void doZoomed(java.lang.Object sender)
Specified by:
doZoomed in interface IChart

doSetBuffered

public void doSetBuffered(boolean value)
Specified by:
doSetBuffered in interface IChart

doUnZoomed

public void doUnZoomed(java.lang.Object sender)
Specified by:
doUnZoomed in interface IChart

doInvalidate

public void doInvalidate()
Specified by:
doInvalidate in interface IChart

pointToScreen

public Point pointToScreen(Point p)
Specified by:
pointToScreen in interface IChart

getChart

public Chart getChart()

showEditor

public void showEditor()
Shows the TeeChart editor dialog. Displays the Chart Editor at runtime opening the Editor at the Series page of the SeriesIndex Series.


getText

public java.lang.String getText()
The text for the Footer, Header, SubFooter and SubHeader.

Returns:
String

setText

public void setText(java.lang.String value)
Sets the text for the Footer, Header, SubFooter and SubHeader.

Parameters:
value - String

getPanel

public Panel getPanel()
Background visible attributes.
Provides access, via the Panel Interface, to all Chart Panel properties.

Returns:
Panel

getPrinter

public Printer getPrinter()
Printing related attributes.

Returns:
Printer

getPage

public Page getPage()
Accesses multiple page characteristics of the Chart.

Returns:
Page

getLegend

public Legend getLegend()
Legend characteristics.
The Legend property determines the text and drawing attributes of Chart's textual representation of Series and Series values.
The Legend class draws a rectangle and for each Series in a Chart (or for each point in a Series) outputs a text representation of that Series (or that point).
You can use the Legend.LegendStyle and Legend.TextStyle properties to control the text used to draw the legend.
The Legend can be positioned at Left, Right, Top and Bottom chart sides using the Legend.Alignment property.
Use the Legend.Visible property to show / hide the Legend.
The Inverted property makes Legend to draw text starting from bottom.
The Frame, Font and Color properties allow you to change Legend appearance.
The Legend.ColorWidth property determines the percent width of each item's "colored" mark.
The Legend.FirstValue property controls which Series (or Series point) will be used to draw first Legend item.

Returns:
Legend

getHeader

public Header getHeader()
Defines the Text and formatting properties to be drawn at the top of the Chart.
Use Text to enter the desired Header lines, set Visible to True and change the Font, Frame and Brush methods.
Use Alignment to control text output position.

Returns:
Header

getSubHeader

public Header getSubHeader()
Defines Text shown directly below Header.
Use the Text method to enter the desired SubHeader lines, set Visible to True and change the Font, Frame and Brush methods.
Use the Alignment method to control text output position.

Returns:
Header

getFooter

public Footer getFooter()
Defines Text shown at the bottom of the Chart.
Use Text to enter the desired Footer lines, set Visible to True and change the Font, Frame and Brush methods.
Use Alignment to control text output position.

Returns:
Footer

getZoom

public Zoom getZoom()
Accesses the Zoom characteristics of the Chart.

Returns:
Zoom

getPanning

public Scroll getPanning()
Accesses Panning characteristics.

Scrolling speed depends on:
The number of Series and Series Points.
The Chart Width and Height.
The computer processor and Video card processor speed.
The Video resolution and number of colors.
The Windows version and the Video driver.
The speed when dragging the mouse !

Returns:
Scroll

getSubFooter

public Footer getSubFooter()
Defines Text shown directly above Footer.
Use Text to enter the desired SubFooter lines, set Visible to True and change the Font, Frame and Brush methods.
Use Alignment to control text output position.

Returns:
Footer

getAspect

public Aspect getAspect()
Accesses view characteristics of the Chart.
3D view parameters.

Returns:
Aspect

getCanvas

public IGraphics3D getCanvas()

setCanvas

public void setCanvas(Graphics3D value)

getGraphics3D

public IGraphics3D getGraphics3D()

setGraphics3D

public void setGraphics3D(Graphics3D value)

getSeries

public SeriesCollection getSeries()

getTools

public ToolsCollection getTools()

getWalls

public Walls getWalls()

getAxes

public Axes getAxes()

getExport

public Exports getExport()

getImport

public Imports getImport()

getSeries

public Series getSeries(int index)

setAxes

public void setAxes(Axes axes)

setFooter

public void setFooter(Footer footer)

setHeader

public void setHeader(Header header)

setLegend

public void setLegend(Legend legend)

setSubFooter

public void setSubFooter(Footer subFooter)

setSubHeader

public void setSubHeader(Header subHeader)

setWalls

public void setWalls(Walls walls)

setZoom

public void setZoom(Zoom zoom)

setSeries

public void setSeries(int index,
                      Series value)

setPanel

public void setPanel(Panel panel)

setPage

public void setPage(Page page)

setPrinter

public void setPrinter(Printer printer)

setPanning

public void setPanning(Scroll panning)

setBackground

public void setBackground(Color value)
Sets the color the Chart rectangle is filled with.

Parameters:
value - Color

mouseDragged

public void mouseDragged(FrameworkMouseEvent e)

mouseMoved

public void mouseMoved(FrameworkMouseEvent e)
Captures current mouse position every time the mouse is moved.

Parameters:
e - MouseEvent

addSeries

public Series addSeries(Series s)
Adds a new Series.

Parameters:
s - Series
Returns:
Series

getAutoRepaint

public boolean getAutoRepaint()
Enables/Disables repainting of Chart when points are added.
Use AutoRepaint false to disable Chart repainting whilst, for example, adding a large number of points to a Chart Series. This avoids repainting of the Chart whilst the points are added.
AutoRepaint may be re-enabled, followed by a manual Repaint command when all points are added.
Default value: true

Returns:
boolean

setAutoRepaint

public void setAutoRepaint(boolean value)
Enables/Disables repainting of Chart when points are added.
Default value: true

Parameters:
value - boolean
See Also:
getAutoRepaint()

setHeight

public void setHeight(int value)

setWidth

public void setWidth(int value)

removeAllSeries

public void removeAllSeries()
Removes all Series.


getSeriesCount

public int getSeriesCount()
Returns the number of Series in Chart.

Returns:
int

setScrollable

public void setScrollable(TChart.Scrollable scrollable)

removeScrollable

public void removeScrollable()

getBackgroundImage

public Image getBackgroundImage()
Returns background image of TChart

Returns:
Image

doDrawImage

public void doDrawImage(IGraphics3D g)
Specified by:
doDrawImage in interface IChart

setChart

public void setChart(Chart value)
Parameters:
value - Chart

setLegendResolver

public void setLegendResolver(LegendResolver resolver)

removeLegendResolver

public void removeLegendResolver()

getLegendResolver

public LegendResolver getLegendResolver()
Specified by:
getLegendResolver in interface IChart

doChartPrint

public void doChartPrint()
Specified by:
doChartPrint in interface IChart

checkGraphics

public Graphics3D checkGraphics()
Specified by:
checkGraphics in interface IChart

doClickAxis

public void doClickAxis(Axis a,
                        FrameworkMouseEvent e)
Specified by:
doClickAxis in interface IChart

checkBackground

public void checkBackground(java.lang.Object sender,
                            FrameworkMouseEvent e)
Specified by:
checkBackground in interface IChart

setAxisLabelResolver

public void setAxisLabelResolver(AxisLabelResolver resolver)
Specified by:
setAxisLabelResolver in interface IChart

removeAxisLabelResolver

public void removeAxisLabelResolver()
Specified by:
removeAxisLabelResolver in interface IChart

getAxisLabelResolver

public AxisLabelResolver getAxisLabelResolver()
Specified by:
getAxisLabelResolver in interface IChart

processMouseEvent

protected void processMouseEvent(FrameworkMouseEvent e)

processMouseMotionEvent

protected void processMouseMotionEvent(FrameworkMouseEvent e)

checkClickSeries

public boolean checkClickSeries()
Specified by:
checkClickSeries in interface IChart

isDesignTime

public boolean isDesignTime()
Specified by:
isDesignTime in interface IChart

timerExec

public void timerExec(int time,
                      java.lang.Runnable runnable)
Specified by:
timerExec in interface IChart

copyToClipboard

public void copyToClipboard(java.lang.Object content)
Specified by:
copyToClipboard in interface IChart

xmlDecode

public Chart xmlDecode(java.io.InputStream stream)
Specified by:
xmlDecode in interface IChart

getGraphics

public java.lang.Object getGraphics()
Specified by:
getGraphics in interface IChart

getScreenHeight

public int getScreenHeight()
Specified by:
getScreenHeight in interface IChart

getScreenWidth

public int getScreenWidth()
Specified by:
getScreenWidth in interface IChart

getControl

public java.lang.Object getControl()
Specified by:
getControl in interface IChart

getControlWidth

public int getControlWidth()
Specified by:
getControlWidth in interface IChart

getControlHeight

public int getControlHeight()
Specified by:
getControlHeight in interface IChart

image

public Image image(int width,
                   int height)
Specified by:
image in interface IChart

onTouch

public boolean onTouch(Field v,
                       TouchEvent message)

onTrackballEvent

public boolean onTrackballEvent(TouchEvent message)

invertedRotation

public boolean invertedRotation()
Specified by:
invertedRotation in interface IChart

layout

protected void layout(int width,
                      int height)

Lay out the graph

Parameters:
width - The maximum width available.
height - The maximum height available.

isFocusable

public boolean isFocusable()