EGF Engine
Release 0.1.0

org.eclipse.egf.common.ui.helper
Class FieldEditorHelper

java.lang.Object
  extended by org.eclipse.egf.common.ui.helper.FieldEditorHelper

public class FieldEditorHelper
extends Object

Helper to deal with field editors used in UI.


Constructor Summary
FieldEditorHelper()
           
 
Method Summary
static org.eclipse.egf.common.ui.toolkit.adapters.BooleanFieldEditorAdapter createCheckBoxFieldEditor(Composite parent_p, DialogPage page_p, String label_p, String labelTooltip_p, boolean initialValue_p, int horizintalIndent_p, int verticalIndent_p, boolean readOnly_p)
          Create a check box field editor.
static ContextElementFieldEditor createContextElementFieldEditor(Composite parent_p, DialogPage page_p, String title_p, String openTypeDialogTitle_p, ClassLoader classLoader_p, Bundle bundle_p, Class<?> classTypeFilter_p, boolean readOnly_p)
          Create a context element field editor.
static StyledText createDescriptionFieldEditor(Composite parent_p, String label_p, String tooltip_p, String initialText_p, int numColumns_p, IDocumentListener textModificationListener_p, boolean readOnly_p)
          Create the description field editor.
static DomainFieldEditor createDomainFieldEditor(Composite parent_p, String title_p, String openResourceDialogTitle_p, IContainer container_p, String filterExtension_p, boolean readOnly_p)
          Create a field editor that allows the end-user to select a domain file located in given container.
static Group createGroup(Composite parent_p, String label_p, int style_p, int numColumns_p)
          Create a group with given parameters.
static JavaClassFieldEditor createJavaClassFieldEditor(Composite parent_p, DialogPage page_p, String title_p, String openTypeDialogTitle_p, ClassLoader classLoader_p, Bundle bundle_p, Class<?> classTypeFilter_p, boolean readOnly_p)
          Create a Java class field editor.
static JavaScopeClassFieldEditor createJavaScopeClassFieldEditor(Composite parent_p, DialogPage page_p, String title_p, String openTypeDialogTitle_p, IJavaProject javaProject_p, Class<?> classTypeFilter_p, boolean readOnly_p)
          Create a Java class field editor.
static org.eclipse.egf.common.ui.toolkit.fields.CRadioGroupFieldEditor createRadioGroupFieldEditor(Composite parent_p, String title_p, int numColumns_p, String[][] labelAndValues_p, boolean readOnly_p)
          Create a radio group field editor.
static org.eclipse.egf.common.ui.toolkit.fields.ValidatingStringFieldEditor createStringFieldEditor(Composite parent_p, DialogPage page_p, String label_p, String labelTooltip_p, String textTooltip_p, int textLimit_p, org.eclipse.egf.common.ui.toolkit.validators.IValidator fieldEditorValidator_p, boolean readOnly_p)
          Create a string field editor for given parameters.
static WorkspaceFileFieldEditor createWorkspaceFileEditor(Composite parent_p, String title_p, String openResourceDialogTitle_p, IContainer container_p, String filterExtension_p, boolean readOnly_p)
          Create a field editor that allows the end-user to select a file located in given container.
static void layoutFieldEditor(Composite parent_p, FieldEditor fieldEditor_p, int numColumns_p)
          Layout given field editor on given number of columns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldEditorHelper

public FieldEditorHelper()
Method Detail

createDescriptionFieldEditor

public static StyledText createDescriptionFieldEditor(Composite parent_p,
                                                      String label_p,
                                                      String tooltip_p,
                                                      String initialText_p,
                                                      int numColumns_p,
                                                      IDocumentListener textModificationListener_p,
                                                      boolean readOnly_p)
Create the description field editor.

Parameters:
parent_p -
label_p -
tooltip_p - t
initialText_p -
numColumns_p -
textModificationListener_p - listener used to notify modification performed on description field content.

createCheckBoxFieldEditor

public static org.eclipse.egf.common.ui.toolkit.adapters.BooleanFieldEditorAdapter createCheckBoxFieldEditor(Composite parent_p,
                                                                                                             DialogPage page_p,
                                                                                                             String label_p,
                                                                                                             String labelTooltip_p,
                                                                                                             boolean initialValue_p,
                                                                                                             int horizintalIndent_p,
                                                                                                             int verticalIndent_p,
                                                                                                             boolean readOnly_p)
Create a check box field editor.

Parameters:
parent_p - parent_p of the underlying widgets.
page_p - the page where the created field editor is displayed.
label_p - label of the field editor.
labelTooltip_p - tooltip of the Label of the created field editor, provides information related to the field.
initialValue_p - initial value of the check box.
horizintalIndent_p -
verticalIndent_p -
Returns:

createGroup

public static Group createGroup(Composite parent_p,
                                String label_p,
                                int style_p,
                                int numColumns_p)
Create a group with given parameters.

Parameters:
parent_p -
label_p - label displayed by the widget (can be null).
style_p -
numColumns_p - value of the horizontal span
Returns:

createStringFieldEditor

public static org.eclipse.egf.common.ui.toolkit.fields.ValidatingStringFieldEditor createStringFieldEditor(Composite parent_p,
                                                                                                           DialogPage page_p,
                                                                                                           String label_p,
                                                                                                           String labelTooltip_p,
                                                                                                           String textTooltip_p,
                                                                                                           int textLimit_p,
                                                                                                           org.eclipse.egf.common.ui.toolkit.validators.IValidator fieldEditorValidator_p,
                                                                                                           boolean readOnly_p)
Create a string field editor for given parameters.

Parameters:
parent_p - parent_p of the underlying widgets.
page_p - the page where the created field editor is displayed.
label_p - label of the field editor.
labelTooltip_p - tooltip of the Label of the created field editor, provides information related to the field.
textTooltip_p - tooltip of the Text of the created field editor, used as an advisor to help the end-user to enter data that match the expected field format.
textLimit_p - the maximum number of characters that the field editor is capable of holding, SWT#DEFAULT means unlimited.
fieldEditorValidator_p - the field editor validator used when the editor check its state.
Returns:

createRadioGroupFieldEditor

public static org.eclipse.egf.common.ui.toolkit.fields.CRadioGroupFieldEditor createRadioGroupFieldEditor(Composite parent_p,
                                                                                                          String title_p,
                                                                                                          int numColumns_p,
                                                                                                          String[][] labelAndValues_p,
                                                                                                          boolean readOnly_p)
Create a radio group field editor.

Parameters:
parent_p -
page_p - the page where the created field editor is displayed.
title_p -
numColumns_p -
labelAndValues_p -
readOnly_p -
Returns:

createJavaScopeClassFieldEditor

public static JavaScopeClassFieldEditor createJavaScopeClassFieldEditor(Composite parent_p,
                                                                        DialogPage page_p,
                                                                        String title_p,
                                                                        String openTypeDialogTitle_p,
                                                                        IJavaProject javaProject_p,
                                                                        Class<?> classTypeFilter_p,
                                                                        boolean readOnly_p)
Create a Java class field editor.

Parameters:
parent_p -
page_p - the page where the created field editor is displayed.
title_p -
openTypeDialogTitle_p -
classLoader_p -
bundle_p -
classTypeFilter_p -
Returns:

createJavaClassFieldEditor

public static JavaClassFieldEditor createJavaClassFieldEditor(Composite parent_p,
                                                              DialogPage page_p,
                                                              String title_p,
                                                              String openTypeDialogTitle_p,
                                                              ClassLoader classLoader_p,
                                                              Bundle bundle_p,
                                                              Class<?> classTypeFilter_p,
                                                              boolean readOnly_p)
Create a Java class field editor.

Parameters:
parent_p -
page_p - the page where the created field editor is displayed.
title_p -
openTypeDialogTitle_p -
classLoader_p -
bundle_p -
classTypeFilter_p -
Returns:

createContextElementFieldEditor

public static ContextElementFieldEditor createContextElementFieldEditor(Composite parent_p,
                                                                        DialogPage page_p,
                                                                        String title_p,
                                                                        String openTypeDialogTitle_p,
                                                                        ClassLoader classLoader_p,
                                                                        Bundle bundle_p,
                                                                        Class<?> classTypeFilter_p,
                                                                        boolean readOnly_p)
Create a context element field editor.

Parameters:
parent_p -
page_p - the page where the created field editor is displayed.
title_p -
openTypeDialogTitle_p -
classLoader_p -
classTypeFilter_p -
Returns:

createWorkspaceFileEditor

public static WorkspaceFileFieldEditor createWorkspaceFileEditor(Composite parent_p,
                                                                 String title_p,
                                                                 String openResourceDialogTitle_p,
                                                                 IContainer container_p,
                                                                 String filterExtension_p,
                                                                 boolean readOnly_p)
Create a field editor that allows the end-user to select a file located in given container.

Parameters:
parent_p -
title_p -
openResourceDialogTitle_p -
container_p -
filterExtension_p -
Returns:

createDomainFieldEditor

public static DomainFieldEditor createDomainFieldEditor(Composite parent_p,
                                                        String title_p,
                                                        String openResourceDialogTitle_p,
                                                        IContainer container_p,
                                                        String filterExtension_p,
                                                        boolean readOnly_p)
Create a field editor that allows the end-user to select a domain file located in given container.

Parameters:
parent_p -
title_p -
openResourceDialogTitle_p -
container_p -
filterExtension_p -
Returns:

layoutFieldEditor

public static void layoutFieldEditor(Composite parent_p,
                                     FieldEditor fieldEditor_p,
                                     int numColumns_p)
Layout given field editor on given number of columns.

Parameters:
parent_p -
fieldEditor_p -
numColumns_p -

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.