EGF Engine
Release 0.1.0

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

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.WorkspaceFileFieldEditor
All Implemented Interfaces:
org.eclipse.egf.common.ui.toolkit.fields.IFieldEditor
Direct Known Subclasses:
DomainFieldEditor

public class WorkspaceFileFieldEditor
extends org.eclipse.egf.common.ui.toolkit.fields.StringBrowserFieldEditor

Implements a field editor that allows the end-user to select an IFile in the workspace.


Field Summary
 
Fields inherited from class org.eclipse.egf.common.ui.toolkit.adapters.StringButtonFieldEditorAdapter
_labelStyle, _valueStyle
 
Constructor Summary
WorkspaceFileFieldEditor(String title_p, String openResourceDialogTitle_p, Composite parent_p, IContainer container_p, String filterExtension_p)
          Constructor.
 
Method Summary
protected  String changePressed()
           
protected  String handleFilePath(IFile file_p)
          Allow to manage the content of the file path returned when the end-user has selected a resource.
 boolean isValid(boolean force_p)
          Checks whether the text input field contains a valid value or not.
 
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

WorkspaceFileFieldEditor

public WorkspaceFileFieldEditor(String title_p,
                                String openResourceDialogTitle_p,
                                Composite parent_p,
                                IContainer container_p,
                                String filterExtension_p)
Constructor.

Parameters:
title_p - label of the text widget.
openResourceDialogTitle_p - label displayed in the open resource dialog.
parent_p -
container_p - container used in open resource dialog.
filterExtension_p - file type filter (ie *.ecore).
Method Detail

changePressed

protected String changePressed()
Overrides:
changePressed in class org.eclipse.egf.common.ui.toolkit.fields.StringBrowserFieldEditor
See Also:
com.thalesgroup.mde.common.ui.toolkit.custom.CStringButtonFieldEditor#changePressed()

handleFilePath

protected String handleFilePath(IFile file_p)
Allow to manage the content of the file path returned when the end-user has selected a resource.
This implementation returns the full path of given file.

Parameters:
file_p -
Returns:

isValid

public boolean isValid(boolean force_p)
Checks whether the text input field contains a valid value or not.

Parameters:
force_p - true means force to compute the valid state again.
Returns:
true if the field value is valid, and false if invalid.

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.