Interface ITicksProvider
- All Known Implementing Classes:
LinearScaleTicks
,LinearScaleTicks2
public interface ITicksProvider
This interface if used to enable different method for generating tick marks
-
Method Summary
Modifier and Type Method Description java.lang.String
getDefaultFormatPattern(double min, double max)
int
getHeadMargin()
java.lang.String
getLabel(int index)
int
getLabelPosition(int index)
java.util.List<java.lang.String>
getLabels()
int
getMajorCount()
int
getMaxHeight()
int
getMaxWidth()
int
getMinorCount()
int
getMinorPosition(int index)
int
getPosition(int index)
java.util.List<java.lang.Integer>
getPositions()
Gets the tick positions.int
getTailMargin()
double
getValue(int index)
java.util.List<java.lang.Boolean>
getVisibilities()
boolean
isShowMaxLabel()
Shows the maximum value of the range as a labelboolean
isShowMinLabel()
Shows the minimum value of the range as a labelboolean
isVisible(int index)
void
setShowMaxLabel(boolean showMaxLabel)
sets the visibility of the maximum labelvoid
setShowMinLabel(boolean showMinLabel)
Sets the visibility of the minimum labelRange
update(double min, double max, int length)
Update ticks.
-
Method Details
-
getPositions
java.util.List<java.lang.Integer> getPositions()Gets the tick positions.- Returns:
- the tick positions
-
getPosition
int getPosition(int index)- Parameters:
index
-- Returns:
- tick position
-
getValue
double getValue(int index)- Parameters:
index
-- Returns:
- tick value
-
getLabel
java.lang.String getLabel(int index)- Parameters:
index
-- Returns:
- tick label
-
getLabelPosition
int getLabelPosition(int index)- Parameters:
index
-- Returns:
- label position
-
isVisible
boolean isVisible(int index)- Parameters:
index
-- Returns:
- true if tick is visible
-
getVisibilities
java.util.List<java.lang.Boolean> getVisibilities()- Returns:
- the tick visibilities
-
getLabels
java.util.List<java.lang.String> getLabels()- Returns:
- the tick labels
-
getMajorCount
int getMajorCount()- Returns:
- number of major ticks
-
getMinorPosition
int getMinorPosition(int index)- Parameters:
index
-- Returns:
- minor tick position
-
getMinorCount
int getMinorCount()- Returns:
- number of minor ticks
-
update
Update ticks.- Parameters:
min
-max
-length
-- Returns:
- null unless the provider has not had cause to change the range - in which case, the new range is returned.
-
getMaxWidth
int getMaxWidth()- Returns:
- maximum width in pixels of tick labels
-
getMaxHeight
int getMaxHeight()- Returns:
- maximum height in pixels of tick labels
-
getDefaultFormatPattern
java.lang.String getDefaultFormatPattern(double min, double max)- Parameters:
min
-max
-- Returns:
- default format pattern for labels
-
getHeadMargin
int getHeadMargin()- Returns:
- margin in pixel between edge of client area and head of axis line
-
getTailMargin
int getTailMargin()- Returns:
- margin in pixel between edge of client area and tail of axis line
-
isShowMaxLabel
boolean isShowMaxLabel()Shows the maximum value of the range as a label- Returns:
- true (default) if shown
-
setShowMaxLabel
void setShowMaxLabel(boolean showMaxLabel)sets the visibility of the maximum label- Parameters:
b
- show maximal value as a label
-
isShowMinLabel
boolean isShowMinLabel()Shows the minimum value of the range as a label- Returns:
- true (default) if shown
-
setShowMinLabel
void setShowMinLabel(boolean showMinLabel)Sets the visibility of the minimum label- Parameters:
b
- show minimum value as a label
-