com.steema.teechart.tools
Class Annotation

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.tools.Tool
          extended by com.steema.teechart.tools.Annotation
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PageNumber

public class Annotation
extends Tool

Title: Annotation class

Description: Annotation tool.

Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.steema.teechart.tools.Tool
bBrush, clickTolerance, listenerList, pPen
 
Fields inherited from class com.steema.teechart.TeeBase
chart
 
Constructor Summary
Annotation()
           
Annotation(IBaseChart c)
           
Annotation(IBaseChart c, java.lang.String text)
           
Annotation(java.lang.String text)
           
 
Method Summary
 void addToolMouseListener(ToolMouseListener l)
           
 void chartEvent(ChartDrawEvent e)
           
 boolean clicked(java.awt.Point p)
          Returns true is point parameter is inside annotation bounds
 AnnotationCallout getCallout()
           
 java.awt.Cursor getCursor()
          The Cursor type for when the user moves the mouse over the Annotation bounds.
 boolean getCustomSize()
           
 java.lang.String getDescription()
          Gets descriptive text.
 int getHeight()
          Returns the annotation height in pixels
protected  java.lang.String getInnerText()
           
 int getLeft()
          The horizontal displacement in pixels of text box from Chart's left edge.
 AnnotationPosition getPosition()
          The default position for the Annotation Tool text box and text.
 TextShapePosition getShape()
          The characteristics of the Annotation Tool text and text box Shape.
 java.lang.String getSummary()
          Gets detailed descriptive text.
 java.lang.String getText()
          The text for the Annotation Tool.
Default value: ""
 StringAlignment getTextAlign()
          Horizontal alignment of displayed text.
Default value: StringAlignment.Near
 int getTop()
          The vertical displacement in pixels of text box from Chart's top edge.
 int getWidth()
          Returns the annotation width in pixels
 java.awt.Cursor mouseEvent(FrameworkMouseEvent e, java.awt.Cursor c)
           
 void removeToolMouseListener(ToolMouseListener l)
           
 void setChart(IBaseChart c)
          Chart associated with this object.
 void setCursor(java.awt.Cursor value)
          Selects the Cursor type for when the user moves the mouse over the Annotation bounds.
 void setCustomSize(boolean value)
           
 void setHeight(int value)
          Sets the annotation height in pixels
 void setLeft(int value)
          Sets horizontal displacement in pixels of text box from Chart's left edge.
 void setPosition(AnnotationPosition value)
          Defines a default position for the Annotation Tool text box and text.
 void setText(java.lang.String value)
          Defines the text for the Annotation Tool.
Default value: ""
 void setTextAlign(StringAlignment value)
          Sets the horizontal alignment of displayed text.
Default value: StringAlignment.Near
 void setTop(int value)
          Sets vertical displacement in pixels of text box from Chart's top edge.
 void setWidth(int value)
          Sets the annotation width in pixels
 
Methods inherited from class com.steema.teechart.tools.Tool
addMouseMotionListener, fireChanged, fireClicked, fireDragged, fireDragging, fireMouse, fireResized, getActive, getBitmapEditor, readResolve, removeMouseMotionListener, setActive, toString
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setColorProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Annotation

public Annotation()

Annotation

public Annotation(IBaseChart c)

Annotation

public Annotation(IBaseChart c,
                  java.lang.String text)

Annotation

public Annotation(java.lang.String text)
Method Detail

addToolMouseListener

public void addToolMouseListener(ToolMouseListener l)

removeToolMouseListener

public void removeToolMouseListener(ToolMouseListener l)

getCallout

public AnnotationCallout getCallout()

getCursor

public java.awt.Cursor getCursor()
The Cursor type for when the user moves the mouse over the Annotation bounds.
Default value: Default

Returns:
Cursor

setCursor

public void setCursor(java.awt.Cursor value)
Selects the Cursor type for when the user moves the mouse over the Annotation bounds.
Default value: Default

Parameters:
value - Cursor

setChart

public void setChart(IBaseChart c)
Description copied from class: TeeBase
Chart associated with this object.

Overrides:
setChart in class Tool
Parameters:
c - IBaseChart

getTextAlign

public StringAlignment getTextAlign()
Horizontal alignment of displayed text.
Default value: StringAlignment.Near

Returns:
StringAlignment

setTextAlign

public void setTextAlign(StringAlignment value)
Sets the horizontal alignment of displayed text.
Default value: StringAlignment.Near

Parameters:
value - StringAlignment

getLeft

public int getLeft()
The horizontal displacement in pixels of text box from Chart's left edge.

Returns:
int

setLeft

public void setLeft(int value)
Sets horizontal displacement in pixels of text box from Chart's left edge.

Parameters:
value - int

getTop

public int getTop()
The vertical displacement in pixels of text box from Chart's top edge.

Returns:
int

setTop

public void setTop(int value)
Sets vertical displacement in pixels of text box from Chart's top edge.

Parameters:
value - int

getPosition

public AnnotationPosition getPosition()
The default position for the Annotation Tool text box and text.
Default value: AnnotationPosition.LeftTop

Returns:
AnnotationPosition

setPosition

public void setPosition(AnnotationPosition value)
Defines a default position for the Annotation Tool text box and text.
Default value: AnnotationPosition.LeftTop

Parameters:
value - AnnotationPosition

getShape

public TextShapePosition getShape()
The characteristics of the Annotation Tool text and text box Shape.

Returns:
TextShapePosition

getInnerText

protected java.lang.String getInnerText()

getText

public java.lang.String getText()
The text for the Annotation Tool.
Default value: ""

Returns:
String

setText

public void setText(java.lang.String value)
Defines the text for the Annotation Tool.
Default value: ""

Parameters:
value - String

getDescription

public java.lang.String getDescription()
Gets descriptive text.

Overrides:
getDescription in class Tool
Returns:
String

getSummary

public java.lang.String getSummary()
Gets detailed descriptive text.

Overrides:
getSummary in class Tool
Returns:
String

getHeight

public int getHeight()
Returns the annotation height in pixels

Returns:
int

setHeight

public void setHeight(int value)
Sets the annotation height in pixels

Parameters:
value - int

getWidth

public int getWidth()
Returns the annotation width in pixels

Returns:
int

setWidth

public void setWidth(int value)
Sets the annotation width in pixels

Parameters:
value - int

getCustomSize

public boolean getCustomSize()

setCustomSize

public void setCustomSize(boolean value)

chartEvent

public void chartEvent(ChartDrawEvent e)
Overrides:
chartEvent in class Tool

clicked

public boolean clicked(java.awt.Point p)
Returns true is point parameter is inside annotation bounds

Parameters:
p - Point
Returns:
boolean

mouseEvent

public java.awt.Cursor mouseEvent(FrameworkMouseEvent e,
                                  java.awt.Cursor c)
Overrides:
mouseEvent in class Tool