|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--com.odesys.chart.Chart
Chart is the abstract superclass of all charts. It is responsible for arranging the views (chart and legend), double buffering, proper updating, showing tooltips etc. All jdk 1.0 compliant implementations should extend the Chart subclasses to add specific Event handling and user interaction.
Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
static java.awt.Font |
nullFont
|
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 | |
Chart()
Creates a Chart instance. |
Method Summary | |
abstract ChartView |
createChartView()
Factory method that should be implemented by the subclasses. |
abstract ChartModel |
createDefaultModel()
Factory method that should be implemented by the subclasses. |
abstract ChartView |
createLegendView()
Factory method that should be implemented by the subclasses. |
void |
drawChart(java.awt.Graphics g)
Draws this Chart in the specified Graphics context |
void |
drawChildView(java.awt.Graphics g,
ChartView view)
Draws the specified ChartView in the specified Graphics context. |
void |
drawTooltip(java.awt.Graphics g)
Utility method that draws the current tooltip |
abstract java.lang.Object |
fromPoint(java.awt.Point p)
Gets the Object associated with the Point specified as a parameter. |
java.awt.Image |
getBackgroundImage()
Gets the background image of this Chart. |
ChartView |
getChartView()
Gets the ChartView of this Chart. |
java.awt.FontMetrics |
getFontMetrics(java.awt.Font font)
|
ChartView |
getLegendView()
Gets the specific ChartView of this Chart that draws the Legend. |
int |
getMinSize()
Returns the width or the height of this Chart depending on which one is less. |
ChartModel |
getModel()
Gets the data Model of this Chart. |
boolean |
isLegendVisible()
Determines whether this Chart's Legend is visible. |
void |
layout()
Positions the child ChartViews within this Chart |
void |
layout(java.awt.Graphics g)
Updates the layout of this Chart so it is drawn best in the specified Graphics context. |
void |
modelChanged(ModelChangedEvent e)
Called when the ChartModel was changed and the Chart should be updated. |
boolean |
mouseDown(java.awt.Event e,
int x,
int y)
Overriden to allow for the tooltip support. |
boolean |
mouseExit(java.awt.Event e,
int x,
int y)
Overriden to allow for the tooltip support. |
boolean |
mouseMove(java.awt.Event e,
int x,
int y)
Overriden to allow for the tooltip support. |
void |
paint(java.awt.Graphics g)
Draws this Chart in the specified Graphics context using double buffering. |
void |
setBackgroundImage(java.awt.Image image)
Sets the background image of this Chart. |
void |
setFont(java.awt.Font font)
Sets the Font of this Chart. |
void |
setLegendVisible(boolean visible)
Shows or hides the Legend of this Chart depending on the value of parameter visible. |
void |
setModel(ChartModel model)
Sets the data Model of this Chart. |
void |
setTooltip(java.lang.String text,
int x,
int y)
Sets the text and the position of the tooltip to be displayed on this Chart. |
abstract java.lang.String |
tooltipFor(java.lang.Object target)
Gets the tooltip text for the Object specified as a parameter. |
java.awt.Point |
translate(java.awt.Point p,
ChartView target)
Translates the point to the coordinate system of the target ChartView. |
void |
update(java.awt.Graphics g)
|
Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDrag, mouseEnter, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.awt.Font nullFont
Constructor Detail |
public Chart()
Method Detail |
public abstract ChartView createChartView()
public abstract ChartView createLegendView()
public abstract ChartModel createDefaultModel()
public abstract java.lang.Object fromPoint(java.awt.Point p)
p
- The Point we need to find an Object for.public abstract java.lang.String tooltipFor(java.lang.Object target)
target
- The Object we need Tooltip text for.public ChartView getChartView()
public ChartView getLegendView()
public void setModel(ChartModel model) throws java.lang.IllegalArgumentException
public ChartModel getModel()
public void modelChanged(ModelChangedEvent e)
modelChanged
in interface ModelChangeListener
public void layout()
layout
in class java.awt.Container
public void update(java.awt.Graphics g)
update
in class java.awt.Container
public void paint(java.awt.Graphics g)
paint
in class java.awt.Container
public void drawChart(java.awt.Graphics g)
public void drawChildView(java.awt.Graphics g, ChartView view)
public void setBackgroundImage(java.awt.Image image)
public java.awt.Image getBackgroundImage()
public int getMinSize()
public void setFont(java.awt.Font font)
setFont
in class java.awt.Container
public void setTooltip(java.lang.String text, int x, int y)
public void drawTooltip(java.awt.Graphics g)
public void setLegendVisible(boolean visible)
public boolean isLegendVisible()
public java.awt.Point translate(java.awt.Point p, ChartView target)
public boolean mouseMove(java.awt.Event e, int x, int y)
mouseMove
in class java.awt.Component
public boolean mouseDown(java.awt.Event e, int x, int y)
mouseDown
in class java.awt.Component
public boolean mouseExit(java.awt.Event e, int x, int y)
mouseExit
in class java.awt.Component
public java.awt.FontMetrics getFontMetrics(java.awt.Font font)
getFontMetrics
in class java.awt.Component
public void layout(java.awt.Graphics g)
g
- The Graphics context.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |