Search in sources :

Example 1 with SizeModelDouble

use of org.knime.core.data.property.SizeModelDouble in project knime-core by knime.

the class SizeManager2NodeModel method createSizeHandler.

/**
 * Create SizeHandler based on given DataColumnSpec.
 * @param cspec spec with minimum and maximum bound
 * @return SizeHandler
 */
private SizeHandler createSizeHandler(final DataColumnSpec cspec) {
    // get the domain range for the double size handler
    double minimum = ((DoubleValue) cspec.getDomain().getLowerBound()).getDoubleValue();
    double maximum = ((DoubleValue) cspec.getDomain().getUpperBound()).getDoubleValue();
    return new SizeHandler(new SizeModelDouble(minimum, maximum, m_factor.getDoubleValue(), SizeModelDouble.Mapping.valueOf(m_mapping.getStringValue())));
}
Also used : DoubleValue(org.knime.core.data.DoubleValue) SizeHandler(org.knime.core.data.property.SizeHandler) SizeModelDouble(org.knime.core.data.property.SizeModelDouble)

Aggregations

DoubleValue (org.knime.core.data.DoubleValue)1 SizeHandler (org.knime.core.data.property.SizeHandler)1 SizeModelDouble (org.knime.core.data.property.SizeModelDouble)1