EGF Engine
Release 0.1.0

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

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
                      extended by org.eclipse.egf.common.ui.field.ContextElementFieldEditor
All Implemented Interfaces:
org.eclipse.egf.common.ui.toolkit.fields.IFieldEditor

public class ContextElementFieldEditor
extends JavaClassFieldEditor

Implements a field editor that allows the end-user to enter a context element value.


Field Summary
 
Fields inherited from class org.eclipse.egf.common.ui.toolkit.adapters.StringButtonFieldEditorAdapter
_labelStyle, _valueStyle
 
Constructor Summary
ContextElementFieldEditor(String title_p, String openTypeDialogTitle_p, Composite parent_p, Class<?> classTypeFilter_p)
          Constructor.
 
Method Summary
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 setDialogToOpen(SelectionDialog dialogToOpen_p)
          Set the dialog to open.
 void setSelectionHandler(ISelectionHandler handler_p)
          Set the selection handler to handle selected object from the selection dialog.
 
Methods inherited from class org.eclipse.egf.common.ui.field.JavaClassFieldEditor
addListeners, createDialog, setClassTypeFilter
 
Methods inherited from class org.eclipse.egf.common.ui.field.ValidatingStringButtonFieldEditor
changePressed, getDialogToOpen, isValid
 
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

ContextElementFieldEditor

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

Parameters:
title_p -
openTypeDialogTitle_p -
parent_p -
classTypeFilter_p -
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 JavaClassFieldEditor
Returns:
a not null String.
See Also:
JavaClassFieldEditor.handleSelection(java.lang.Object)

setDialogToOpen

public void setDialogToOpen(SelectionDialog dialogToOpen_p)
Description copied from class: ValidatingStringButtonFieldEditor
Set the dialog to open.

Overrides:
setDialogToOpen in class ValidatingStringButtonFieldEditor
See Also:
org.eclipse.egf.common.ui.field.ValidatingStringButtonFieldEditor#setDialogToOpen(org.eclipse.ui.dialogs.SelectionDialog)

setSelectionHandler

public void setSelectionHandler(ISelectionHandler handler_p)
Set the selection handler to handle selected object from the selection dialog.

Parameters:
handler_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.