예제 #1
0
 public void handleEvent(MessageBoxEvent ce) {
   Button btn = ce.getButtonClicked();
   if (btn.getText().equals("OK")) {
     status.hide();
     submitButton.unmask();
   }
 }
예제 #2
0
    @Override
    public void handleEvent(final MessageBoxEvent be) {

      final Button btn = be.getButtonClicked();
      try {
        if (btn.getText().equals("Yes")) {
          acceptConnection(r, true);
          scrollMenu.remove(m);
        } else if (btn.getText().equals("No")) {
          scrollMenu.remove(m);
          acceptConnection(r, false);
        }
      } catch (NimbitsException ex) {
        FeedbackHelper.showError(ex);
      }
    }
예제 #3
0
 /**
  * Set button icons... application wide use of button icons can be toggled on and off by setting
  * the BUTTON_ICONS constant.
  *
  * <p>Icons will be used, despite any BUTTON_ICONS setting, if the button has no label.
  *
  * @param button
  * @param iconName
  */
 public static void setIcon(Button button, String iconName) {
   if (button != null && iconName != null && iconName.length() > 0) {
     if (BUTTON_ICONS || button.getText() == null || button.getText().length() == 0)
       button.setIcon(getButtonIcon(iconName, button.isEnabled()));
   }
 }