Skip to content

Commit

Permalink
set the cursor during a commit operation
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Feb 2, 2008
1 parent be15d04 commit b0d351a
Showing 1 changed file with 10 additions and 7 deletions.
Expand Up @@ -20,6 +20,7 @@
package org.jumpmind.symmetric.admin;

import java.awt.Component;
import java.awt.Cursor;
import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
Expand Down Expand Up @@ -110,15 +111,17 @@ public void actionPerformed(ActionEvent e) {
final SymmetricDatabase c = getSelectedConnection();
if (c != null && this.getValue(Action.NAME).equals(CONNECT)) {
try {
Worker.post(new Task() {
public Object run() throws Exception {
c.connect();
return null;
}
});
tree.setCursor(new Cursor(Cursor.WAIT_CURSOR));
Worker.post(new Task() {
public Object run() throws Exception {
c.connect();
return null;
}
});
} catch (Exception ex) {
appController.showError("Trouble connecting to the symmetric database.", ex);
}
tree.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
tree.repaint();
} else {
appController.showError("No connection was selected.", null);
Expand Down Expand Up @@ -221,7 +224,7 @@ public void mouseClicked(MouseEvent e) {
appController.show(ScreenName.INFO, c);
}
}

public void mousePressed(MouseEvent e) {
maybeShowPopup(e);
}
Expand Down

0 comments on commit b0d351a

Please sign in to comment.