use of javax.swing.Timer in project processdash by dtuma.
the class BackgroundTaskManager method startPeriodicExecutor.
private void startPeriodicExecutor() {
int millisPerHour = 60 * /* minutes */
60 * /* seconds */
1000;
ActionListener periodicTaskInitiator = new ActionListener() {
public void actionPerformed(ActionEvent e) {
queueScheduledTasks(false);
}
};
Timer t = new Timer(millisPerHour, periodicTaskInitiator);
t.start();
}
use of javax.swing.Timer in project processdash by dtuma.
the class TaskDependencyCellEditor method buttonClicked.
public void buttonClicked() {
if (errMsg != null) {
JOptionPane.showMessageDialog(null, errMsg, "Operation Not Allowed", JOptionPane.ERROR_MESSAGE);
errMsg = null;
cancelCellEditing();
return;
}
closedProgrammatically = false;
int userResponse = setupAndShowDialog();
if (closedProgrammatically || userResponse == JOptionPane.OK_OPTION) {
unloadUIData();
stopCellEditing();
} else {
cancelCellEditing();
}
Timer t = new Timer(100, new ActionListener() {
public void actionPerformed(ActionEvent e) {
parentTable.grabFocus();
}
});
t.setRepeats(false);
t.start();
}
use of javax.swing.Timer in project processdash by dtuma.
the class AddTaskDialog method deferredSetActiveTask.
private void deferredSetActiveTask(final PropertyKey newNode) {
// our hierarchy alterations will trigger a "hierarchy changed" event,
// but that event won't fire until 300 ms after the changes occurred.
// wait a little longer, then make the new task the active one.
Timer t = new Timer(500, new ActionListener() {
public void actionPerformed(ActionEvent e) {
dash.getActiveTaskModel().setNode(newNode);
}
});
t.setRepeats(false);
t.start();
}
use of javax.swing.Timer in project processdash by dtuma.
the class TimeLogEditor method createRecalcTimer.
private void createRecalcTimer() {
recalcTimer = new Timer(1000, (ActionListener) EventHandler.create(ActionListener.class, this, "setTimes"));
recalcTimer.setRepeats(false);
recalcTimer.setInitialDelay(100);
}
use of javax.swing.Timer in project jgnash by ccavanaugh.
the class BusyLayerUI method start.
public void start() {
if (isRunning) {
return;
}
// Run a thread for animation.
isRunning = true;
fadeInStart = System.currentTimeMillis();
fadeOutStart = 0;
timer = new Timer(TIMER_TICK, this);
timer.start();
}
Aggregations