edu.sc.seis.fissuresUtil.display
Class UnitRangeMapper

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.display.UnitRangeMapper
All Implemented Interfaces:
ScaleMapper
Direct Known Subclasses:
AmpScaleMapper, DistanceScaleMapper

public class UnitRangeMapper
extends java.lang.Object
implements ScaleMapper


Constructor Summary
UnitRangeMapper(int totalPixels, int hintPixels, boolean ascending)
           
 
Method Summary
protected  void calculateTicks()
           
 java.lang.String getAxisLabel()
           
 java.lang.String getLabel(int i)
          Gets the label if there is one for the ith tick.
 int getNumTicks()
          Gets the total number of ticks.
 int getPixelLocation(int i)
          Gets the pixel location for the ith tick.
 int getTotalPixels()
          returns the total pixels used to calculate map.
 edu.iris.Fissures.model.UnitImpl getUnit()
           
 boolean isLabelTick(int i)
           
 boolean isMajorTick(int i)
          True if the ith tick is a major tick.
 void setTotalPixels(int p)
           
 void setUnitRange(edu.iris.Fissures.model.UnitRangeImpl r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitRangeMapper

public UnitRangeMapper(int totalPixels,
                       int hintPixels,
                       boolean ascending)
Method Detail

getPixelLocation

public int getPixelLocation(int i)
Description copied from interface: ScaleMapper
Gets the pixel location for the ith tick.

Specified by:
getPixelLocation in interface ScaleMapper
Parameters:
i - The number of the tick of interest.

getLabel

public java.lang.String getLabel(int i)
Description copied from interface: ScaleMapper
Gets the label if there is one for the ith tick. If there is no label then a empty string should be returned instead of a null.

Specified by:
getLabel in interface ScaleMapper

getAxisLabel

public java.lang.String getAxisLabel()
Specified by:
getAxisLabel in interface ScaleMapper

getUnit

public edu.iris.Fissures.model.UnitImpl getUnit()

getNumTicks

public int getNumTicks()
Description copied from interface: ScaleMapper
Gets the total number of ticks.

Specified by:
getNumTicks in interface ScaleMapper

isMajorTick

public boolean isMajorTick(int i)
Description copied from interface: ScaleMapper
True if the ith tick is a major tick. This could be used by the plotting component to draw major tick longer or thicker.

Specified by:
isMajorTick in interface ScaleMapper
Parameters:
i - The number of the tick of interest.

isLabelTick

public boolean isLabelTick(int i)

calculateTicks

protected void calculateTicks()

setTotalPixels

public void setTotalPixels(int p)

getTotalPixels

public int getTotalPixels()
Description copied from interface: ScaleMapper
returns the total pixels used to calculate map. SBH

Specified by:
getTotalPixels in interface ScaleMapper
Returns:

setUnitRange

public void setUnitRange(edu.iris.Fissures.model.UnitRangeImpl r)