|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.util.coordinate.Coordinate
org.knime.base.util.coordinate.NominalCoordinate
public class NominalCoordinate
This class represents a nominal coordinate defined by a given
DataColumnSpec
. The nominal values are arranged
equidistant and in the order given in the
DataColumnSpec
.
Field Summary |
---|
Fields inherited from class org.knime.base.util.coordinate.Coordinate |
---|
DEFAULT_ABSOLUTE_TICK_DIST |
Constructor Summary | |
---|---|
NominalCoordinate(DataColumnSpec dataColumnSpec)
Constructs a nominal coordinate according to the given column spec. |
Method Summary | |
---|---|
void |
addDesiredValues(DataValue... values)
Adds a value which should have a tick. |
protected double |
calculateMappedValueInternal(DataCell domainValueCell,
double absoluteLength)
Calculates a numeric mapping assuming a column with a given number of possible values. |
void |
changeValuePosition(DataCell nomValue,
int index)
Changes the position of a nominal value on the axis. |
CoordinateMapping[] |
getReducedTickPositions(int absLength)
|
protected CoordinateMapping[] |
getTickPositionsWithLabels(double absoluteLength)
Returns an array with the position of all ticks and their corresponding nominal domain values given an absolute length. |
double |
getUnusedDistBetweenTicks(double absoluteLength)
Returns the range according to the mapping in which no values can have values. |
boolean |
isNominal()
Whether this coordinate is a nominal one. |
Methods inherited from class org.knime.base.util.coordinate.Coordinate |
---|
addCoordinateFactory, addMappingMethod, addPolicy, applyMappingMethod, calculateMappedValue, calculateMappedValue, clearDesiredValues, createCoordinate, getActiveMappingMethod, getCompatibleMappingMethods, getCompatiblePolicies, getCurrentPolicy, getDataColumnSpec, getDesiredValues, getDesiredValuesSet, getDomain, getMappingMethod, getNegativeInfinity, getPolicyStategy, getPositiveInfinity, getTickPositions, getTickPositions, setActiveMappingMethod, setPolicy, setPolicy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
NominalCoordinate(DataColumnSpec dataColumnSpec)
dataColumnSpec
- the column spec to create this coordinate fromMethod Detail |
---|
public void changeValuePosition(DataCell nomValue, int index)
nomValue
- the value to replaceindex
- the position to set the valuepublic double getUnusedDistBetweenTicks(double absoluteLength)
getUnusedDistBetweenTicks
in class Coordinate
absoluteLength
- the absolute length available for this coordinate
protected CoordinateMapping[] getTickPositionsWithLabels(double absoluteLength)
getTickPositionsWithLabels
in class Coordinate
absoluteLength
- the absolute length the domain is mapped on
public CoordinateMapping[] getReducedTickPositions(int absLength)
absLength
- the available length.
protected double calculateMappedValueInternal(DataCell domainValueCell, double absoluteLength)
The value is not the position on the screen. Since the java coordinate system is upside down simply subtract the returned value from the screen height to calculate the screen position.
calculateMappedValueInternal
in class Coordinate
domainValueCell
- the data cell with the domain value to mapabsoluteLength
- the absolute length on which the domain value is
mapped on
public boolean isNominal()
isNominal
in class Coordinate
true
, if this coordinate is a nominal onepublic void addDesiredValues(DataValue... values)
addDesiredValues
in class Coordinate
values
- the desired value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |