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
Direct Known Subclasses:
Marker, PageNumber

public class Annotation
extends Tool

Title: Annotation class

Description: Annotation tool.

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

Company: Steema Software SL


Field Summary
 
Fields inherited from class com.steema.teechart.tools.Tool
bBrush, clickTolerance, listenerList, pPen
 
Fields inherited from class com.steema.teechart.TeeBase
chart, InternalUse
 
Constructor Summary
Annotation()
           
Annotation(IBaseChart c)
           
Annotation(IBaseChart c, java.lang.String text)
           
Annotation(java.lang.String text)
           
 
Method Summary
 void addToolMouseListener(ToolMouseListener l)
           
protected  void calcTempPosition(int[] xyPosition, int tmpW, int tmpH, int horizMargin, int vertMargin)
           
protected  MultiLine calcTempWidth(Graphics3D g, java.lang.String tmp)
           
 void chartEvent(ChartDrawEvent e)
           
 boolean clicked(Point p)
          Returns true is point parameter is inside annotation bounds
 void drawText()
           
 void drawText(Graphics3D g)
           
 AnnotationCallout getCallout()
           
 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.
 StringAlignment getTextAlign()
          Horizontal alignment of displayed text.
 int getTop()
          The vertical displacement in pixels of text box from Chart's top edge.
 int getWidth()
          Returns the annotation width in pixels
 Cursor mouseEvent(FrameworkMouseEvent e, Cursor c)
           
 void removeToolMouseListener(ToolMouseListener l)
           
 void setChart(IBaseChart c)
          Chart associated with this object.
 void setCursor(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.
 void setTextAlign(StringAlignment value)
          Sets the horizontal alignment of displayed text.
 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
dispose, fireChanged, fireClicked, fireDragged, fireDragging, fireMouse, fireResized, getActive, readResolve, setActive, toString
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, 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 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(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)

calcTempWidth

protected MultiLine calcTempWidth(Graphics3D g,
                                  java.lang.String tmp)

calcTempPosition

protected void calcTempPosition(int[] xyPosition,
                                int tmpW,
                                int tmpH,
                                int horizMargin,
                                int vertMargin)

drawText

public void drawText(Graphics3D g)

drawText

public void drawText()

chartEvent

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

clicked

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

Parameters:
p - Point
Returns:
boolean

mouseEvent

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