com.kerrybuckley.cctrayicon.swing
Class SwingCcStatusMonitor

java.lang.Object
  extended bycom.kerrybuckley.cctrayicon.swing.SwingCcStatusMonitor
All Implemented Interfaces:
CcStatusMonitor

public class SwingCcStatusMonitor
extends java.lang.Object
implements CcStatusMonitor

Author:
Kerry Buckley

Field Summary
 
Fields inherited from interface com.kerrybuckley.cctrayicon.CcStatusMonitor
DEFAULT_POLL_INTERVAL
 
Method Summary
 void addMenuItem(javax.swing.JMenuItem item)
          Add a menu item to the monitor's menu.
static void main(java.lang.String[] args)
          Starts a new instance of the status monitor tray icon running.
 void notifyBuildFailure(java.lang.String message)
          Notify the monitor of build failure(s).
 void notifyBuildFixed(java.lang.String message)
          Notify the monitor that failed build(s) is/are now fixed.
 void notifyServerUnreachable(java.lang.String message)
          Notify the monitor that the server is unreachable.
 void setStatus(boolean buildClean)
          Set the overall status of the build.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Starts a new instance of the status monitor tray icon running.

Parameters:
args - arguments (not used)
Throws:
java.lang.Exception - if initialisation fails

setStatus

public void setStatus(boolean buildClean)
Description copied from interface: CcStatusMonitor
Set the overall status of the build.

Specified by:
setStatus in interface CcStatusMonitor
Parameters:
buildClean - a flag indicating whether the build is clean.
See Also:
CcStatusMonitor.setStatus(boolean)

notifyBuildFailure

public void notifyBuildFailure(java.lang.String message)
Description copied from interface: CcStatusMonitor
Notify the monitor of build failure(s).

Specified by:
notifyBuildFailure in interface CcStatusMonitor
Parameters:
message - a message to display with the notification
See Also:
CcStatusMonitor.notifyBuildFailure(java.lang.String)

notifyBuildFixed

public void notifyBuildFixed(java.lang.String message)
Description copied from interface: CcStatusMonitor
Notify the monitor that failed build(s) is/are now fixed.

Specified by:
notifyBuildFixed in interface CcStatusMonitor
Parameters:
message - a message to display with the notification
See Also:
CcStatusMonitor.notifyBuildFixed(java.lang.String)

notifyServerUnreachable

public void notifyServerUnreachable(java.lang.String message)
Description copied from interface: CcStatusMonitor
Notify the monitor that the server is unreachable.

Specified by:
notifyServerUnreachable in interface CcStatusMonitor
Parameters:
message - a message to display with the notification
See Also:
CcStatusMonitor.notifyServerUnreachable(java.lang.String)

addMenuItem

public void addMenuItem(javax.swing.JMenuItem item)
Add a menu item to the monitor's menu.

Parameters:
item - the item to add