Esempio n. 1
0
 private SearchMatcher getSearchMatcher() {
   if (defaultSearch.isSelected()) {
     return new SimplePayloadMatcher(searchField.getText(), caseSensitiveCheckBox.isSelected());
   } else if (inlineScriptSearch.isSelected()) {
     return new InlineScriptMatcher(scriptManager, searchField.getText());
   } else {
     final Script script = ((Script) searchMethod.getSelectedToggle().getUserData());
     return new ScriptMatcher(scriptManager, script);
   }
 }
Esempio n. 2
0
  @FXML
  private void showPerspective() {
    if (spyPerspective.isSelected()) {
      selectedPerspective = MqttSpyPerspective.SPY;
    } else if (superSpyPerspective.isSelected()) {
      selectedPerspective = MqttSpyPerspective.SUPER_SPY;
    } else if (detailedPerspective.isSelected()) {
      selectedPerspective = MqttSpyPerspective.DETAILED;
    } else {
      selectedPerspective = MqttSpyPerspective.DEFAULT;
    }

    for (final ConnectionController connectionController :
        connectionManager.getConnectionControllers()) {
      showPerspective(connectionController);
    }

    logger.debug("Selected perspective = " + selectedPerspective.toString());
  }
 /**
  * Determines which rule is selected in the Games menu.
  *
  * <p>Iterates through the menus in the menu bar looking for the Games menu. Once found it
  * iterates through the menu items under Games looking for radio buttons. For every radio menu
  * item it finds it checks if it's been selected. If a selected one is found strRuleName is set
  * and the whole nest is broken out of and strRuleName is returned.
  *
  * @return
  */
 public String getRuleName() {
   String strRuleName = null;
   for (Menu m : mb.getMenus()) {
     if (m.getText() == "Games") {
       for (MenuItem mi : m.getItems()) {
         if (mi.getClass().equals(RadioMenuItem.class)) {
           RadioMenuItem rmi = (RadioMenuItem) mi;
           if (rmi.isSelected() == true) {
             strRuleName = rmi.getText();
             break;
           }
         }
       }
     }
   }
   return strRuleName;
 }