public void resetValues() { for (SelectableFeature feature : features) { feature.setManual(Selection.UNDEFINED); feature.setAutomatic(Selection.UNDEFINED); } update(false, null); }
/** * Turns all automatic into manual values * * @param discardDeselected if {@code true} all automatic deselected features get undefined * instead of manual deselected */ public void makeManual(boolean discardDeselected) { for (SelectableFeature feature : features) { final Selection autoSelection = feature.getAutomatic(); if (autoSelection != Selection.UNDEFINED) { feature.setAutomatic(Selection.UNDEFINED); if (!discardDeselected || autoSelection == Selection.SELECTED) { feature.setManual(autoSelection); } } } }
void setAutomatic(SelectableFeature feature, Selection selection) { feature.setAutomatic(selection); }
void resetAutomaticValues() { for (SelectableFeature feature : features) { feature.setAutomatic(Selection.UNDEFINED); } }