org.math.plot.render
Class AWTDrawer

java.lang.Object
  extended by org.math.plot.render.AbstractDrawer
      extended by org.math.plot.render.AWTDrawer
Direct Known Subclasses:
AWTDrawer2D, AWTDrawer3D

public abstract class AWTDrawer
extends AbstractDrawer


Field Summary
protected  Projection projection
           
 
Fields inherited from class org.math.plot.render.AbstractDrawer
base_offset, canvas, color, comp2D, CONTINOUS_LINE, CROSS_DOT, DEFAULT_COLOR, DEFAULT_DOT_RADIUS, DEFAULT_FONT, DEFAULT_LINE_WIDTH, dot_pattern, dot_radius, DOT_SQUARE_PATTERN, DOT_TRIANGLE_PATTERN, dot_type, DOTTED_LINE, font, line_type, line_width, PATTERN_DOT, ROUND_DOT, screen_offset, text_angle, text_Eastoffset, text_Northoffset
 
Constructor Summary
AWTDrawer(PlotCanvas _canvas)
           
 
Method Summary
 void dilate(int[] screenOrigin, double[] screenRatio)
          Plot ActionMode : dilatation of the plot
 void drawDot(double... pC)
           
 void drawLine(double[]... pC)
           
private  void drawLine(int[]... c)
           
 void drawLineBase(double[]... rC)
           
 void drawPolygon(double[]... pC)
           
 void drawText(String label, double... pC)
           
 void drawTextBase(String label, double... rC)
           
 void fillPolygon(double[]... pC)
           
 Color getColor()
           
 Font getFont()
           
 int[] project(double... pC)
          Returns the screen coordinates coresponding to plot coordinates Used to test if mouse is pointing on a plot.
 int[] projectBase(double... rC)
          Returns the screen coordinates coresponding to plot coordinates Used to test if mouse is pointing on a plot.
 void resetBaseProjection()
          Method used to reinitialize the plot when the base has changed (bounds or scale)
 void setColor(Color c)
           
 void setFont(Font f)
           
 void translate(int... t)
          Plot ActionMode : translation of the plot
 
Methods inherited from class org.math.plot.render.AbstractDrawer
drawCoordinate, getBaseOffset, getDotPattern, getDotRadius, getDotType, getScreenOffset, getTextAngle, getTextOffset, initGraphics, setBaseOffset, setDotPattern, setDotRadius, setDotType, setLineType, setLineWidth, setScreenOffset, setTextAngle, setTextOffset, stringToPattern, stringToPattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

projection

protected Projection projection
Constructor Detail

AWTDrawer

public AWTDrawer(PlotCanvas _canvas)
Method Detail

resetBaseProjection

public void resetBaseProjection()
Description copied from class: AbstractDrawer
Method used to reinitialize the plot when the base has changed (bounds or scale)

Specified by:
resetBaseProjection in class AbstractDrawer

setColor

public void setColor(Color c)
Overrides:
setColor in class AbstractDrawer

setFont

public void setFont(Font f)
Overrides:
setFont in class AbstractDrawer

getColor

public Color getColor()
Overrides:
getColor in class AbstractDrawer

getFont

public Font getFont()
Overrides:
getFont in class AbstractDrawer

project

public int[] project(double... pC)
Description copied from class: AbstractDrawer
Returns the screen coordinates coresponding to plot coordinates Used to test if mouse is pointing on a plot.

Specified by:
project in class AbstractDrawer
Parameters:
pC - plot ccordinates to project in screen
Returns:
scrren coordinates

projectBase

public int[] projectBase(double... rC)
Description copied from class: AbstractDrawer
Returns the screen coordinates coresponding to plot coordinates Used to test if mouse is pointing on a plot.

Specified by:
projectBase in class AbstractDrawer
Returns:
scrren coordinates

translate

public void translate(int... t)
Description copied from class: AbstractDrawer
Plot ActionMode : translation of the plot

Specified by:
translate in class AbstractDrawer
Parameters:
t - mouse translation in pixels

dilate

public void dilate(int[] screenOrigin,
                   double[] screenRatio)
Description copied from class: AbstractDrawer
Plot ActionMode : dilatation of the plot

Specified by:
dilate in class AbstractDrawer
Parameters:
screenOrigin - mouse initial position
screenRatio - mouse final position relative to plot panel size

drawText

public void drawText(String label,
                     double... pC)
Specified by:
drawText in class AbstractDrawer

drawTextBase

public void drawTextBase(String label,
                         double... rC)
Specified by:
drawTextBase in class AbstractDrawer

drawLineBase

public void drawLineBase(double[]... rC)
Specified by:
drawLineBase in class AbstractDrawer

drawLine

public void drawLine(double[]... pC)
Specified by:
drawLine in class AbstractDrawer

drawLine

private void drawLine(int[]... c)

drawDot

public void drawDot(double... pC)
Specified by:
drawDot in class AbstractDrawer

drawPolygon

public void drawPolygon(double[]... pC)
Specified by:
drawPolygon in class AbstractDrawer

fillPolygon

public void fillPolygon(double[]... pC)
Specified by:
fillPolygon in class AbstractDrawer