Examples of XFormField


Examples of com.eviware.x.form.XFormField

    String description = messages.get( fieldAnnotation.description() );
    String[] values = messages.getArray( fieldAnnotation.values() );
    String defaultValue = messages.get( fieldAnnotation.defaultValue() );
    boolean enabled = fieldAnnotation.enabled();

    XFormField field = null;
    switch( type )
    {
    case STRING :
      field = form.addTextField( name, description, FieldType.TEXT );
      break;
    case INT :
      field = form.addTextField( name, description, FieldType.TEXT );
      ( ( XFormTextField )field ).setWidth( 10 );
      break;
    case STRINGAREA :
      field = form.addTextField( name, description, FieldType.TEXTAREA );
      break;
    case BOOLEAN :
      field = form.addCheckBox( name, description );
      break;
    case FILE :
      field = form.addTextField( name, description, FieldType.FILE );
      break;
    case FOLDER :
      field = form.addTextField( name, description, FieldType.FOLDER );
      break;
    case FILE_OR_FOLDER :
      field = form.addTextField( name, description, FieldType.FILE_OR_FOLDER );
      break;
    case ENUMERATION :
      field = form.addComboBox( name, values, description );
      break;
    case RADIOGROUP :
      field = form.addComponent( name, new XFormRadioGroup( values ) );
      break;
    case MULTILIST :
      field = form.addComponent( name, new XFormMultiSelectList( values ) );
      break;
    case STRINGLIST :
      field = form.addComponent( name, new JStringListFormField( description, defaultValue ) );
      break;
    case TABLE :
      field = form.addComponent( name, new JTableFormField( description ) );
      break;
    case ACTION :
      field = form.addComponent( name, new ActionFormFieldComponent( name, description ) );
      break;
    case COMPONENT :
      field = form.addComponent( name, new JComponentFormField( name, description ) );
      break;
    case PASSWORD :
      field = form.addComponent( name, new JPasswordFieldFormField() );
      break;
    case INFORMATION :
      field = form.addComponent( name, new JMultilineLabelTextField() );
      break;
    case LABEL :
      field = form.addComponent( name, new JLabelFormField( description ) );
      break;
    case SEPARATOR :
      form.addSeparator( description );
    case RADIOGROUP_TOP_BUTTON :
      field = form.addComponent( name, new XFormRadioGroupTopButtonPosition( values ) );
      break;
    default :
      System.out.println( "Unsupported field type: " + type );
    }

    if( field != null )
      field.setEnabled( enabled );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormField

    addWSDLFields( mainForm, modelItem );

    mainForm.addTextField( OUTPUT, "root directory for generated files.", XForm.FieldType.PROJECT_FOLDER );
    mainForm.addTextField( PACKAGE, "target package nam", XForm.FieldType.JAVA_PACKAGE );

    XFormField dbComboBox = mainForm.addComboBox( DATABINDING, new String[] { "xmlbeans", "adb", "jibx", "jaxme" },
        "Specifies the Databinding framework." );

    mainForm.addCheckBox( ASYNC, "(generate code only for async style)" );
    mainForm.addCheckBox( SYNC, "(generate code only for sync style)" );
    mainForm.addCheckBox( TESTCASE, "(Generate a test case)" );

    XFormField serverSideCB = mainForm.addCheckBox( SERVERSIDE, "(Generate server side code (i.e. skeletons))" );

    XFormField ssiCB = mainForm.addCheckBox( SERVERSIDEINTERFACE, "(Generate interface for server side)" );
    XFormField sdCB = mainForm.addCheckBox( SERICEDESCRIPTOR, "(Generate the service descriptor (i.e. server.xml).)" );
    serverSideCB.addComponentEnabler( ssiCB, "true" );
    serverSideCB.addComponentEnabler( sdCB, "true" );

    XForm advForm = builder.createForm( "Advanced" );

    advForm.addCheckBox( GENERATEALL, "(Genrates all the classes)" );
    advForm.addCheckBox( UNPACK, "(Unpacks the databinding classes)" );

    advForm.addTextField( SERVICE_NAME, "the service name to be code generated", XForm.FieldType.TEXT );
    advForm.addTextField( PORT_NAME, "the port name to be code generated", XForm.FieldType.TEXT );

    advForm.addComponent( NAMESPACE_MAPPING, new NamespaceTable( ( WsdlInterface )modelItem ) );

    XFormField adbWrapCB = advForm.addCheckBox( ADB_WRAP,
        "(Sets the packing flag. if true the classes will be packed.)" );
    XFormField adbWriteCB = advForm.addCheckBox( ADB_WRITE,
        "(Sets the write flag. If set to true the classes will be written by ADB)" );
    XFormTextField jibxCB = advForm.addTextField( JIBX_BINDING_FILE, "The JIBX binding file to use",
        XForm.FieldType.PROJECT_FILE );
    dbComboBox.addComponentEnabler( adbWrapCB, "adb" );
    dbComboBox.addComponentEnabler( adbWriteCB, "adb" );
View Full Code Here

Examples of com.eviware.x.form.XFormField

    dialog.setValue( SecurityTabForm.SSLTUNNEL_KEYSTOREPATH,
        settings.getString( SecurityTabForm.SSLTUNNEL_KEYSTOREPATH, "" ) );
    dialog.setValue( SecurityTabForm.SSLTUNNEL_KEYSTOREPASSWORD,
        settings.getString( SecurityTabForm.SSLTUNNEL_KEYSTOREPASSWORD, "" ) );

    XFormField sslOrHttp = dialog.getFormField( LaunchForm.SSLORHTTP );
    sslOrHttp.setValue( HTTP_PROXY );
    setDialogState( HTTP_PROXY );
    sslOrHttp.addFormFieldListener( new XFormFieldListener()
    {

      public void valueChanged( XFormField sourceField, String newValue, String oldValue )
      {
        setDialogState( newValue );
View Full Code Here

Examples of com.eviware.x.form.XFormField

    addWSDLFields( mainForm, modelItem );

    mainForm.addTextField( OUTPUT, "Root directory for all emitted files.", XForm.FieldType.PROJECT_FOLDER );
    mainForm.addTextField( PACKAGE, "Package for generated classes", XForm.FieldType.JAVA_PACKAGE ).setRequired(
        true, "Package is required" );
    XFormField bindingCombo = mainForm.addComboBox( BINDING, new String[] { "jaxb", "xmlbeans" },
        "Binding framework to use" );

    XFormTextField cpField = mainForm.addTextField( CLASSPATH, "Classpath to generated xmlbeans for binding",
        XForm.FieldType.PROJECT_FILE );
    XFormTextField extBindingsField = mainForm.addTextField( EXTERNAL_BINDINGS, "External jaxb binding file(s)",
        XForm.FieldType.PROJECT_FILE );
    bindingCombo.addComponentEnabler( cpField, "xmlbeans" );
    bindingCombo.addComponentEnabler( extBindingsField, "jaxb" );

    mainForm.addTextField( PROFILE, "Profile to use for generating artifacts", XForm.FieldType.TEXT );
    mainForm.addTextField( BASE_URI, "Base URI to use", XForm.FieldType.URL );
    mainForm.addCheckBox( OVERWRITE, null );
    mainForm.addCheckBox( EXPLICIT_ANNOTATION, null );
View Full Code Here

Examples of com.eviware.x.form.XFormField

  public XFormField getFormField( String name )
  {
    for( XForm form : forms )
    {
      XFormField formField = form.getFormField( name );
      if( formField != null )
        return formField;
    }

    return null;
View Full Code Here

Examples of com.eviware.x.form.XFormField

  public XFormField getFormField( String name )
  {
    for( XForm form : forms )
    {
      XFormField formField = form.getFormField( name );
      if( formField != null )
        return formField;
    }

    return null;
View Full Code Here

Examples of com.eviware.x.form.XFormField

    }
  }

  public void setComponentValue( String label, String value )
  {
    XFormField component = getComponent( label );
    if( component != null )
      component.setValue( value );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormField

      component.setValue( value );
  }

  public String getComponentValue( String name )
  {
    XFormField component = getComponent( name );
    return component == null ? null : component.getValue();
  }
View Full Code Here

Examples of com.eviware.x.form.XFormField

    }
  }

  public Object[] getOptions( String name )
  {
    XFormField combo = getComponent( name );
    if( combo instanceof XFormOptionsField )
      return ( ( XFormOptionsField )combo ).getOptions();

    return null;
  }
View Full Code Here

Examples of com.eviware.x.form.XFormField

      dialog.getFormField( MockAsWarDialog.WAR_DIRECTORY ).addFormFieldValidator(
          new RequiredValidator( "WAR Directory is required" ) );
    }

    XFormField settingFile = dialog.getFormField( MockAsWarDialog.SETTINGS_FILE );
    settingFile.setValue( ( ( DefaultSoapUICore )SoapUI.getSoapUICore() ).getSettingsFile() );
    settingFile.setEnabled( dialog.getBooleanValue( MockAsWarDialog.GLOBAL_SETTINGS ) );

    XFormField warDirectory = dialog.getFormField( MockAsWarDialog.WAR_DIRECTORY );
    XFormField warFile = dialog.getFormField( MockAsWarDialog.WAR_FILE );

    String passwordForEncryption = project.getSettings().getString( ProjectSettings.SHADOW_PASSWORD, null );
    project.getSettings().setString( ProjectSettings.SHADOW_PASSWORD, null );

    if( dialog.show() )
    {
      project.beforeSave();
      try
      {
        project.save();
      }
      catch( IOException e )
      {
        log.error( e.getMessage(), e );
      }
      finally
      {
        project.getSettings().setString( ProjectSettings.SHADOW_PASSWORD, passwordForEncryption );
      }

      MockAsWar mockAsWar = new MockAsWar( project.getPath(),
          dialog.getBooleanValue( MockAsWarDialog.GLOBAL_SETTINGS ) ? settingFile.getValue() : "",
          warDirectory.getValue(), warFile.getValue(), dialog.getBooleanValue( MockAsWarDialog.EXT_LIBS ),
          dialog.getBooleanValue( MockAsWarDialog.ACTIONS ), dialog.getBooleanValue( MockAsWarDialog.LISTENERS ),
          dialog.getValue( MockAsWarDialog.MOCKSERVICE_ENDPOINT ),
          dialog.getBooleanValue( MockAsWarDialog.ENABLE_WEBUI ) );
      mockAsWar.createMockAsWarArchive();
    }
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.