Examples of UIRequest_Selection


Examples of net.sf.jeters.componentInterface.dataStructs.UIRequest_Selection

      List<UIRequest> requestList = new LinkedList<UIRequest>();
     
      int selectedURLIndex = indexOfUrlInURLStringArray(conf_wikiURLs, currentURL);
      if (selectedURLIndex == -1) {selectedURLIndex = 0;} //use first one by default
     
      requestList.add(new UIRequest_Selection("url", str("mediaWikiRead"), str("helpMediaWikiRead"), selectedURLIndex, conf_wikiURLs));
      requestList.add(new UIRequest_Selection("type", str("inputType"), str("helpInputType"), 0,
                                          new String[]{str("inputSingleArticle"),
                                                         str("inputFrom"),
                                                         str("inputPrefix"),
                                                         str("inputCategory"),
                                                         str("inputLinkingTo"),
                                                         str("inputUsingImage"),
                                                         str("inputEmbeddingTemplate")}));
      requestList.add(new UIRequest_String("name", str("inputName"), str("helpInputName")));
     
      for (int i = 0; i < restrictionsInArticleSelection; i++ ) {
        requestList.add(new UIRequest_Selection(
            "restriction_type_" + i,
            str("restrictionType", (i+1)),
            str("helpRestrictionType"),
            0,
            new String[]{str("restrictionNone"),
View Full Code Here

Examples of net.sf.jeters.componentInterface.dataStructs.UIRequest_Selection

      while ( !completed ) {
       
        int selectedURLIndex = indexOfUrlInURLStringArray(conf_wikiURLs, text.getWikiURL());
       
        UIRequest[] overviewRequestArray = new UIRequest[] {
            new UIRequest_Selection("url", str("mediaWikiWrite"), str("helpMediaWikiWrite"), selectedURLIndex, wikiURLs),
            new UIRequest_String("label", str("articleName"), str("helpArticleName"), text.getLabel()),
            new UIRequest_String("text", str("articleText"), str("helpArticleText"), text.getText(),multipleLines,lineWrap),
            new UIRequest_String("summary", str("summary"), str("helpSummary"), text.getEditSummary()),
            new UIRequest_Boolean("minor", str("minor"), str("helpMinor"), text.isMinorEdit())
        };
         
        NamedDataSet overviewReply = uiForRequests.request(overviewRequestArray);
         
        if ( overviewReply == null ) {
          text = null;
          completed = true;
        } else {         
         
          try {
            createBot(conf_wikiURLs[overviewReply.<Integer>get("url")]);
           
            text.setLabel(overviewReply.<String>get("label"));
            text.setText(overviewReply.<String>get("text"));
            text.setEditSummary(overviewReply.<String>get("summary"));
            text.setMinorEdit(overviewReply.<Boolean>get("minor"));
             
            completed = true;
           
          } catch (MalformedURLException e) {
            uiForRequests.request(
                new UIRequest_Output(
                    str("errorMalformedURL", e.getMessage())));
          } catch (NamedDataNotAvailableException e) {       
            uiForRequests.request(new UIRequest_Output(str("errorUserInput")));
          }
         
        }
       
      }
     
    } else {

      if (text.getWikiURL() != null) {
        try {
          createBot(text.getWikiURL().toString());         
        } catch (MalformedURLException e) {
          //do nothing, user will be asked
        }
      }
     
      if (bot == null || alwaysAskForOutputWiki) {
       
        int selectedURLIndex = indexOfUrlInURLStringArray(wikiURLs, text.getWikiURL());
       
        UIRequest[] requestArray = new UIRequest[] {
            new UIRequest_Selection("url", str("mediaWikiWrite"), str("helpMediaWikiWrite"), selectedURLIndex, conf_wikiURLs)
        };
       
        NamedDataSet reply = uiForRequests.request(requestArray);
       
        try {
View Full Code Here

Examples of net.sf.jeters.componentInterface.dataStructs.UIRequest_Selection

           
            break;           
                     
          case Request_Selection:
   
            UIRequest_Selection selectionRequest = (UIRequest_Selection)request;
       
            //create the combo box
           
            JComboBox comboBoxSelectionRequest = new JComboBox();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.