Examples of Functor


Examples of org.apache.jorphan.reflect.Functor

            checkPanel.add(check, BorderLayout.NORTH);
            check.addActionListener(this);
                        String actionCommand = NAME_SET_PREFIX + name; // $NON-NLS-1$
            check.setActionCommand(actionCommand);
                        if (!functors.containsKey(actionCommand)) {
              functors.put(actionCommand, new Functor(actionCommand));
            }
          } catch (Exception e) {
            log.warn("Problem creating save config dialog", e);
          }
        }
View Full Code Here

Examples of org.apache.jorphan.reflect.Functor

   *
   * @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()) });
  }
View Full Code Here

Examples of org.apache.jorphan.reflect.Functor

    for(int i=0;i<parts.length;i++){
      String label = parts[i];
      if (isVariableName(label)){
        varCount++;
      } else {
        Functor set = (Functor) headerLabelMethods.get(label);
        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);
View Full Code Here

Examples of org.apache.jorphan.reflect.Functor

    log.debug("Getting row value");
    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

Examples of org.apache.jorphan.reflect.Functor

   */
  public void setValueAt(Object cellValue, int row, int col) {
    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

Examples of org.apache.jorphan.reflect.Functor

    } else {
      value = _value;     
    }
    boolean status = true;
    for(int i=0;i<getColumnCount();i++){
      Functor setMethod = (Functor) writeFunctors.get(i);
      if (setMethod != null) {
        if (!setMethod.checkMethod(value,getColumnClass(i))){
          status=false;
          log.warn(caller.getName()+" is attempting to use nonexistent "+setMethod.toString());
        }
      }
      Functor getMethod = (Functor) readFunctors.get(i);
      if (getMethod != null) {
        if (!getMethod.checkMethod(value)){
          status=false;
          log.warn(caller.getName()+" is attempting to use nonexistent "+getMethod.toString());
        }
      }
     
    }
    return status;
View Full Code Here

Examples of org.apache.jorphan.reflect.Functor

        for (int i = 0; i < parts.length; i++) {
            String label = parts[i];
            if (isVariableName(label)) {
                varCount++;
            } else {
                Functor set = (Functor) headerLabelMethods.get(label);
                set.invoke(saveConfig, new Boolean[] { Boolean.TRUE });
            }
        }

        if (delim != null) {
            log.warn("Default delimiter '" + _saveConfig.getDelimiter()
View Full Code Here

Examples of org.apache.jorphan.reflect.Functor

    private JPanel makeArgumentsPanel() {
        argsPanel = new ArgumentsPanel(JMeterUtils.getResString("arguments_panel_title"), null, true, false // $NON-NLS-1$
                new ObjectTableModel(new String[] { ArgumentsPanel.COLUMN_RESOURCE_NAMES_1 },
                        Argument.class,
                        new Functor[] {
                        new Functor("getValue") }// $NON-NLS-1$
                        new Functor[] {
                        new Functor("setValue") }, // $NON-NLS-1$
                        new Class[] {String.class }));
        return argsPanel;
    }
View Full Code Here

Examples of org.apache.jorphan.reflect.Functor

    // 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

Examples of org.apache.jorphan.reflect.Functor

    // 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
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.