java-gnome version 4.1.2

org.gnome.gtk
Interface Switch.NotifyActivated

Enclosing class:
Switch

public static interface Switch.NotifyActivated

The callback invoked when the Switch is activated. Generally, when you will receive the callback, you will probably want to check the active property with the Switch isActive() method:

 final Switch switcher;
 
 ...
 
 switcher.connect(new Switch.NotifyActivated() {
     public void onNotifyActivated(Switch source) {
         if (source.isActive()) {
             System.out.printl("WiFi is on.");
         } else {
             System.out.printl("WiFi is off.");
         }
     }
 });
 

Since:
4.1.2

Method Summary
 void onNotifyActivated(Switch source)
           
 

Method Detail

onNotifyActivated

void onNotifyActivated(Switch source)


java-gnome