/** * Change state of buttons on remote test * * @param started * Flag whether the test is started */ public void setRemoteTestStarted(boolean started) { Map<String, Boolean> buttonStates = new HashMap<>(3); buttonStates.put(ActionNames.REMOTE_START_ALL, Boolean.valueOf(!started)); buttonStates.put(ActionNames.REMOTE_STOP_ALL, Boolean.valueOf(started)); buttonStates.put(ActionNames.REMOTE_SHUT_ALL, Boolean.valueOf(started)); updateButtons(buttonStates); }
/** * Change state of buttons on local test * * @param started * Flag whether local test is started */ public void setLocalTestStarted(boolean started) { Map<String, Boolean> buttonStates = new HashMap<>(3); buttonStates.put(ActionNames.ACTION_START, Boolean.valueOf(!started)); buttonStates.put(ActionNames.ACTION_START_NO_TIMERS, Boolean.valueOf(!started)); buttonStates.put(ActionNames.ACTION_STOP, Boolean.valueOf(started)); buttonStates.put(ActionNames.ACTION_SHUTDOWN, Boolean.valueOf(started)); updateButtons(buttonStates); }
/** * Change state of buttons after undo or redo * * @param canUndo * Flag whether the button corresponding to * {@link ActionNames#UNDO} should be enabled * @param canRedo * Flag whether the button corresponding to * {@link ActionNames#REDO} should be enabled */ public void updateUndoRedoIcons(boolean canUndo, boolean canRedo) { Map<String, Boolean> buttonStates = new HashMap<>(2); buttonStates.put(ActionNames.UNDO, Boolean.valueOf(canUndo)); buttonStates.put(ActionNames.REDO, Boolean.valueOf(canRedo)); updateButtons(buttonStates); }
/** * Init the state of buttons */ public void initButtonsState() { Map<String, Boolean> buttonStates = new HashMap<>(); buttonStates.put(ActionNames.ACTION_START, Boolean.TRUE); buttonStates.put(ActionNames.ACTION_START_NO_TIMERS, Boolean.TRUE); buttonStates.put(ActionNames.ACTION_STOP, Boolean.FALSE); buttonStates.put(ActionNames.ACTION_SHUTDOWN, Boolean.FALSE); buttonStates.put(ActionNames.UNDO, Boolean.FALSE); buttonStates.put(ActionNames.REDO, Boolean.FALSE); buttonStates.put(ActionNames.REMOTE_START_ALL, Boolean.TRUE); buttonStates.put(ActionNames.REMOTE_STOP_ALL, Boolean.FALSE); buttonStates.put(ActionNames.REMOTE_SHUT_ALL, Boolean.FALSE); updateButtons(buttonStates); }
/** * {@inheritDoc} */ @Override public void localeChanged(LocaleChangeEvent event) { Map<String, Boolean> currentButtonStates = getCurrentButtonsStates(); this.removeAll(); setupToolbarContent(this); updateButtons(currentButtonStates); }