org.knime.base.util.coordinate
Class IntegerCoordinate

java.lang.Object
  extended by org.knime.base.util.coordinate.Coordinate
      extended by org.knime.base.util.coordinate.NumericCoordinate
          extended by org.knime.base.util.coordinate.IntegerCoordinate

 class IntegerCoordinate
extends NumericCoordinate

Author:
Tobias Koetter, University of Konstanz, Stephan Sellien, University of Konstanz

Field Summary
 
Fields inherited from class org.knime.base.util.coordinate.Coordinate
DEFAULT_ABSOLUTE_TICK_DIST
 
Constructor Summary
protected IntegerCoordinate(DataColumnSpec dataColumnSpec)
          Constructor for class IntegerCoordinate.
 
Method Summary
protected  double calculateMappedValueInternal(DataCell domainValueCell, double absoluteLength)
          Calculates a numeric mapping assuming a DoubleCell.
protected  CoordinateMapping[] getTickPositionsInternal(double absoluteLength)
          Returns an array with the positions of all ticks and their corresponding domain values given an absolute length.
 boolean isMaxDomainValueSet()
          
 boolean isMinDomainValueSet()
          
 void setMaxDomainValue(double value)
          Sets the upper domain value.
 void setMinDomainValue(double value)
          Sets the lower domain value.
 
Methods inherited from class org.knime.base.util.coordinate.NumericCoordinate
addDesiredValues, getDesiredValues, getMaxDomainValue, getMinDomainValue, getNegativeInfinity, getPositiveInfinity, getTickPositionsWithLabels, getUnusedDistBetweenTicks, isNominal
 
Methods inherited from class org.knime.base.util.coordinate.Coordinate
addCoordinateFactory, addMappingMethod, addPolicy, applyMappingMethod, calculateMappedValue, calculateMappedValue, clearDesiredValues, createCoordinate, getActiveMappingMethod, getCompatibleMappingMethods, getCompatiblePolicies, getCurrentPolicy, getDataColumnSpec, getDesiredValuesSet, getDomain, getMappingMethod, getPolicyStategy, 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

IntegerCoordinate

protected IntegerCoordinate(DataColumnSpec dataColumnSpec)
Constructor for class IntegerCoordinate.

Parameters:
dataColumnSpec - the column specification
Method Detail

getTickPositionsInternal

protected CoordinateMapping[] getTickPositionsInternal(double absoluteLength)
Returns an array with the positions of all ticks and their corresponding domain values given an absolute length. The pre-specified tick policy also influences the tick positions, e.g. ascending or descending.

Specified by:
getTickPositionsInternal in class NumericCoordinate
Parameters:
absoluteLength - the absolute length the domain is mapped on
Returns:
the mapping of tick positions and corresponding domain values

calculateMappedValueInternal

protected double calculateMappedValueInternal(DataCell domainValueCell,
                                              double absoluteLength)
Calculates a numeric mapping assuming a DoubleCell. Returns the mapping of a domain value for this coordinate axis. The mapping is done according to the given absolute length.

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.

Specified by:
calculateMappedValueInternal in class NumericCoordinate
Parameters:
domainValueCell - the data cell with the domain value to map
absoluteLength - the absolute length on which the domain value is mapped on
Returns:
the mapped value

isMinDomainValueSet

public boolean isMinDomainValueSet()

Specified by:
isMinDomainValueSet in class NumericCoordinate
Returns:
true if the lower domain range is set properly

isMaxDomainValueSet

public boolean isMaxDomainValueSet()

Specified by:
isMaxDomainValueSet in class NumericCoordinate
Returns:
true if the upper domain range is set properly

setMinDomainValue

public void setMinDomainValue(double value)
Sets the lower domain value.

Overrides:
setMinDomainValue in class NumericCoordinate
Parameters:
value - the lower value

setMaxDomainValue

public void setMaxDomainValue(double value)
Sets the upper domain value.

Overrides:
setMaxDomainValue in class NumericCoordinate
Parameters:
value - the upper value


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.