private void queryClearAllStats() { XLabel msg = new XLabel(bundle.getString("clear.all.counters.confirm")); Frame frame = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, this); int answer = JOptionPane.showConfirmDialog(this, msg, frame.getTitle(), JOptionPane.OK_CANCEL_OPTION); if (answer == JOptionPane.OK_OPTION) { appContext.submit(new ClearAllStatsWorker()); } }
@Override protected void finished() { if (tornDown.get()) { return; } Exception e = getException(); if (e != null) { Throwable rootCause = ExceptionHelper.getRootCause(e); if (!(rootCause instanceof IOException)) { appContext.log(e); } } else { updateStats(); } clearAllStatsButton.setText(bundle.getString("clear.all.stats")); clearAllStatsButton.setSelected(false); clearAllStatsButton.setEnabled(true); } }
@Override protected void finished() { if (tornDown.get()) { return; } Exception e = getException(); if (e != null) { Throwable rootCause = ExceptionHelper.getRootCause(e); if (!(rootCause instanceof IOException)) { appContext.log(e); } } else { updateStats(); } clearStatisticsAction.setEnabled(true); } }
@Override protected void finished() { if (tornDown.get()) { return; } Exception e = getException(); if (e != null) { Throwable rootCause = ExceptionHelper.getRootCause(e); if (!(rootCause instanceof IOException)) { appContext.log(e); } } else { updateStats(); } clearAllStatsButton.setSelected(false); clearAllStatsButton.setEnabled(true); } }
private void queryClearAllStats() { String currLabel = clearAllStatsButton.getText(); XLabel msg = new XLabel(bundle.getString("clear.all.counters.confirm")); Frame frame = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, this); int answer = JOptionPane.showConfirmDialog(this, msg, frame.getTitle(), JOptionPane.OK_CANCEL_OPTION); if (answer == JOptionPane.OK_OPTION) { appContext.submit(new ClearAllStatsWorker()); } else { clearAllStatsButton.setText(currLabel); clearAllStatsButton.setSelected(false); clearAllStatsButton.setEnabled(true); } }
private void queryClearAllStats() { XLabel msg = new XLabel(bundle.getString("clear.all.counters.confirm")); Frame frame = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, this); int answer = JOptionPane.showConfirmDialog(this, msg, frame.getTitle(), JOptionPane.OK_CANCEL_OPTION); if (answer == JOptionPane.OK_OPTION) { appContext.submit(new ClearAllStatsWorker()); } else { clearAllStatsButton.setSelected(false); clearAllStatsButton.setEnabled(true); } }