DESY ACOP Beans Home

com.cosylab.gui.components.range2
Class ProperOrderPolicy

java.lang.Object
  extended by com.cosylab.gui.components.range2.RangedValuePolicy
      extended by com.cosylab.gui.components.range2.ProperOrderPolicy

public class ProperOrderPolicy
extends RangedValuePolicy

This policy enforces the proper order of values. For a triplet of numbers specified in RangedValueHolder it will rearange them (if neccessary) so that minimum will be less or equal to value and value will be less or equal to maximum.

Version:
$id$
Author:
Ales Pucelj

Constructor Summary
ProperOrderPolicy()
           
 
Method Summary
 RangedValue validate(RangedValue params)
          Swaps the parameters as neccessary to establis proper ordering of values.
 
Methods inherited from class com.cosylab.gui.components.range2.RangedValuePolicy
addPeerPolicy, getPeerPolicy, insertPeerPolicy, removePeerPolicy, removePeerPolicyByType, validatePeerPolicy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProperOrderPolicy

public ProperOrderPolicy()
Method Detail

validate

public RangedValue validate(RangedValue params)
Swaps the parameters as neccessary to establis proper ordering of values.

Specified by:
validate in class RangedValuePolicy
Parameters:
params - Triplet of values to validate.
Returns:
if the validation require the change of value or bounds of the RangedValue a new RangedValue with appropriate values should be returned
See Also:
com.cosylab.gui.components.range.RangedValuePolicy#validate(RangedValueHolder)


Copyright © 2010. All Rights Reserved.