Package org.eclipse.jst.pagedesigner.ui.dialogfields

Examples of org.eclipse.jst.pagedesigner.ui.dialogfields.ContextableResourceButtonDialogField


     
      String sep = null;
      if (seperator != null)
        sep = TraitValueHelper.getValueAsString(seperator);
   
      ContextableResourceButtonDialogField field = new ContextableResourceButtonDialogField();
      field.setLabelText(attr.getLabel());
      if (fileExts != null) {
        field.setSuffixs(fileExts);
      }
     
      if (sep != null) {
        field.setSeparator(sep);
      }
     
      if ("".equalsIgnoreCase(field.getSeparator())) { //$NON-NLS-1$
        field.setResourceDescription(ResourceBoundle
            .getString("FileCellEditor.Msg")); //$NON-NLS-1$
      } else {
        field.setResourceDescription(ResourceBoundle
            .getString("FileCellEditor.Msg1")); //$NON-NLS-1$
      }
      field.setWebPath(IAttributeRuntimeValueType.WEBPATH.equals(type));
      field.setRequired(attr.isRequired());
      field.setToolTip(attr.getDescription());
      return field;

    } else if (IAttributeRuntimeValueType.CLASSPATH_RESOURCE.equals(type) ||
        IAttributeRuntimeValueType.RESOURCEBUNDLE.equals(type)) {
      ClasspathResourceButtonDialogField field = new ClasspathResourceButtonDialogField();
      field.setRequired(attr.isRequired());
      field.setToolTip(attr.getDescription());
      field.setLabelText(attr.getLabel());
      return field;
    } else if (IAttributeRuntimeValueType.CSSSTYLE.equalsIgnoreCase(type)) {
//      String param = getParamterValue(attr, "style");
//      if (!"STYLE".equalsIgnoreCase(param)) {
//        return null;
//      }
      StyleButtonDialogField field = new StyleButtonDialogField();
      field.setRequired(attr.isRequired());
      field.setToolTip(attr.getDescription());
      field.setLabelText(attr.getLabel());
      return field;
   
//    // if there is no type or type unknown, then we just return null. and
//    // system will
//    // create default (text cell editor).
    } else if (pvs != null && pvs.getPossibleValues().size() > 0) {
      MDEnabledComboDialogField field = new MDEnabledComboDialogField(SWT.None);
      field.setLabelText(attr.getLabel());
      field.setToolTip(attr.getDescription());
      field.setRequired(attr.isRequired());
      return field;
    }
    return null;
  }
View Full Code Here


     
      String sep = null;
      if (seperator != null)
        sep = TraitValueHelper.getValueAsString(seperator);
   
      ContextableResourceButtonDialogField field = new ContextableResourceButtonDialogField();
      field.setLabelText(attr.getLabel());
      if (fileExts != null) {
        field.setSuffixs(fileExts);
      }
     
      if (sep != null) {
        field.setSeparator(sep);
      }
     
      if ("".equalsIgnoreCase(field.getSeparator())) { //$NON-NLS-1$
        field.setResourceDescription(ResourceBoundle
            .getString("FileCellEditor.Msg")); //$NON-NLS-1$
      } else {
        field.setResourceDescription(ResourceBoundle
            .getString("FileCellEditor.Msg1")); //$NON-NLS-1$
      }
      field.setWebPath(IAttributeRuntimeValueType.WEBPATH.equals(type));
      field.setRequired(attr.isRequired());
      field.setToolTip(attr.getDescription());
      return field;

    } else if (IAttributeRuntimeValueType.CLASSPATH_RESOURCE.equals(type) ||
        IAttributeRuntimeValueType.RESOURCEBUNDLE.equals(type)) {
      ClasspathResourceButtonDialogField field = new ClasspathResourceButtonDialogField();
      field.setRequired(attr.isRequired());
      field.setToolTip(attr.getDescription());
      field.setLabelText(attr.getLabel());
      return field;
    } else if (IAttributeRuntimeValueType.CSSSTYLE.equalsIgnoreCase(type)) {
//      String param = getParamterValue(attr, "style");
//      if (!"STYLE".equalsIgnoreCase(param)) {
//        return null;
//      }
      StyleButtonDialogField field = new StyleButtonDialogField();
      field.setRequired(attr.isRequired());
      field.setToolTip(attr.getDescription());
      field.setLabelText(attr.getLabel());
      return field;
   
//    // if there is no type or type unknown, then we just return null. and
//    // system will
//    // create default (text cell editor).
    } else if (pvs != null && pvs.getPossibleValues().size() > 0) {
      MDEnabledComboDialogField field = new MDEnabledComboDialogField(SWT.None);
      field.setLabelText(attr.getLabel());
      field.setToolTip(attr.getDescription());
      field.setRequired(attr.isRequired());
      return field;
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.ui.dialogfields.ContextableResourceButtonDialogField

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.