org.knime.base.util.coordinate
Class PercentagePolicyStrategy

java.lang.Object
  extended by org.knime.base.util.coordinate.PolicyStrategy
      extended by org.knime.base.util.coordinate.AscendingNumericTickPolicyStrategy
          extended by org.knime.base.util.coordinate.PercentagePolicyStrategy

public class PercentagePolicyStrategy
extends AscendingNumericTickPolicyStrategy

Class for percentage tick policy.

Author:
Stephan Sellien, University of Konstanz

Field Summary
static String ID
          ID for a percentage tick policy.
 
Constructor Summary
PercentagePolicyStrategy()
          Constructor.
 
Method Summary
 CoordinateMapping[] getTickPositions(double absoluteLength, double minDomainValue, double maxDomainValue, double tickDistance)
          Calculates the mappings of the ticks according to the policy.
 CoordinateMapping[] getTickPositions(int absoluteLength, int minDomainValue, int maxDomainValue, int tickDistance)
          Calculates the mappings of the ticks according to the policy.
 boolean isMappingAllowed()
          Returns whether mapping and relabeling by MappingMethods should be allowed for the ticks of this PolicyStrategy.
 
Methods inherited from class org.knime.base.util.coordinate.AscendingNumericTickPolicyStrategy
calculateMappedValue, interpolatePosition
 
Methods inherited from class org.knime.base.util.coordinate.PolicyStrategy
calculateMappedValue, getDisplayName, getNegativeInfinity, getPositiveInfinity, getTickPositions, getTickPositions, getValues, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
ID for a percentage tick policy.

See Also:
Constant Field Values
Constructor Detail

PercentagePolicyStrategy

public PercentagePolicyStrategy()
Constructor.

Method Detail

getTickPositions

public CoordinateMapping[] getTickPositions(double absoluteLength,
                                            double minDomainValue,
                                            double maxDomainValue,
                                            double tickDistance)
Calculates the mappings of the ticks according to the policy.

Overrides:
getTickPositions in class AscendingNumericTickPolicyStrategy
Parameters:
absoluteLength - the absolute length
minDomainValue - the minimal domain value
maxDomainValue - the maximal domain value
tickDistance - the absolute distance between to ticks
Returns:
the mappings of the ticks.

getTickPositions

public CoordinateMapping[] getTickPositions(int absoluteLength,
                                            int minDomainValue,
                                            int maxDomainValue,
                                            int tickDistance)
Calculates the mappings of the ticks according to the policy.

Overrides:
getTickPositions in class AscendingNumericTickPolicyStrategy
Parameters:
absoluteLength - the absolute length
minDomainValue - the minimal domain value
maxDomainValue - the maximal domain value
tickDistance - the absolute distance between to ticks
Returns:
the mappings of the ticks.

isMappingAllowed

public boolean isMappingAllowed()
Returns whether mapping and relabeling by MappingMethods should be allowed for the ticks of this PolicyStrategy. The default value is true. An example for allowed mapping would be the a logarithmic scaling. An example where a mapping (logarithmic or square root) does not make sense is the percentage policy.

Overrides:
isMappingAllowed in class PolicyStrategy
Returns:
true, if labels could be relabeled, false else.


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.