예제 #1
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);
   }
 }
예제 #2
0
        @Override
        public void componentSelected(ButtonEvent ce) {
          fireEvent(Events.Select, new BaseEvent(Events.Select));

          model.setType((Type) ce.getButton().getData(TYPE_DATA));
          reportEventBus.fireChange();
        }