コード例 #1
0
 /** Set tray icon to inactive (network down) */
 public void resetIcon() {
   display.syncExec(
       new Runnable() {
         public void run() {
           trayItem.setImage(image);
         }
       });
 }
コード例 #2
0
 /** Set tray icon to inactive (network down) */
 public void inactiveIcon() {
   isActive = false;
   display.syncExec(
       new Runnable() {
         public void run() {
           trayItem.setImage(inactiveImage);
         }
       });
 }
コード例 #3
0
 /** Switch tray icon between active and standby icon. */
 public void switchIcon() {
   isActive = true;
   display.syncExec(
       new Runnable() {
         public void run() {
           if (trayItem.getImage().equals(image)) {
             trayItem.setImage(image2);
           } else {
             trayItem.setImage(image);
           }
         }
       });
 }