Esempio n. 1
0
  void show() {
    if (window != null) {
      window.present();
      return;
    }

    window = new Window(WindowType.TOPLEVEL);
    window.setTitle("Snark - Properties");
    window.addListener((LifeCycleListener) this);

    Widget infoBox = create();

    window.add(infoBox);
    infoBox.showAll();
    window.showAll();
  }
Esempio n. 2
0
 /** Handles buttons (Peers, Close). */
 public void buttonEvent(ButtonEvent event) {
   if (event.isOfType(ButtonEvent.Type.CLICK)) {
     Object source = event.getSource();
     if (source.equals(peersButton)) peersWindow.show();
     else if (source.equals(closeButton)) {
       window.destroy();
       window = null;
     } else System.err.println("Unknow event: " + event + " from source: " + source);
   }
 }