void clear() { if (!SwingUtilities.isEventDispatchThread()) { UiThreadingViolationException uiThreadingViolationError = new UiThreadingViolationException( "State tracking must be done on Event Dispatch Thread"); uiThreadingViolationError.printStackTrace(System.err); throw uiThreadingViolationError; } this.stateContributionMap.clear(); this.stateContributionMap.put(this.currState, new StateContributionInfo(1.0f, 1.0f)); this.stateNoSelectionContributionMap.clear(); this.stateNoSelectionContributionMap.put(this.currStateNoSelection, new StateContributionInfo(1.0f, 1.0f)); this.sync(); } }
void clear() { if ((SubstanceCoreUtilities.reallyPrintThreadingExceptions() || SubstanceCoreUtilities.reallyThrowThreadingExceptions()) && !SwingUtilities.isEventDispatchThread()) { UiThreadingViolationException uiThreadingViolationError = new UiThreadingViolationException( "State tracking must be done on Event Dispatch Thread"); if (SubstanceCoreUtilities.reallyPrintThreadingExceptions()) { uiThreadingViolationError.printStackTrace(System.err); } if (SubstanceCoreUtilities.reallyThrowThreadingExceptions()) { throw uiThreadingViolationError; } } this.stateContributionMap.clear(); this.stateContributionMap.put(this.currState, new StateContributionInfo(1.0f, 1.0f)); this.stateNoSelectionContributionMap.clear(); this.stateNoSelectionContributionMap.put(this.currStateNoSelection, new StateContributionInfo(1.0f, 1.0f)); this.sync(); } }
ComponentState state = existing.getKey(); float newEnd = (state == newState) ? 1.0f : 0.0f; newContributionMap.put(state, new StateContributionInfo( currRange.curr, newEnd)); StateContributionInfo currRange = existing.getValue(); ComponentState state = existing.getKey(); newContributionMap.put(state, new StateContributionInfo( currRange.curr, 0.0f)); newContributionMap.put(newState, new StateContributionInfo(0.0f, 1.0f)); float newEnd = (state == newStateNoSelection) ? 1.0f : 0.0f; newNoSelectionContributionMap.put(state, new StateContributionInfo(currRange.curr, newEnd)); ComponentState state = existing.getKey(); newNoSelectionContributionMap.put(state, new StateContributionInfo(currRange.curr, 0.0f)); new StateContributionInfo(0.0f, 1.0f));
ComponentState state = existing.getKey(); float newEnd = (state == newState) ? 1.0f : 0.0f; newContributionMap.put(state, new StateContributionInfo( currRange.curr, newEnd)); StateContributionInfo currRange = existing.getValue(); ComponentState state = existing.getKey(); newContributionMap.put(state, new StateContributionInfo( currRange.curr, 0.0f)); newContributionMap.put(newState, new StateContributionInfo(0.0f, 1.0f)); float newEnd = (state == newStateNoSelection) ? 1.0f : 0.0f; newNoSelectionContributionMap.put(state, new StateContributionInfo(currRange.curr, newEnd)); ComponentState state = existing.getKey(); newNoSelectionContributionMap.put(state, new StateContributionInfo(currRange.curr, 0.0f)); new StateContributionInfo(0.0f, 1.0f));