org.eclipse.emf.ecoretools.tabbedproperties.sections
Class AbstractFileChooserPropertySection

java.lang.Object
  extended by org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
      extended by org.eclipse.emf.ecoretools.tabbedproperties.sections.AbstractTabbedPropertySection
          extended by org.eclipse.emf.ecoretools.tabbedproperties.sections.AbstractFileChooserPropertySection
All Implemented Interfaces:
org.eclipse.ui.views.properties.tabbed.ISection

public abstract class AbstractFileChooserPropertySection
extends AbstractTabbedPropertySection

An abstract implementation of a section with a field using a FileChooser composite (TextField with a browse Button).
creation : 3 avr. 07


Field Summary
 
Fields inherited from class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
STANDARD_LABEL_WIDTH
 
Constructor Summary
AbstractFileChooserPropertySection()
           
 
Method Summary
 boolean cannotBeBlank()
           
 void createControls(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage aTabbedPropertySheetPage)
           
protected  void createWidgets(org.eclipse.swt.widgets.Composite composite)
          Section widgets should be created inside this method.
protected abstract  java.lang.String getFeatureValue()
          Get the current feature value of the selected model object.
protected  FileChooser getFileChooser()
           
protected  void handleTextModified()
          Handle the combo modified event.
protected  void hookListeners()
          Adds the listeners on the widgets
 boolean isCheckFileExistence()
           
protected  boolean isRefreshing()
           
 void refresh()
           
protected  void setSectionData(org.eclipse.swt.widgets.Composite composite)
          This method should be implemented to set layout data to the widgets created at AbstractTabbedPropertySection.createWidgets(Composite).
protected  java.util.List<org.eclipse.core.runtime.IStatus> verifyFile()
          Handler called to verify the file path on user text modification.
 
Methods inherited from class org.eclipse.emf.ecoretools.tabbedproperties.sections.AbstractTabbedPropertySection
aboutToBeHidden, aboutToBeShown, adaptToEObject, addListener, clearDecorators, createCommand, getActivePage, getEditingDomain, getEObject, getEObjectList, getFeature, getLabelText, getMainComposite, getMessageManager, getModelListener, getSectionComposite, getStandardLabelWidth, getStatusLineManager, handleModelChanged, isReadOnly, makeContributions, removeListener, setDecorator, setErrorDecorator, setErrorMessage, setInfoDecorator, setInput, setMessage, setWarningDecorator
 
Methods inherited from class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
dispose, getMinimumHeight, getPart, getSelection, getWidgetFactory, shouldUseExtraSpace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFileChooserPropertySection

public AbstractFileChooserPropertySection()
Method Detail

createControls

public void createControls(org.eclipse.swt.widgets.Composite parent,
                           org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage aTabbedPropertySheetPage)
Specified by:
createControls in interface org.eclipse.ui.views.properties.tabbed.ISection
Overrides:
createControls in class AbstractTabbedPropertySection
See Also:
ISection.createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)

createWidgets

protected void createWidgets(org.eclipse.swt.widgets.Composite composite)
Description copied from class: AbstractTabbedPropertySection
Section widgets should be created inside this method. To set the layout data please implement the AbstractTabbedPropertySection.setSectionData(Composite) If widgets has listeners implement the AbstractTabbedPropertySection.hookListeners().

Overrides:
createWidgets in class AbstractTabbedPropertySection
Parameters:
composite - the parent Composite
See Also:
AbstractTabbedPropertySection.createWidgets(org.eclipse.swt.widgets.Composite)

setSectionData

protected void setSectionData(org.eclipse.swt.widgets.Composite composite)
Description copied from class: AbstractTabbedPropertySection
This method should be implemented to set layout data to the widgets created at AbstractTabbedPropertySection.createWidgets(Composite). This improves visibility

Overrides:
setSectionData in class AbstractTabbedPropertySection
Parameters:
composite - Sometimes widgets will be set formDatas and position will depend on parent composite.
See Also:
AbstractTabbedPropertySection.setSectionData(org.eclipse.swt.widgets.Composite)

hookListeners

protected void hookListeners()
Adds the listeners on the widgets

Overrides:
hookListeners in class AbstractTabbedPropertySection

handleTextModified

protected void handleTextModified()
Handle the combo modified event.


refresh

public void refresh()
Specified by:
refresh in interface org.eclipse.ui.views.properties.tabbed.ISection
Overrides:
refresh in class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
See Also:
ISection.refresh()

getFileChooser

protected FileChooser getFileChooser()
Returns:
the FileChooser

isRefreshing

protected boolean isRefreshing()
Returns:
the isRefreshing

verifyFile

protected java.util.List<org.eclipse.core.runtime.IStatus> verifyFile()
Handler called to verify the file path on user text modification. By default it checks the file existence is the property checkFileExistence is set to true

Returns:
true is the file matches

isCheckFileExistence

public boolean isCheckFileExistence()
Returns:
true if the file must exist in the file system

cannotBeBlank

public boolean cannotBeBlank()
Returns:
true if the field is compulsory

getFeatureValue

protected abstract java.lang.String getFeatureValue()
Get the current feature value of the selected model object.

Returns:
the feature value to select in the ccombo.

Copyright 2007 Anyware Technologies.
All Rights Reserved.