facets.util.shade
Class Shades.HSBPolicy

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.util.NumberPolicy
          extended by facets.util.NumberPolicy.Ticked
              extended by facets.util.shade.Shades.HSBPolicy
Enclosing class:
Shades

public static class Shades.HSBPolicy
extends NumberPolicy.Ticked

Policy for shade HSB values.

HSBPolicy is a NumberPolicy.Ticked with range 0.00 to 1.00. Much of its policy depends on the likely scale size - larger for hue.


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
Shades.HSBPolicy(boolean forHue)
           
 
Method Summary
 boolean canCycle()
          If true, values outside the range will be normalised to within it.
 int format()
          Hint on formatting the number.
 int labelSpacing()
          The number of ticks between each label.
 int snapType()
          Defines the snap-to-ticks contentStyle.
 int tickSpacing()
          The spacing between each tick, in the value returned by NumberPolicy.unit().
 
Methods inherited from class facets.util.NumberPolicy.Ticked
localTicks, range, toString, unitJump, validValue
 
Methods inherited from class facets.util.NumberPolicy
columns, debug, incrementTitles, max, min, reverseIncrements, unit, 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

Shades.HSBPolicy

public Shades.HSBPolicy(boolean forHue)
Method Detail

canCycle

public boolean canCycle()
Description copied from class: NumberPolicy
If true, values outside the range will be normalised to within it.

Default is false.

Overrides:
canCycle 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

labelSpacing

public int labelSpacing()
Description copied from class: NumberPolicy.Ticked
The number of ticks between each label.

Overrides:
labelSpacing in class NumberPolicy.Ticked

snapType

public int snapType()
Description copied from class: NumberPolicy.Ticked
Defines the snap-to-ticks contentStyle.

The value returned should be one of

Overrides:
snapType in class NumberPolicy.Ticked

tickSpacing

public int tickSpacing()
Description copied from class: NumberPolicy.Ticked
The spacing between each tick, in the value returned by NumberPolicy.unit().

Overrides:
tickSpacing in class NumberPolicy.Ticked