public class Axis extends Object implements Serializable
 Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. 
 BSD-style license. See OpenTrafficSim License.
 
 $LastChangedDate: 2015-08-30 00:16:51 +0200 (Sun, 30 Aug 2015) $, @version $Revision: 1329 $, by $Author: averbraeck $,
 initial version Jul 28, 2014 
| Constructor and Description | 
|---|
Axis(org.djunits.value.vdouble.scalar.DoubleScalarInterface minimumValue,
    org.djunits.value.vdouble.scalar.DoubleScalarInterface maximumValue,
    double[] granularities,
    double initialGranularity,
    String name,
    String shortName,
    String format)
Create a new AxisDefinition. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
adjustMaximumValue(org.djunits.value.vdouble.scalar.DoubleScalarInterface newMaximum)
Adjust (increase) the range of this AxisDefinition. 
 | 
int | 
getAggregatedBinCount()  | 
int | 
getBinCount()  | 
double | 
getCurrentGranularity()
Get the granularity of this axis. 
 | 
String | 
getFormat()
Retrieve the format for displaying values along this Axis. 
 | 
double[] | 
getGranularities()
Retrieve the possible granularities for this Axis. 
 | 
org.djunits.value.vdouble.scalar.DoubleScalarInterface | 
getMaximumValue()
Get the maximum value of this axis. 
 | 
org.djunits.value.vdouble.scalar.DoubleScalarInterface | 
getMinimumValue()
Get the minimum value of this axis. 
 | 
String | 
getName()
Retrieve the name of this Axis. 
 | 
double | 
getRelativeBin(org.djunits.value.vdouble.scalar.DoubleScalarInterface value)
Compute the floating point bin number for a value. 
 | 
String | 
getShortName()
Retrieve the short name for this Axis. 
 | 
double | 
getValue(int aggregatedBin)
Return the value for an aggregated bin number. 
 | 
void | 
setCurrentGranularity(double newGranularity)
Change the granularity for this axis. 
 | 
void | 
setMaximumValue(org.djunits.value.vdouble.scalar.DoubleScalarInterface newMaximumValue)
Change the maximum value of this axis. 
 | 
String | 
toString() | 
public Axis(org.djunits.value.vdouble.scalar.DoubleScalarInterface minimumValue,
            org.djunits.value.vdouble.scalar.DoubleScalarInterface maximumValue,
            double[] granularities,
            double initialGranularity,
            String name,
            String shortName,
            String format)
minimumValue - DoubleScalar; the minimum value along this axismaximumValue - DoubleScalar; the maximum value along this axisgranularities - double[]; the aggregation values along this axis (all values must be an integer multiple of the
            first value)initialGranularity - double; initial aggregation value (must be one of the values in granularities)name - String; the name to describe the axis and to name the pop up menu that changes the current granularityshortName - String; the name identifying this axis for use in a menuformat - String; format string for rendering a value along this axispublic double getRelativeBin(org.djunits.value.vdouble.scalar.DoubleScalarInterface value)
value - DoubleScalar; the valuepublic void adjustMaximumValue(org.djunits.value.vdouble.scalar.DoubleScalarInterface newMaximum)
newMaximum - DoubleScalar; the new maximum value of the axispublic double getValue(int aggregatedBin)
aggregatedBin - Integer; the number of a binpublic int getAggregatedBinCount()
public int getBinCount()
public double getCurrentGranularity()
public void setCurrentGranularity(double newGranularity)
newGranularity - double; the new value for the granularity of this axispublic org.djunits.value.vdouble.scalar.DoubleScalarInterface getMaximumValue()
public void setMaximumValue(org.djunits.value.vdouble.scalar.DoubleScalarInterface newMaximumValue)
newMaximumValue - DoubleScalar; the new maximum value of this axispublic org.djunits.value.vdouble.scalar.DoubleScalarInterface getMinimumValue()
public final double[] getGranularities()
public String getFormat()
public String getShortName()
public String getName()
Copyright © 2014–2017 Delft University of Technology. All rights reserved.