Package org.apache.jorphan.reflect

Examples of org.apache.jorphan.reflect.Functor.invoke()


    Object value = objects.get(row);
    if(headers.size() == 1 && col >= readFunctors.size())
      return value;
    Functor getMethod = (Functor) readFunctors.get(col);
    if (getMethod != null && value != null) {
      return getMethod.invoke(value);
    }
    return null;
  }

  /**
 
View Full Code Here


    if (row < objects.size()) {
      Object value = objects.get(row);
      if (col < writeFunctors.size()) {
        Functor setMethod = (Functor) writeFunctors.get(col);
        if (setMethod != null) {
          setMethod.invoke(value, new Object[] { cellValue });
          super.fireTableDataChanged();
        }
      }
      else if(headers.size() == 1)
      {
View Full Code Here

    // We know the column names all exist, so create the config
    SampleSaveConfiguration saveConfig=new SampleSaveConfiguration(false);
   
    for(int i=0;i<parts.length;i++){
      Functor set = (Functor) headerLabelMethods.get(parts[i]);
      set.invoke(saveConfig,new Boolean[]{Boolean.TRUE});
    }
    return saveConfig;
  }

  /**
 
View Full Code Here

    // We know the column names all exist, so create the config
    SampleSaveConfiguration saveConfig=new SampleSaveConfiguration(false);
   
    for(int i=0;i<parts.length;i++){
      Functor set = (Functor) headerLabelMethods.get(parts[i]);
      set.invoke(saveConfig,new Boolean[]{Boolean.TRUE});
    }

    if (delim != null){
      log.warn("Default delimiter '"+_saveConfig.getDelimiter()+"' did not work; using alternate '"+delim+"' for reading "+filename);
      saveConfig.setDelimiter(delim);
View Full Code Here

    Object value = objects.get(row);
    if(headers.size() == 1 && col >= readFunctors.size())
      return value;
    Functor getMethod = (Functor) readFunctors.get(col);
    if (getMethod != null && value != null) {
      return getMethod.invoke(value);
    }
    return null;
  }

  /**
 
View Full Code Here

    if (row < objects.size()) {
      Object value = objects.get(row);
      if (col < writeFunctors.size()) {
        Functor setMethod = (Functor) writeFunctors.get(col);
        if (setMethod != null) {
          setMethod.invoke(value, new Object[] { cellValue });
          super.fireTableDataChanged();
        }
      }
      else if(headers.size() == 1)
      {
View Full Code Here

   * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
   */
  public void actionPerformed(ActionEvent e) {
    String action = e.getActionCommand();
    Functor f = (Functor) functors.get(action);
    f.invoke(saveConfig, new Object[] {
                Boolean.valueOf(((JCheckBox) e.getSource()).isSelected()) });
  }

  /**
   * @return Returns the saveConfig.
View Full Code Here

    Object value = objects.get(row);
    if(headers.size() == 1 && col >= readFunctors.size())
      return value;
    Functor getMethod = (Functor) readFunctors.get(col);
    if (getMethod != null && value != null) {
      return getMethod.invoke(value);
    }
    return null;
  }

  /**
 
View Full Code Here

    if (row < objects.size()) {
      Object value = objects.get(row);
      if (col < writeFunctors.size()) {
        Functor setMethod = (Functor) writeFunctors.get(col);
        if (setMethod != null) {
          setMethod.invoke(value, new Object[] { cellValue });
          super.fireTableDataChanged();
        }
      }
      else if(headers.size() == 1)
      {
View Full Code Here

   * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
   */
  public void actionPerformed(ActionEvent e) {
    String action = e.getActionCommand();
    Functor f = (Functor) functors.get(action);
    f.invoke(saveConfig, new Object[] { new Boolean(((JCheckBox) e.getSource()).isSelected()) });
  }

  /**
   * @return Returns the saveConfig.
   */
 
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.