All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface jsz.Plotter.ITickCaption

public interface ITickCaption
Using the ITickCaption interface a custom-made axis caption can be implemented. When a plotter draws x- and y-axis it calls the markTick() method for each tick it marks. Have a look at the following example:
    package jsz.Plotter;
    import java.awt.*;
    public class ControllerCaption
      implements ITickCaption
    {
      private double highPerformance;
      private double safety;
      private double baseline;
      public ControllerCaption(double highPerformance,
                                   double baseline,
                                   double safety)
      {
        this.highPerformance = highPerformance;
        this.safety          = safety;
        this.baseline        = baseline;
      }
      public String markTick(double value)
      {
        if(value == highPerformance)
          return "H";
        else if(value == safety)
          return "S";
        else if(value == baseline)
          return "B";
        else                          // we dont mark any other tick
          return "";
      }
    };
 

Version:
$Revision: 1.2 $
Author:
Janek Schwarz

Method Index

 o markTick(double)
Mark a tick.

Methods

 o markTick
 public abstract String markTick(double value)
Mark a tick. For an example implementation see the example above.


All Packages  Class Hierarchy  This Package  Previous  Next  Index