Interface RulerModel
- All Known Implementing Classes:
DefaultRulerModel
public interface RulerModel
- Author:
- Pierre Lando
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanDefault auto-ticks status.static final ColorDefault color.static final Vector3dDefault first point position.static final doubleDefault first value.static final booleanDefault main line visibility.static final doubleDefault line width.static final booleanDefault logarithmic status.static final doubleDefault margin in pixel.static final doubleDefault minimal sub-ticks distance.static final Vector3dDefault second point position.static final doubleDefault second value.static final intDefaultdistance to the main line in pixel.invalid reference
org.scilab.forge.scirenderer.sprite.Spritestatic final intDefault sub-tick length in pixel.static final intDefault tick length in pixel.static final Vector3dDefault ticks direction. -
Method Summary
Modifier and TypeMethodDescriptiongetColor()Color getter.First point getter.doubleFirst value getter.Return used graduation to draw this ruler.doubleLine width getter.doubleReturn the accepted margin (in pixel) for label drawing.doubleMinimal accepted sub-ticks distance getter.getPosition(double value) Return the position corresponding to the given value.Second point getter.doubleSecond value getter.intSprite distance getter.intSub-ticks length getter.intNumber of subticks.Ticks direction getter.intTicks length getter.booleanAuto-ticking getter.booleanLine visibility getter.booleanLogarithmic state getter.
-
Field Details
-
DEFAULT_FIRST_VALUE
static final double DEFAULT_FIRST_VALUEDefault first value.- See Also:
-
DEFAULT_SECOND_VALUE
static final double DEFAULT_SECOND_VALUEDefault second value.- See Also:
-
DEFAULT_FIRST_POINT
Default first point position. -
DEFAULT_SECOND_POINT
Default second point position. -
DEFAULT_MARGIN
static final double DEFAULT_MARGINDefault margin in pixel.- See Also:
-
DEFAULT_LINE_VISIBLE
static final boolean DEFAULT_LINE_VISIBLEDefault main line visibility.- See Also:
-
DEFAULT_SPRITE_DISTANCE
static final int DEFAULT_SPRITE_DISTANCEDefaultdistance to the main line in pixel.invalid reference
org.scilab.forge.scirenderer.sprite.Sprite- See Also:
-
DEFAULT_SUB_TICK_LENGTH
static final int DEFAULT_SUB_TICK_LENGTHDefault sub-tick length in pixel.- See Also:
-
DEFAULT_TICK_LENGTH
static final int DEFAULT_TICK_LENGTHDefault tick length in pixel.- See Also:
-
DEFAULT_MINIMAL_SUB_TICKS_DISTANCE
static final double DEFAULT_MINIMAL_SUB_TICKS_DISTANCEDefault minimal sub-ticks distance.- See Also:
-
DEFAULT_AUTO_TICKS_STATUS
static final boolean DEFAULT_AUTO_TICKS_STATUSDefault auto-ticks status.- See Also:
-
DEFAULT_LOGARITHMIC_STATUS
static final boolean DEFAULT_LOGARITHMIC_STATUSDefault logarithmic status.- See Also:
-
DEFAULT_TICKS_DIRECTION
Default ticks direction. -
DEFAULT_COLOR
Default color. -
DEFAULT_LINE_WIDTH
static final double DEFAULT_LINE_WIDTHDefault line width.- See Also:
-
-
Method Details
-
getGraduations
Graduations getGraduations()Return used graduation to draw this ruler.- Returns:
- the used graduation to draw this ruler.
-
getFirstValue
double getFirstValue()First value getter.- Returns:
- the first values.
-
getSecondValue
double getSecondValue()Second value getter.- Returns:
- the second values.
-
getFirstPoint
Vector3d getFirstPoint()First point getter.- Returns:
- the first point.
-
getSecondPoint
Vector3d getSecondPoint()Second point getter.- Returns:
- the second point.
-
getTicksDirection
Vector3d getTicksDirection()Ticks direction getter.- Returns:
- the ticks direction.
-
getTicksLength
int getTicksLength()Ticks length getter.- Returns:
- the ticks length in pixel.
-
getSubTicksLength
int getSubTicksLength()Sub-ticks length getter.- Returns:
- the sub-ticks length in pixel.
-
getPosition
Return the position corresponding to the given value.- Parameters:
value- the given value.- Returns:
- the position corresponding to the given value.
-
getMargin
double getMargin()Return the accepted margin (in pixel) for label drawing.- Returns:
- the accepted margin (in pixel) for label drawing.
-
isLineVisible
boolean isLineVisible()Line visibility getter.- Returns:
- the line visibility status.
-
isAutoTicks
boolean isAutoTicks()Auto-ticking getter.- Returns:
- the auto-ticking status.
-
isLogarithmic
boolean isLogarithmic()Logarithmic state getter.- Returns:
- the logarithmic state
-
getSpriteDistance
int getSpriteDistance()Sprite distance getter.- Returns:
- the sprite distance (in pixel) between the ruler line and the sprites edges.
-
getMinimalSubTicksDistance
double getMinimalSubTicksDistance()Minimal accepted sub-ticks distance getter.- Returns:
- the minimal accepted sub-ticks distance.
-
getColor
Color getColor()Color getter.- Returns:
- the color of ruler line and ticks.
-
getLineWidth
double getLineWidth()Line width getter.- Returns:
- the line width of ruler line, grid and ticks.
-
getSubticksNumber
int getSubticksNumber()Number of subticks.- Returns:
- the number of subticks or -1 if the computation is automatic.
-