public class UnitRangeMapper extends java.lang.Object implements ScaleMapper
| Constructor and Description |
|---|
UnitRangeMapper(int totalPixels,
int hintPixels,
boolean ascending) |
| Modifier and Type | Method and Description |
|---|---|
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) |
public UnitRangeMapper(int totalPixels,
int hintPixels,
boolean ascending)
public int getPixelLocation(int i)
ScaleMappergetPixelLocation in interface ScaleMapperi - The number of the tick of interest.public java.lang.String getLabel(int i)
ScaleMappergetLabel in interface ScaleMapperpublic java.lang.String getAxisLabel()
getAxisLabel in interface ScaleMapperpublic edu.iris.Fissures.model.UnitImpl getUnit()
public int getNumTicks()
ScaleMappergetNumTicks in interface ScaleMapperpublic boolean isMajorTick(int i)
ScaleMapperisMajorTick in interface ScaleMapperi - The number of the tick of interest.public boolean isLabelTick(int i)
protected void calculateTicks()
public void setTotalPixels(int p)
public int getTotalPixels()
ScaleMappergetTotalPixels in interface ScaleMapperpublic void setUnitRange(edu.iris.Fissures.model.UnitRangeImpl r)