Service for defining strategies for merging a column of rows of a table.
Has the same interface as a manipulator.
When a RowsMergeStrategy is executed it must reduce all values to one that should be returned later when getReducedValue is called
RowsMergeStrategy
getReducedValue
220221222223224225226227
setToolTipText(getMessage("MergeNodesUI.configurationText")); addActionListener(this); } public void refreshEnabledState() { AttributeRowsMergeStrategy strategy = getStrategy(strategyIndex); setEnabled(strategy != null && strategy.getUI() != null);//Has strategy and the strategy has UI }
261262263264265266267268
setIcon(INFO_LABELS_ICON); prepareRichTooltip(); } public void refreshEnabledState() { AttributeRowsMergeStrategy strategy = getStrategy(strategyIndex); setEnabled(strategy != null && strategy.getDescription() != null && !strategy.getDescription().isEmpty()); }
794795796797798799800801802803804805806807808809810811812
} if (selectedRow == null) { selectedRow = rows[0]; } AttributeRowsMergeStrategy mergeStrategy; Object value; for (int i = 0; i < columns.length; i++) { mergeStrategy = mergeStrategies[i]; if (mergeStrategy != null) { mergeStrategy.setup(rows, selectedRow, columns[i]); if (mergeStrategy.canExecute()) { mergeStrategy.execute(); value = mergeStrategy.getReducedValue(); } else { value = selectedRow.getValue(columns[i].getIndex()); } } else { value = selectedRow.getValue(columns[i].getIndex());
258259260261262263264265
setToolTipText(getMessage("MergeNodeDuplicatesUI.configurationText")); addActionListener(this); } public void refreshEnabledState() { AttributeRowsMergeStrategy strategy = getStrategy(strategyIndex); setEnabled(strategy != null && strategy.getUI() != null);//Has strategy and the strategy has UI }
300301302303304305306307