Commit 6c82457b authored by Matt Tucker's avatar Matt Tucker Committed by matt

Javadoc work.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@778 b35dd754-fafc-0310-a699-88a17e54d16e
parent 760f3d5a
...@@ -25,7 +25,7 @@ import org.jdesktop.jdic.tray.TrayIcon; ...@@ -25,7 +25,7 @@ import org.jdesktop.jdic.tray.TrayIcon;
import org.jdesktop.jdic.tray.SystemTray; import org.jdesktop.jdic.tray.SystemTray;
/** /**
* Launcher for Jive Messenger. * Graphical launcher for Jive Messenger.
* *
* @author Matt Tucker * @author Matt Tucker
*/ */
...@@ -133,28 +133,27 @@ public class Launcher { ...@@ -133,28 +133,27 @@ public class Launcher {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals("Start")) { if (e.getActionCommand().equals("Start")) {
frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
// Adjust button and menu items.
startApplication(); startApplication();
startButton.setEnabled(false); startButton.setEnabled(false);
stopButton.setEnabled(true); stopButton.setEnabled(true);
startMenuItem.setEnabled(false); startMenuItem.setEnabled(false);
stopMenuItem.setEnabled(true); stopMenuItem.setEnabled(true);
// Change to the "on" icon.
frame.setIconImage(onIcon.getImage());
trayIcon.setIcon(onIcon);
// Start a thread to enable the admin button after 8 seconds.
Thread thread = new Thread() { Thread thread = new Thread() {
public void run() { public void run() {
try { try { sleep(8000); }
sleep(8000); catch (Exception e) { }
} // Enable the Launch Admin button/menu item only if the
catch (Exception e) { // server has started.
}
// Enable the Launch Admin button/menu item only if the server has started
if (stopButton.isEnabled()) { if (stopButton.isEnabled()) {
frame.setIconImage(onIcon.getImage());
trayIcon.setIcon(onIcon);
browserButton.setEnabled(true); browserButton.setEnabled(true);
browserMenuItem.setEnabled(true); browserMenuItem.setEnabled(true);
frame.setCursor(Cursor.getDefaultCursor());
} }
frame.setCursor(Cursor.getDefaultCursor());
} }
}; };
...@@ -162,8 +161,10 @@ public class Launcher { ...@@ -162,8 +161,10 @@ public class Launcher {
} }
else if (e.getActionCommand().equals("Stop")) { else if (e.getActionCommand().equals("Stop")) {
stopApplication(); stopApplication();
// Change to the "off" button.
frame.setIconImage(offIcon.getImage()); frame.setIconImage(offIcon.getImage());
trayIcon.setIcon(offIcon); trayIcon.setIcon(offIcon);
// Adjust buttons and menu items.
frame.setCursor(Cursor.getDefaultCursor()); frame.setCursor(Cursor.getDefaultCursor());
browserButton.setEnabled(false); browserButton.setEnabled(false);
startButton.setEnabled(true); startButton.setEnabled(true);
...@@ -243,9 +244,7 @@ public class Launcher { ...@@ -243,9 +244,7 @@ public class Launcher {
} }
/** /**
* DOCUMENT ME! * Creates a new GUI launcher instance.
*
* @param args DOCUMENT ME!
*/ */
public static void main(String[] args) { public static void main(String[] args) {
new Launcher(); new Launcher();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment