Package net.sf.jeters.componentInterface.editables

Examples of net.sf.jeters.componentInterface.editables.EditableText


    List<ReplacerComponent<?,?>> replacerComps =
      componentManager.getReplacerComponents();

    do{           
      //get the text             
      EditableText inputText = inputComp.getInput(uiComp);
         
      if (inputText != null){
       
        /* TODO: change to collection,
         * decide: all or only one given to next replacer?
         * (currently only the one with index #0)
         */
       
        EditableText[] textArray = new EditableText[1];
        textArray[0] = inputText;
       
        //perform replacements
       
        for (ReplacerComponent replacer : replacerComps) {

          if (textArray != null && textArray.length > 0) {
                       
            EditableText[] resultArray
              = replacer.edit(textArray[0], uiComp);
           
            if (resultArray == null) {
              textArray = null; //quit replacement chain
              break;                 
            } else {
             
              EditableText[] newTextArray
                = new EditableText[textArray.length-1+resultArray.length];

              for (int i=0; i<textArray.length-1; i++) {
                newTextArray[i] = textArray[i+1];
              }
             
              for (int j=0; j<resultArray.length; j++) {
                newTextArray[textArray.length-1+j] = resultArray[j];
              }               
             
              textArray = newTextArray;
             
            }
           
          }
     
        }
       
        if (textArray != null) {
             
          for (EditableText textFromArray : textArray) {
           
            if (outputUnchangedTexts
              || !textFromArray.getText()
                        .equals(inputText.getText())
            ){
             
              //output results   
              ((OutputComponent<EditableText>)outputComp).output(textFromArray, uiComp);

View Full Code Here

TOP

Related Classes of net.sf.jeters.componentInterface.editables.EditableText

Copyright © 2018 www.massapicom. 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.