Package org.metaworks.inputter

Examples of org.metaworks.inputter.Inputter


  public void setRoleResolutionContext(RoleResolutionContext roleResolutionContext) {
    rrcText.setRoleResolutionContext(roleResolutionContext);
  }

  public void actionPerformed(ActionEvent e) {
    Inputter rrcInputter = (Inputter)e.getSource();
    setRoleResolutionContext((RoleResolutionContext) rrcInputter.getValue());
  }
View Full Code Here


        pl.add(conditionBox);
       
        //
        valueInput = new ObjectInput();
       
        Inputter dtInput_;
    try {
      dtInput_ = ObjectType.getDefaultInputter(Class.class);
    } catch (Exception e1) {
      dtInput_ = new DataTypeInput();
    }
    final Inputter dtInput = dtInput_;
   
        cards = new JPanel(new CardLayout());
        cards.add(pvi2.getComponent(), "byVariable");
        cards.add(dtInput.getComponent(), "byUser");      
       
        final JPanel dynamicPanel = new JPanel(new BorderLayout());
       
        dynamicPanel.add(CreateRadioPanel(), BorderLayout.NORTH);
        dynamicPanel.add(cards, BorderLayout.CENTER);
        //pl2.add(valueInput.getComponent(), BorderLayout.WEST);
        pl.add(dynamicPanel);
       
       
    dtInput.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent e) {
        try{
          Class type = (Class)dtInput.getValue();
          if(type!=null){
            if(valueInput==null)
              valueInput = new ObjectInput();
           
            cards.getParent().add(valueInput.getComponent(), BorderLayout.SOUTH);
            valueInput.setType(type);
            dlg.pack();
           
          }
        }catch(Exception ex){}
      }
    });
       
   
    roleExist.setLayout(new BoxLayout(roleExist, BoxLayout.X_AXIS));
    roleExist.setBorder(BorderFactory.createEtchedBorder());
   
    roleinput = new RoleInput();
    roleinput.setProcessDefinition(getProcessDefinition());
    roleComment = new JLabel(GlobalContext.getLocalizedMessage("conditioneditor.s_actual_binding_is_exist.label", "'s actual binding is "));
   
    roleExistOrNotExist = new JComboBox();
    roleExistOrNotExist.addItem("exist");
    roleExistOrNotExist.addItem("not exist");
   
    roleExist.add(roleinput.getComponent());
    roleExist.add(roleComment);
    roleExist.add(roleExistOrNotExist);
   
      //��� v���� ��8�� ��n�1�
        try{
          Vector rows = ((DefaultTableModel)getModel()).getDataVector();
          Vector cols = (Vector)rows.get(selectedRow);
         
          if(cols.get(selectedColumn) instanceof Otherwise){
            //outterButtonModel2.setSelected(true);
            otherwiseButton.setSelected(true);
            enableAll(plOther);
            disableAll(pl);
            disableAll(roleExist);
         
          }else if(cols.get(selectedColumn) instanceof Evaluate){
            conditionButton.setSelected(true);
            enableAll(pl);
            disableAll(plOther);
            disableAll(roleExist);
           
            Evaluate evaluate = (Evaluate)cols.get(selectedColumn);
            if(evaluate!=null){
              pvi.setValue(ProcessVariable.forName(evaluate.getKey()));
             
              if(evaluate.getValue() instanceof ProcessVariable ){
                //group.setSelected(innerButtonModel, true);
                byVariable.setSelected(true);
                pvi2.setValue((ProcessVariable)evaluate.getValue());
               
              }else{
                //group.setSelected(innerButtonModel2, true);
                byUser.setSelected(true);
                //View ��ü
                CardLayout cl = (CardLayout)cards.getLayout();
                cl.show(cards, "byUser");
               
                    //������
                    dtInput.setValue(evaluate.getValue().getClass());
                valueInput.setValue(evaluate.getValue());
                dlg.pack();
               
              }
             
View Full Code Here

    fd = type.getFieldDescriptor("Inputter");
    fd.setValidators(new Validator[]{
      new Validator(){

        public String validate(Object data, Instance instance) {
          Inputter inputter = (Inputter)data;
          Class type = (Class)instance.getFieldValue("Type");

          if( inputter.isEligibleType(type)) return null;

          return "This inputter is not eligible for " + type;
        }
       
      }
View Full Code Here

      for(int i=0; i<pcs.length; i++){
        ProcessVariable pv = pcs[i].getVariable();
        FieldDescriptor fd = new FieldDescriptor(pv.getName(), pv.getDisplayName().getText());
        fd.setType(pv.getType());
       
        Inputter specifiedInputter = pv.getInputter();
        if(specifiedInputter!=null){
          fd.setInputter(specifiedInputter);
        }
               
        processVariableTable.addFieldDescriptor(fd);
View Full Code Here

public class DirectValueTransformer extends Transformer{

  public static void metaworksCallback_changeMetadata(Type type){
    FieldDescriptor fd = type.getFieldDescriptor("Type");

    final Inputter dtInput = fd.getInputter();
   
    fd = type.getFieldDescriptor("Value");
    final ObjectInput valueInput = new ObjectInput();
    fd.setInputter(valueInput);
   
    dtInput.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent e) {
        try{
          Class type = (Class)dtInput.getValue();
          if(type!=null){
            valueInput.setType(type);
          }
        }catch(Exception ex){}
      }
View Full Code Here

TOP

Related Classes of org.metaworks.inputter.Inputter

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.