com::cosylab::gui::components::r2::chart::BaseChart Class Reference

Inheritance diagram for com::cosylab::gui::components::r2::chart::BaseChart:
Inheritance graph
[legend]
Collaboration diagram for com::cosylab::gui::components::r2::chart::BaseChart:
Collaboration graph
[legend]

List of all members.

Classes

class  ChartUpdater

Public Member Functions

 BaseChart ()
void addNotify ()
ChartArea getChartArea ()
BaseChartCustomizer getChartCustomizer ()
ChartDecorator getChartDecorator ()
int getChartDisplayablePointCount ()
Chartics getChartics ()
ChartStyleManager getChartStyleManager ()
ChartDecorator getDefaultChartDecorator ()
java.awt.Insets getMargin ()
ChartViewManager getViewManager ()
ChartXAxis getXAxis ()
ChartYAxis getYAxis ()
void setBackground (java.awt.Color c)
void setChartArea (ChartArea newChartArea)
void setChartDecorator (ChartDecorator newChartDecorator)
void setChartics (Chartics newChartics)
void setChartStyleManager (ChartStyleManager newChartStyleManager)
void setDefaultChartDecorator (ChartDecorator newDefaultChartDecorator)
void setMargin (java.awt.Insets newMargin)
void setViewManager (ChartViewManager newViewManager)
void setXAxis (ChartXAxis newXAxis)
void setYAxis (ChartYAxis newYAxis)
void updateChart (ChartUpdateRequest request)

Static Public Member Functions

static void main (java.lang.String[] args)

Static Public Attributes

static final java.lang.String PROPERTY_CHART = "chart"

Protected Member Functions

void drawAxis (java.awt.Graphics g)
void drawData (java.awt.Graphics g, ChartUpdateRequest request)
void paintComponent (java.awt.Graphics g)
void updateMainBuffer (ChartUpdateRequest request)
synchronized void updateImageBuffer (ChartUpdateRequest request)
synchronized void updateLayout ()

Package Functions

 [instance initializer]

Private Member Functions

void _mouseClicked (java.awt.event.MouseEvent mouseEvent)
void handleException (java.lang.Throwable exception)

Private Attributes

java.awt.Rectangle chartRectangle
java.awt.Insets userMargin = new java.awt.Insets(30, 10, 10, 40)
BaseChartCustomizer chartCustomizer
Chartics chartics
ChartArea chartArea
ChartStyleManager chartStyleManager
ChartXAxis xAxis
ChartYAxis yAxis
ChartViewManager viewManager = null
ChartDecorator chartDecorator
ChartDecorator defaultChartDecorator = new DefaultChartDecorator()
int updateRequests = 0
ChartUpdater updater = new ChartUpdater()

Detailed Description

0*********1*********2*********3*********4*********5*********6*********7** BaseChart is basic component, which binds together all chart related interfaces and puts on screen by interfaces prepared image. BaseChart buffers chart image. Following interfaces are registered at BaseChart:

Chartics
a graphics wrapper
ChartArea
chart image producer and data holder
ChartXAxis
draws X axis
ChartYAxis
draws Y axis
ChartViewManager
handles chart scale and zooming

User is encouraged to implement its own custom behaviour in case default implementation is not suitable.

BaseChart tends to be as lightweight as possible. All real charting work is done by upper interfaces. BaseChart is merely joins them together. Idea behind is, that you can not have one component (peace of code) to be in the same time highly customisable and really fast. This chart package ties to achieve both, performance and flexibility, with collaboration of objects.

See also:
com.cosylab.gui.chart.Chartics
com.cosylab.gui.chart.ChartArea
com.cosylab.gui.chart.ChartXAxis
com.cosylab.gui.chart.ChartYAxis
com.cosylab.gui.chart.ChartViewManager

Constructor & Destructor Documentation

com::cosylab::gui::components::r2::chart::BaseChart::BaseChart (  )  [inline]

Member Function Documentation

com::cosylab::gui::components::r2::chart::BaseChart::[instance initializer] (  )  [inline, package]
void com::cosylab::gui::components::r2::chart::BaseChart::_mouseClicked ( java.awt.event.MouseEvent  mouseEvent  )  [inline, private]
void com::cosylab::gui::components::r2::chart::BaseChart::addNotify (  )  [inline]
See also:
javax.swing.JComponent.addNotify()

This method also update Layout.

References updateLayout().

void com::cosylab::gui::components::r2::chart::BaseChart::drawAxis ( java.awt.Graphics  g  )  [inline, protected]

Draws axis around chart area.

Parameters:
g java.awt.Graphics

References com::cosylab::gui::components::r2::chart::ChartAxis::drawAxis(), getXAxis(), getYAxis(), and handleException().

Referenced by updateImageBuffer().

void com::cosylab::gui::components::r2::chart::BaseChart::drawData ( java.awt.Graphics  g,
ChartUpdateRequest  request 
) [inline, protected]

Draws chart.

Parameters:
g java.awt.Graphics

References com::cosylab::gui::components::r2::chart::ChartArea::drawData(), getChartArea(), getChartics(), and handleException().

Referenced by updateImageBuffer().

ChartArea com::cosylab::gui::components::r2::chart::BaseChart::getChartArea (  )  [inline]
BaseChartCustomizer com::cosylab::gui::components::r2::chart::BaseChart::getChartCustomizer (  )  [inline]

This method return BaseChartCustomizer that is used for customizing some settings of chart.

Returns:
si.ijs.anka.databush.utilities.BaseChartCustomizer

References chartCustomizer, and handleException().

Referenced by _mouseClicked().

ChartDecorator com::cosylab::gui::components::r2::chart::BaseChart::getChartDecorator (  )  [inline]

Insert the method's description here. Creation date: (28.1.2002 12:45:17)

Returns:
com.cosylab.gui.chart.ChartDecorator

References chartDecorator.

int com::cosylab::gui::components::r2::chart::BaseChart::getChartDisplayablePointCount (  )  [inline]

Insert the method's description here. Creation date: (11/24/00 18:24:52)

Returns:
int

Implements com::cosylab::gui::components::r2::chart::ChartService.

References getChartArea(), and com::cosylab::gui::components::r2::chart::ChartArea::getChartRectangle().

Chartics com::cosylab::gui::components::r2::chart::BaseChart::getChartics (  )  [inline]

Insert the method's description here. Creation date: (11/27/00 15:15:46)

Returns:
si.ijs.anka.databush.utilities.Chartics

References chartics, and com::cosylab::gui::components::r2::chart::Chartics::setBackground().

Referenced by drawData(), paintComponent(), setBackground(), updateImageBuffer(), and updateMainBuffer().

ChartStyleManager com::cosylab::gui::components::r2::chart::BaseChart::getChartStyleManager (  )  [inline]
ChartDecorator com::cosylab::gui::components::r2::chart::BaseChart::getDefaultChartDecorator (  )  [inline]

Insert the method's description here. Creation date: (28.1.2002 12:47:54)

Returns:
com.cosylab.gui.chart.ChartDecorator

References defaultChartDecorator.

java.awt.Insets com::cosylab::gui::components::r2::chart::BaseChart::getMargin (  )  [inline]

This method returns margins of drawing area.

Returns:
java.awt.Insets

References userMargin.

ChartViewManager com::cosylab::gui::components::r2::chart::BaseChart::getViewManager (  )  [inline]
ChartXAxis com::cosylab::gui::components::r2::chart::BaseChart::getXAxis (  )  [inline]
ChartYAxis com::cosylab::gui::components::r2::chart::BaseChart::getYAxis (  )  [inline]
void com::cosylab::gui::components::r2::chart::BaseChart::handleException ( java.lang.Throwable  exception  )  [inline, private]

Called whenever the part throws an exception.

Parameters:
exception java.lang.Throwable

Referenced by drawAxis(), drawData(), and getChartCustomizer().

static void com::cosylab::gui::components::r2::chart::BaseChart::main ( java.lang.String[]  args  )  [inline, static]

Starts simple chart demo presentation.

Parameters:
args java.lang.String[]

References com::cosylab::gui::components::r2::chart::ChartArea::addDataModel(), BaseChart(), and getChartArea().

void com::cosylab::gui::components::r2::chart::BaseChart::paintComponent ( java.awt.Graphics  g  )  [inline, protected]

Insert the method's description here. Creation date: (11/20/00 12:27:38)

Parameters:
g java.awt.Graphics

References chartRectangle, getChartics(), getXAxis(), getYAxis(), com::cosylab::gui::components::r2::chart::BaseChart::ChartUpdater::queueRequest(), updater, updateRequests, and userMargin.

void com::cosylab::gui::components::r2::chart::BaseChart::setBackground ( java.awt.Color  c  )  [inline]
void com::cosylab::gui::components::r2::chart::BaseChart::setChartArea ( ChartArea  newChartArea  )  [inline]

Insert the method's description here. Creation date: (11/27/00 15:16:29)

Parameters:
newChartArea si.ijs.anka.databush.utilities.ChartArea

References chartArea, getChartArea(), com::cosylab::gui::components::r2::chart::ChartArea::setChartService(), and updateLayout().

Referenced by com::cosylab::gui::components::r2::chart::AbstractChartDecorator::applyFlavor(), and com::cosylab::gui::components::r2::chart::TrendDemo::initialize().

void com::cosylab::gui::components::r2::chart::BaseChart::setChartDecorator ( ChartDecorator  newChartDecorator  )  [inline]

Insert the method's description here. Creation date: (28.1.2002 12:45:17)

Parameters:
newChartDecorator com.cosylab.gui.chart.ChartDecorator

References chartDecorator.

void com::cosylab::gui::components::r2::chart::BaseChart::setChartics ( Chartics  newChartics  )  [inline]

Insert the method's description here. Creation date: (11/27/00 15:15:46)

Parameters:
newChartics si.ijs.anka.databush.utilities.Chartics

References chartics.

void com::cosylab::gui::components::r2::chart::BaseChart::setChartStyleManager ( ChartStyleManager  newChartStyleManager  )  [inline]

Insert the method's description here. Creation date: (31.03.2001 00:32:16)

Parameters:
newChartStyleManager si.ijs.kgb.chart.ChartStyleManager

References chartStyleManager, getChartArea(), and com::cosylab::gui::components::r2::chart::ChartArea::setChartService().

Referenced by com::cosylab::gui::components::r2::chart::AbstractChartDecorator::applyFlavor().

void com::cosylab::gui::components::r2::chart::BaseChart::setDefaultChartDecorator ( ChartDecorator  newDefaultChartDecorator  )  [inline]

Insert the method's description here. Creation date: (28.1.2002 12:47:54)

Parameters:
newDefaultChartDecorator com.cosylab.gui.chart.ChartDecorator

References defaultChartDecorator.

void com::cosylab::gui::components::r2::chart::BaseChart::setMargin ( java.awt.Insets  newMargin  )  [inline]

Insert the method's description here. Creation date: (11/20/00 12:21:51)

Parameters:
newMargin java.awt.Insets

References updateLayout(), and userMargin.

void com::cosylab::gui::components::r2::chart::BaseChart::setViewManager ( ChartViewManager  newViewManager  )  [inline]

Insert the method's description here. Creation date: (24/12/01 23:07:45)

Parameters:
newViewManager com.cosylab.gui.chart.ChartViewManager

References getChartArea(), getViewManager(), getXAxis(), getYAxis(), com::cosylab::gui::components::r2::chart::ChartArea::setChartService(), com::cosylab::gui::components::r2::chart::ChartAxis::setViewManager(), and viewManager.

Referenced by com::cosylab::gui::components::r2::chart::AbstractChartDecorator::applyFlavor().

void com::cosylab::gui::components::r2::chart::BaseChart::setXAxis ( ChartXAxis  newXAxis  )  [inline]
void com::cosylab::gui::components::r2::chart::BaseChart::setYAxis ( ChartYAxis  newYAxis  )  [inline]
void com::cosylab::gui::components::r2::chart::BaseChart::updateChart ( ChartUpdateRequest  request  )  [inline]
synchronized void com::cosylab::gui::components::r2::chart::BaseChart::updateImageBuffer ( ChartUpdateRequest  request  )  [inline, protected]
synchronized void com::cosylab::gui::components::r2::chart::BaseChart::updateLayout (  )  [inline, protected]
void com::cosylab::gui::components::r2::chart::BaseChart::updateMainBuffer ( ChartUpdateRequest  request  )  [inline, protected]

Member Data Documentation

Referenced by getChartArea(), and setChartArea().

Referenced by getChartCustomizer().

Referenced by paintComponent(), and updateChart().

Referenced by paintComponent(), and updateChart().

java.awt.Insets com::cosylab::gui::components::r2::chart::BaseChart::userMargin = new java.awt.Insets(30, 10, 10, 40) [private]

Referenced by getViewManager(), and setViewManager().

Referenced by getXAxis(), and setXAxis().

Referenced by getYAxis(), and setYAxis().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2