mesquite.lib
Class Charter

java.lang.Object
  extended by mesquite.lib.Charter

public abstract class Charter
extends java.lang.Object

Charters draw the charts. The available charters are stored in a vector in MesquiteTrunk (to which they can be added by addCharter() which is passed the Class). Charters must have constructor with no arguments because they are instantiated using newInstance.


Field Summary
protected  java.awt.Color axisColor
           
protected  java.awt.Color bgColor
           
protected  boolean chartDone
           
protected  boolean drawWarningSuppressed
           
protected  java.awt.Color gridColor
           
protected  int markerWidth
           
protected  int maxTicks
           
protected  MesquiteNumber maxX
           
protected  MesquiteNumber maxY
           
protected  int minTicks
           
protected  MesquiteNumber minX
           
protected  MesquiteNumber minY
           
protected  boolean suspendChartCalculations
           
protected  boolean suspendDrawing
           
protected  MesquiteNumber tempNum
           
 
Constructor Summary
Charter()
           
 
Method Summary
 MesquiteNumber bottommostYDrawn(MesquiteChart chart)
           
 MesquiteNumber bottommostYOfInterval(MesquiteNumber y, MesquiteChart chart)
           
abstract  void calculateChart(MesquiteChart chart)
           
 void close()
           
 void drawAxes(java.awt.Graphics g, boolean printing, int chartWidth, int chartHeight, MesquiteChart chart)
           
 void drawBackground(java.awt.Graphics g, MesquiteChart chart)
           
abstract  void drawBlank(java.awt.Graphics g, MesquiteChart chart)
           
abstract  void drawChart(java.awt.Graphics g, MesquiteChart chart)
           
abstract  void drawChartBackground(java.awt.Graphics g, MesquiteChart chart)
           
 void drawGrid(java.awt.Graphics g, MesquiteChart chart)
           
protected  void drawXLine(double x, java.awt.Graphics g, int fieldHeight, MesquiteChart chart)
           
protected  void drawYLine(double y, java.awt.Graphics g, int fieldWidth, MesquiteChart chart)
           
 boolean getDrawWarningSuppressed()
           
 boolean getSuspendChartCalculations()
           
 boolean getSuspendDrawing()
           
 java.lang.String getTextVersion(MesquiteChart chart)
           
 java.lang.String getYAxisName(MesquiteChart chart)
           
 void hideQuickMessage(MesquiteChart chart)
           
 boolean isNative()
           
 MesquiteNumber leftmostXDrawn(MesquiteChart chart)
           
 MesquiteNumber leftmostXOfInterval(MesquiteNumber x, MesquiteChart chart)
           
 boolean moreThanOneValueInInterval(MesquiteNumber x, MesquiteChart chart)
           
 void mouseDownInField(int modifiers, int x, int y, MesquiteChart chart, ChartTool tool)
           
 void mouseDragInField(int modifiers, int x, int y, MesquiteChart chart, ChartTool tool)
           
 void mouseMoveInField(int modifiers, int x, int y, MesquiteChart chart, ChartTool tool)
           
 void mouseUpInField(int modifiers, int x, int y, MesquiteChart chart, ChartTool tool)
           
abstract  void open(MesquiteChart chart)
           
 void pixelToX(int x, MesquiteChart chart, MesquiteNumber xValue)
           
 void pixelToY(int y, MesquiteChart chart, MesquiteNumber yValue)
           
 MesquiteNumber rightmostXDrawn(MesquiteChart chart)
           
 MesquiteNumber rightmostXOfInterval(MesquiteNumber x, MesquiteChart chart)
           
 void setDrawWarningSuppressed(boolean drawWarningSuppressed)
           
 void setShowNames(boolean showNames)
           
 void setSuspendChartCalculations(boolean suspendChartCalculations)
           
 void setSuspendDrawing(boolean suspendDrawing)
           
 boolean showingClumpSums()
           
 void showQuickMessage(MesquiteChart chart, int whichPoint, int x, int y, java.lang.String message)
           
 MesquiteNumber topmostYDrawn(MesquiteChart chart)
           
 MesquiteNumber topmostYOfInterval(MesquiteNumber y, MesquiteChart chart)
           
 int xToPixel(double x, MesquiteChart chart)
           
 int yToPixel(double y, MesquiteChart chart)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxX

protected MesquiteNumber maxX

minX

protected MesquiteNumber minX

maxY

protected MesquiteNumber maxY

minY

protected MesquiteNumber minY

tempNum

protected MesquiteNumber tempNum

chartDone

protected boolean chartDone

minTicks

protected int minTicks

maxTicks

protected int maxTicks

markerWidth

protected int markerWidth

bgColor

protected java.awt.Color bgColor

axisColor

protected java.awt.Color axisColor

gridColor

protected java.awt.Color gridColor

drawWarningSuppressed

protected boolean drawWarningSuppressed

suspendDrawing

protected boolean suspendDrawing

suspendChartCalculations

protected boolean suspendChartCalculations
Constructor Detail

Charter

public Charter()
Method Detail

calculateChart

public abstract void calculateChart(MesquiteChart chart)

drawChartBackground

public abstract void drawChartBackground(java.awt.Graphics g,
                                         MesquiteChart chart)

drawChart

public abstract void drawChart(java.awt.Graphics g,
                               MesquiteChart chart)

drawBlank

public abstract void drawBlank(java.awt.Graphics g,
                               MesquiteChart chart)

setShowNames

public void setShowNames(boolean showNames)

getTextVersion

public java.lang.String getTextVersion(MesquiteChart chart)

drawAxes

public void drawAxes(java.awt.Graphics g,
                     boolean printing,
                     int chartWidth,
                     int chartHeight,
                     MesquiteChart chart)

setDrawWarningSuppressed

public void setDrawWarningSuppressed(boolean drawWarningSuppressed)

getDrawWarningSuppressed

public boolean getDrawWarningSuppressed()

setSuspendDrawing

public void setSuspendDrawing(boolean suspendDrawing)

getSuspendDrawing

public boolean getSuspendDrawing()

setSuspendChartCalculations

public void setSuspendChartCalculations(boolean suspendChartCalculations)

getSuspendChartCalculations

public boolean getSuspendChartCalculations()

pixelToY

public void pixelToY(int y,
                     MesquiteChart chart,
                     MesquiteNumber yValue)

yToPixel

public int yToPixel(double y,
                    MesquiteChart chart)

pixelToX

public void pixelToX(int x,
                     MesquiteChart chart,
                     MesquiteNumber xValue)

xToPixel

public int xToPixel(double x,
                    MesquiteChart chart)

isNative

public boolean isNative()

leftmostXDrawn

public MesquiteNumber leftmostXDrawn(MesquiteChart chart)

rightmostXDrawn

public MesquiteNumber rightmostXDrawn(MesquiteChart chart)

topmostYDrawn

public MesquiteNumber topmostYDrawn(MesquiteChart chart)

bottommostYDrawn

public MesquiteNumber bottommostYDrawn(MesquiteChart chart)

rightmostXOfInterval

public MesquiteNumber rightmostXOfInterval(MesquiteNumber x,
                                           MesquiteChart chart)

leftmostXOfInterval

public MesquiteNumber leftmostXOfInterval(MesquiteNumber x,
                                          MesquiteChart chart)

bottommostYOfInterval

public MesquiteNumber bottommostYOfInterval(MesquiteNumber y,
                                            MesquiteChart chart)

topmostYOfInterval

public MesquiteNumber topmostYOfInterval(MesquiteNumber y,
                                         MesquiteChart chart)

moreThanOneValueInInterval

public boolean moreThanOneValueInInterval(MesquiteNumber x,
                                          MesquiteChart chart)

showingClumpSums

public boolean showingClumpSums()

getYAxisName

public java.lang.String getYAxisName(MesquiteChart chart)

drawBackground

public void drawBackground(java.awt.Graphics g,
                           MesquiteChart chart)

drawGrid

public void drawGrid(java.awt.Graphics g,
                     MesquiteChart chart)

drawXLine

protected void drawXLine(double x,
                         java.awt.Graphics g,
                         int fieldHeight,
                         MesquiteChart chart)

drawYLine

protected void drawYLine(double y,
                         java.awt.Graphics g,
                         int fieldWidth,
                         MesquiteChart chart)

open

public abstract void open(MesquiteChart chart)

close

public void close()

mouseMoveInField

public void mouseMoveInField(int modifiers,
                             int x,
                             int y,
                             MesquiteChart chart,
                             ChartTool tool)

mouseDownInField

public void mouseDownInField(int modifiers,
                             int x,
                             int y,
                             MesquiteChart chart,
                             ChartTool tool)

mouseDragInField

public void mouseDragInField(int modifiers,
                             int x,
                             int y,
                             MesquiteChart chart,
                             ChartTool tool)

mouseUpInField

public void mouseUpInField(int modifiers,
                           int x,
                           int y,
                           MesquiteChart chart,
                           ChartTool tool)

showQuickMessage

public void showQuickMessage(MesquiteChart chart,
                             int whichPoint,
                             int x,
                             int y,
                             java.lang.String message)

hideQuickMessage

public void hideQuickMessage(MesquiteChart chart)