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.
|
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(UnitRangeImpl r) |
public UnitRangeMapper(int totalPixels, int hintPixels, boolean ascending)
public int getPixelLocation(int i)
ScaleMapper
getPixelLocation
in interface ScaleMapper
i
- The number of the tick of interest.public java.lang.String getLabel(int i)
ScaleMapper
getLabel
in interface ScaleMapper
public java.lang.String getAxisLabel()
getAxisLabel
in interface ScaleMapper
public UnitImpl getUnit()
public int getNumTicks()
ScaleMapper
getNumTicks
in interface ScaleMapper
public boolean isMajorTick(int i)
ScaleMapper
isMajorTick
in interface ScaleMapper
i
- The number of the tick of interest.public boolean isLabelTick(int i)
protected void calculateTicks()
public void setTotalPixels(int p)
public int getTotalPixels()
ScaleMapper
getTotalPixels
in interface ScaleMapper
public void setUnitRange(UnitRangeImpl r)