EGF Engine
Release 0.1.0

org.eclipse.egf.common.ui.field
Class JavaClassFieldEditor

java.lang.Object
  extended by StringButtonFieldEditor
      extended by org.eclipse.egf.common.ui.toolkit.adapters.StringButtonFieldEditorAdapter
          extended by org.eclipse.egf.common.ui.toolkit.fields.StringBrowserFieldEditor
              extended by org.eclipse.egf.common.ui.field.ValidatingStringButtonFieldEditor
                  extended by org.eclipse.egf.common.ui.field.JavaClassFieldEditor
All Implemented Interfaces:
org.eclipse.egf.common.ui.toolkit.fields.IFieldEditor
Direct Known Subclasses:
ContextElementFieldEditor

public class JavaClassFieldEditor
extends ValidatingStringButtonFieldEditor

Implements a field editor that allows the end-user to select a Java type.


Field Summary
 
Fields inherited from class org.eclipse.egf.common.ui.toolkit.adapters.StringButtonFieldEditorAdapter
_labelStyle, _valueStyle
 
Constructor Summary
JavaClassFieldEditor(String title_p, String openTypeDialogTitle_p, Composite parent_p, Class<?> classTypeFilter_p)
          Constructor.
 
Method Summary
protected  void addListeners()
          Add listeners on widgets contained by this field editor.
protected  SelectionDialog createDialog()
          Create an OpenTypeSelectionDialog
protected  String handleSelection(Object selectedObject_p)
          Offers a way to convert the end-user object selection into a string representation displayed in the text field editor.
 void setClassTypeFilter(Class<?> classTypeFilter_p)
          Set the class type filter used when opening the open type dialog.
 
Methods inherited from class org.eclipse.egf.common.ui.field.ValidatingStringButtonFieldEditor
changePressed, getDialogToOpen, isValid, setDialogToOpen
 
Methods inherited from class org.eclipse.egf.common.ui.toolkit.fields.StringBrowserFieldEditor
getChangeControl, getCurrentSelection, setCurrentSelection
 
Methods inherited from class org.eclipse.egf.common.ui.toolkit.adapters.StringButtonFieldEditorAdapter
checkState, checkValueStyle, createControl, defaultLayout, doCheckState, doFillIntoGrid, getFieldName, getFieldPage, getHelperControl, getLabel, getValidator, getValueControl, init, isFocused, isHelperEnabled, isValueEnabled, layout, setFieldPage, setFocus, setHelperEnabled, setValidator, setValueEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.egf.common.ui.toolkit.fields.IFieldEditor
getErrorMessage, isValid
 

Constructor Detail

JavaClassFieldEditor

public JavaClassFieldEditor(String title_p,
                            String openTypeDialogTitle_p,
                            Composite parent_p,
                            Class<?> classTypeFilter_p)
Constructor.

Parameters:
title_p - label of the text widget.
openTypeDialogTitle_p - label displayed in the open type dialog.
parent_p -
classTypeFilter_p - class type filter used to filter end-user class selection.
Method Detail

handleSelection

protected String handleSelection(Object selectedObject_p)
Description copied from class: ValidatingStringButtonFieldEditor
Offers a way to convert the end-user object selection into a string representation displayed in the text field editor.
This method is called when the end-user pressed "ok" to finish its selection.
Default behavior is to cast into a String given object selection.

Overrides:
handleSelection in class ValidatingStringButtonFieldEditor
Returns:
a not null String.
See Also:
ValidatingStringButtonFieldEditor.handleSelection(java.lang.Object)

createDialog

protected SelectionDialog createDialog()
Create an OpenTypeSelectionDialog

Overrides:
createDialog in class ValidatingStringButtonFieldEditor
Returns:
null if not implemented.
See Also:
ValidatingStringButtonFieldEditor.createDialog()

setClassTypeFilter

public void setClassTypeFilter(Class<?> classTypeFilter_p)
Set the class type filter used when opening the open type dialog.

Parameters:
classTypeFilter_p - the classTypeFilter to set

addListeners

protected void addListeners()
Add listeners on widgets contained by this field editor.


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.