facets.util
Class NumberPolicy.ValueVariable

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.util.NumberPolicy
          extended by facets.util.NumberPolicy.Ticked
              extended by facets.util.NumberPolicy.ValueVariable
Enclosing class:
NumberPolicy

public abstract static class NumberPolicy.ValueVariable
extends NumberPolicy.Ticked

NumberPolicy.Ticked that adjusts to changes in the value managed.

NumberPolicy.ValueVariable


Nested Class Summary
 
Nested classes/interfaces inherited from class facets.util.NumberPolicy
NumberPolicy.Ticked, NumberPolicy.ValueVariable
 
Field Summary
 
Fields inherited from class facets.util.NumberPolicy.Ticked
LABEL_TICKS_DEFAULT, SNAP_LABELS, SNAP_NONE, SNAP_TICKS, TICKS_DEFAULT
 
Fields inherited from class facets.util.NumberPolicy
COLUMNS_DEFAULT, debug, FORMAT_DECIMALS_0, FORMAT_DECIMALS_1, FORMAT_DECIMALS_2, FORMAT_DECIMALS_3, FORMAT_DECIMALS_4, FORMAT_HEX, MAX_VALUE, MIN_VALUE, UNIT_JUMP_DEFAULT
 
Constructor Summary
NumberPolicy.ValueVariable(double min, double max)
           
 
Method Summary
protected abstract  double currentValue()
           
 int format()
          Hint on formatting the number.
 double max()
          The highest possible value under the policy.
 double min()
          The lowest possible value under the policy.
 java.lang.String toString()
           
 double unit()
          The smallest possible increment under the policy.
 
Methods inherited from class facets.util.NumberPolicy.Ticked
labelSpacing, localTicks, range, snapType, tickSpacing, unitJump, validValue
 
Methods inherited from class facets.util.NumberPolicy
canCycle, columns, debug, incrementTitles, reverseIncrements, validIncrement
 
Methods inherited from class facets.util.Tracer
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutput, traceOutputWithClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumberPolicy.ValueVariable

public NumberPolicy.ValueVariable(double min,
                                  double max)
Method Detail

min

public double min()
Description copied from class: NumberPolicy
The lowest possible value under the policy.

Set immutably during construction but only accessed via this method, enabling subclasses to define it dynamically by overriding.

Overrides:
min in class NumberPolicy

max

public double max()
Description copied from class: NumberPolicy
The highest possible value under the policy.

Set immutably during construction but only accessed via this method, enabling subclasses to define it dynamically by overriding.

Overrides:
max in class NumberPolicy

format

public int format()
Description copied from class: NumberPolicy
Hint on formatting the number.

These are defined by the class FORMAT_x constants, which are mutually exclusive.

For FORMAT_PLACES_x constants the format should normally be consistent with unit.

Overrides:
format in class NumberPolicy

unit

public final double unit()
Description copied from class: NumberPolicy
The smallest possible increment under the policy.

The default implementation deduces this value from NumberPolicy.format().

Overrides:
unit in class NumberPolicy

currentValue

protected abstract double currentValue()

toString

public java.lang.String toString()
Overrides:
toString in class NumberPolicy.Ticked