|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.util.coordinate.PolicyStrategy
public abstract class PolicyStrategy
Abstract class for policy strategies.
Constructor Summary | |
---|---|
PolicyStrategy(String name)
Creates a new PolicyStrategy . |
Method Summary | |
---|---|
abstract double |
calculateMappedValue(DataCell domainValueCell,
double absoluteLength,
double minDomainValue,
double maxDomainValue)
Calculates the mapped value. |
double |
calculateMappedValue(DataCell domainValueCell,
double absoluteLength,
double minDomainValue,
double maxDomainValue,
double negativeInfinity,
double positiveInfinity)
Calculates the mapped value. |
String |
getDisplayName()
Returns the name of this strategy. |
protected double |
getNegativeInfinity()
Returns the value for negative infinity. |
protected double |
getPositiveInfinity()
Returns the value for positive infinity. |
abstract CoordinateMapping[] |
getTickPositions(double absoluteLength,
double minDomainValue,
double maxDomainValue,
double tickDistance)
Calculates the mappings of the ticks according to the policy. |
CoordinateMapping[] |
getTickPositions(double absoluteLength,
double minDomainValue,
double maxDomainValue,
double tickDistance,
double negativeInfinity,
double positiveInfinity)
Calculates the mappings of the ticks according to the policy. |
abstract CoordinateMapping[] |
getTickPositions(int absoluteLength,
int minDomainValue,
int maxDomainValue,
int tickDistance)
Calculates the mappings of the ticks according to the policy. |
CoordinateMapping[] |
getTickPositions(int absoluteLength,
int minDomainValue,
int maxDomainValue,
int tickDistance,
double negativeInfinity,
double positiveInfinity)
Calculates the mappings of the ticks according to the policy. |
protected Set<DataValue> |
getValues()
Returns the values. |
boolean |
isMappingAllowed()
Returns whether mapping and relabeling by MappingMethod s should
be allowed for the ticks of this PolicyStrategy . |
void |
setValues(DataValue... values)
Sets desired values for the policy strategy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PolicyStrategy(String name)
PolicyStrategy
.
name
- the name of this strategy. Name must not be
null
or empty!Method Detail |
---|
public void setValues(DataValue... values)
values
- the valuesprotected Set<DataValue> getValues()
null
if there are nonepublic abstract double calculateMappedValue(DataCell domainValueCell, double absoluteLength, double minDomainValue, double maxDomainValue)
domainValueCell
- the value to be mappedabsoluteLength
- the absolute lengthminDomainValue
- the minimal domain valuemaxDomainValue
- the maximal domain value
public double calculateMappedValue(DataCell domainValueCell, double absoluteLength, double minDomainValue, double maxDomainValue, double negativeInfinity, double positiveInfinity)
domainValueCell
- the value to be mappedabsoluteLength
- the absolute lengthminDomainValue
- the minimal domain valuemaxDomainValue
- the maximal domain valuenegativeInfinity
- the value for negative infinitypositiveInfinity
- the value for positive infinity
public abstract CoordinateMapping[] getTickPositions(double absoluteLength, double minDomainValue, double maxDomainValue, double tickDistance)
absoluteLength
- the absolute lengthminDomainValue
- the minimal domain valuemaxDomainValue
- the maximal domain valuetickDistance
- the absolute distance between to ticks
public CoordinateMapping[] getTickPositions(double absoluteLength, double minDomainValue, double maxDomainValue, double tickDistance, double negativeInfinity, double positiveInfinity)
absoluteLength
- the absolute lengthminDomainValue
- the minimal domain valuemaxDomainValue
- the maximal domain valuetickDistance
- the absolute distance between to ticksnegativeInfinity
- the value for negative infinitypositiveInfinity
- the value for positive infinity
public CoordinateMapping[] getTickPositions(int absoluteLength, int minDomainValue, int maxDomainValue, int tickDistance, double negativeInfinity, double positiveInfinity)
absoluteLength
- the absolute lengthminDomainValue
- the minimal domain valuemaxDomainValue
- the maximal domain valuetickDistance
- the absolute distance between to ticksnegativeInfinity
- the value for negative infinitypositiveInfinity
- the value for positive infinity
public abstract CoordinateMapping[] getTickPositions(int absoluteLength, int minDomainValue, int maxDomainValue, int tickDistance)
absoluteLength
- the absolute lengthminDomainValue
- the minimal domain valuemaxDomainValue
- the maximal domain valuetickDistance
- the absolute distance between to ticks
public String getDisplayName()
protected double getPositiveInfinity()
protected double getNegativeInfinity()
public boolean isMappingAllowed()
MappingMethod
s 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.
true
, if labels could be relabeled,
false
else.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |