Package com.sardak.antform.util

Examples of com.sardak.antform.util.CSVReader.digest()


  /**
   * set selected value
   */
  public void setValue(String value) {
    CSVReader reader = new CSVReader(separator, escapeSequence);
    List valueList = value == null ? new ArrayList() : reader.digest(value, true);
    for (Iterator iterator = buttons.iterator(); iterator.hasNext();) {
      JCheckBox checkBox = (JCheckBox) iterator.next();
      checkBox.setSelected(valueList.contains(checkBox.getText()));
    }
  }
View Full Code Here


  /**
   * split the values
   */
  private void split() {
    CSVReader reader = new CSVReader(separator, escapeSequence);
    List valueList = reader.digest(values, true);
    splitValues = (String[]) valueList.toArray(new String[valueList.size()]);
  }

  /**
   * @param values
View Full Code Here

    for (Iterator iter = rowsList.iterator(); iter.hasNext();) {
      String row = (String) iter.next();
      if (row.trim().length()==0) {
        continue;
      }
      List cells = columnReader.digest(row, true);
      String[] cellStrings = (String[]) cells.toArray(new String[cells.size()]);
      dataList.add(cellStrings);
      if (cellStrings.length>maxCols) {
        maxCols = cellStrings.length;
      }
View Full Code Here

  /**
   * split the column headers
   */
  public String[]  splitColumns(){
    CSVReader columnReader = new CSVReader(columnSeparator, escapeSequence);
    List values = columnReader.digest(columns, true);
    cols = (String[]) values.toArray(new String[values.size()]);
    return cols;
  }
 
  public static void main(String[] args) {
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.