com.steema.teechart.tools
Class DrawLine

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.tools.Tool
          extended by com.steema.teechart.tools.ToolSeries
              extended by com.steema.teechart.tools.DrawLine

public class DrawLine
extends ToolSeries

Title: DrawLine class

Description: Draw Line tool.

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

Company: Steema Software SL


Nested Class Summary
static interface DrawLine.DrawLineListener
           
static interface DrawLine.DrawLineSelector
           
 
Field Summary
protected  DrawLine.DrawLineSelector drawLineSelector
           
 Point fromPoint
           
protected  DrawLineHandle iHandle
           
 Point toPoint
           
 
Fields inherited from class com.steema.teechart.tools.ToolSeries
iSeries
 
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
DrawLine()
           
DrawLine(IBaseChart c)
           
 
Method Summary
 void addDrawLineSelector(DrawLine.DrawLineSelector selector)
           
 Point axisPoint(Point.Double p)
           
 void chartEvent(ChartDrawEvent ce)
           
 DrawLineItem clicked(int x, int y)
           
 DrawLineItem clicked(Point p)
           
protected  void clipDrawingRegion()
           
 void deleteSelected()
           
 int getButton()
          The mousebutton to activate the DrawLineTool.
 java.lang.String getDescription()
          Gets descriptive text.
 DrawLineStyle getDrawLineStyle()
           
 boolean getEnableDraw()
          Enables/Disables the drawing of lines on the chart by the user.
 boolean getEnableSelect()
          Enables selection of lines for repositioning on the Chart.
 DrawLines getLines()
          Returns the list of lines drawn on the Chart.
 ChartPen getPen()
          Element Pen characteristics.
 DrawLineItem getSelected()
          Returns the line or lines that are currently selected.
 boolean getSelectNewLines()
           
 java.lang.String getSummary()
          Gets detailed descriptive text.
 Cursor mouseEvent(FrameworkMouseEvent e, Cursor c)
           
protected  void redrawLine(IGraphics3D g, DrawLineItem line)
           
 void removeDrawLineSelector()
           
 Point.Double screenPoint(Point p)
           
 void setButton(int value)
          Defines which mousebutton activates the DrawLineTool.
 void setDrawLineStyle(DrawLineStyle value)
           
 void setEnableDraw(boolean value)
          Enables/Disables the drawing of lines on the chart by the user.
 void setEnableSelect(boolean value)
          Enables selection of lines for repositioning on the Chart when true.
 void setPen(ChartPen value)
           
 void setSelected(DrawLineItem value)
           
 void setSelectNewLines(boolean value)
           
 
Methods inherited from class com.steema.teechart.tools.ToolSeries
getHorizAxis, getSeries, getVertAxis, setSeries
 
Methods inherited from class com.steema.teechart.tools.Tool
dispose, fireChanged, fireClicked, fireDragged, fireDragging, fireMouse, fireResized, getActive, readResolve, setActive, setChart, 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
 

Field Detail

fromPoint

public Point fromPoint

toPoint

public Point toPoint

iHandle

protected DrawLineHandle iHandle

drawLineSelector

protected transient DrawLine.DrawLineSelector drawLineSelector
Constructor Detail

DrawLine

public DrawLine()

DrawLine

public DrawLine(IBaseChart c)
Method Detail

addDrawLineSelector

public void addDrawLineSelector(DrawLine.DrawLineSelector selector)

removeDrawLineSelector

public void removeDrawLineSelector()

getLines

public DrawLines getLines()
Returns the list of lines drawn on the Chart.

Returns:
DrawLines

getButton

public int getButton()
The mousebutton to activate the DrawLineTool.
Default value: MouseButtons.Left

Returns:
int

setButton

public void setButton(int value)
Defines which mousebutton activates the DrawLineTool.
Default value: MouseButtons.Left

Parameters:
value - int

getEnableDraw

public boolean getEnableDraw()
Enables/Disables the drawing of lines on the chart by the user.
All drawn lines are stored in the Lines method.
Default value: true

Returns:
boolean

setEnableDraw

public void setEnableDraw(boolean value)
Enables/Disables the drawing of lines on the chart by the user.
Default value: true

Parameters:
value - boolean

getEnableSelect

public boolean getEnableSelect()
Enables selection of lines for repositioning on the Chart.
Default value: true

Returns:
boolean

setEnableSelect

public void setEnableSelect(boolean value)
Enables selection of lines for repositioning on the Chart when true.
Default value: true

Parameters:
value - boolean

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

clicked

public DrawLineItem clicked(int x,
                            int y)

clicked

public DrawLineItem clicked(Point p)

axisPoint

public Point axisPoint(Point.Double p)

screenPoint

public Point.Double screenPoint(Point p)

deleteSelected

public void deleteSelected()

getSelected

public DrawLineItem getSelected()
Returns the line or lines that are currently selected.

Returns:
DrawLineItem

setSelected

public void setSelected(DrawLineItem value)

getPen

public ChartPen getPen()
Element Pen characteristics.

Returns:
ChartPen

setPen

public void setPen(ChartPen value)

redrawLine

protected void redrawLine(IGraphics3D g,
                          DrawLineItem line)

clipDrawingRegion

protected void clipDrawingRegion()

chartEvent

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

getSelectNewLines

public boolean getSelectNewLines()

setSelectNewLines

public void setSelectNewLines(boolean value)

getDrawLineStyle

public DrawLineStyle getDrawLineStyle()

setDrawLineStyle

public void setDrawLineStyle(DrawLineStyle value)

mouseEvent

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