package com.onaro.sanscreen.client.view.tabular; import java.util.ResourceBundle; import com.onaro.sanscreen.client.view.init.ConfigurableTableModelInitInfo; import com.onaro.util.enumeration.EnumPresentation; public class DerivedNumberColumn extends NumberColumn { private static final long serialVersionUID = 1L; public DerivedNumberColumn(String tableName, ConfigurableTableModelInitInfo.NumberColumnInitInfo columnInitInfo, ResourceBundle resources, EnumPresentation enumerations) { super(tableName, columnInitInfo, resources, enumerations); } /** * Implementation of setValue that allows the value to be changed. This is necessary * for the PercentSummarizer to set the derived value into the leaf cells when grouping. * * @param row the row on which to set the value * @param valueObj the value that is being set */ @Override public boolean setValue(Row row, Object valueObj) throws Exception { //fast fail if (row == null) return false; String userDataKey = getCacheKey(); /** * Put the value in the user data cache for the row. * This will be retrieved in BasicCachingColumn's implementation of * getValue(). */ row.setUserData(userDataKey, valueObj); return true; } }