Class Rounding
java.lang.Object
uk.ac.starlink.ttools.plot2.layer.Rounding
Defines a policy for coming up with round numbers.
- Since:
- 1 Feb 2017
- Author:
- Mark Taylor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Rounder
getRounder
(boolean isLog) Returns a rounder object for linear/logarithmic rounding.static Rounding
getRounding
(boolean isTime) Returns a suitable implementation for an axis that either is or is not a time axis.
-
Field Details
-
DECIMAL
Policy suitable for normal numeric axes. -
SECONDS
Policy suitable for time axes with data units of seconds.
-
-
Constructor Details
-
Rounding
public Rounding()
-
-
Method Details
-
getRounder
Returns a rounder object for linear/logarithmic rounding.- Parameters:
isLog
- true for logarithmic, false for linear- Returns:
- rounder
-
getRounding
Returns a suitable implementation for an axis that either is or is not a time axis.- Parameters:
isTime
- true for time axis in seconds, false for normal numeric- Returns:
- rounding instance
-