## org.eclipse.emf.ecoretools.tabbedproperties.sections.widgets
Class FileChooser

    java.lang.Object
      org.eclipse.swt.widgets.Widget
          org.eclipse.swt.widgets.Control
              org.eclipse.swt.widgets.Scrollable
                  org.eclipse.swt.widgets.Composite
                      org.eclipse.emf.ecoretools.tabbedproperties.sections.widgets.FileChooser

All Implemented Interfaces:
  org.eclipse.swt.graphics.Drawable

    public class FileChooser

extends org.eclipse.swt.widgets.Composite

A field widget and a Button that allow you to retrieve an a file path from the filesystem
Creation : 3 avr. 07

Field Summary

Fields inherited from class org.eclipse.swt.widgets.Composite
`embeddedHandle`

Fields inherited from class org.eclipse.swt.widgets.Widget
`handle`

Constructor Summary
`FileChooser(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory factory, int style)` Constructor

Method Summary
`void` `addModifyListener(org.eclipse.swt.events.ModifyListener listener)` Add a SelectionListener on the Button
`protected void` `createContents(org.eclipse.swt.widgets.Composite parent)` Creates the UI.
`protected java.lang.String[]` `getFilterExtensions()` Set the file extensions which the dialog will use to filter the files it shows to the argument, which may be null.
`protected int` `getNumberOfColumns()` Returns the number of columns in this composite.
`java.lang.String` `getSelection()` Returns the selected object
`protected org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory` `getWidgetFactory()`
`protected void` `hookListeners()` Adds the listeners on the choose button.
`void` `removeModifyListener(org.eclipse.swt.events.SelectionListener listener)` Remove the SelectionListener of the CCombo and the Button
`void` `setChangeable(boolean isChangeable)` Set whether the Choose button is enabled
`void` `setEditable(boolean isEditable)` Sets the editable state of the text field.
`protected void` `setFilterExtensions(java.lang.String[] filterExtensions)`
`void` `setSelection(java.lang.String selection)` Set the selection of the comboViewer
`void` `setSelection(java.lang.String selection, boolean updateField)` Set the selection of the FileChooser
`void` `setStatus(java.util.List<org.eclipse.core.runtime.IStatus> statusList)` Set widget status

Methods inherited from class org.eclipse.swt.widgets.Composite
`changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList`

Methods inherited from class org.eclipse.swt.widgets.Scrollable
`computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar`

Methods inherited from class org.eclipse.swt.widgets.Control

`addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getData, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update`

Methods inherited from class org.eclipse.swt.widgets.Widget
`addDisposeListener, addListener, checkWidget, dispose, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### FileChooser

    public FileChooser(org.eclipse.swt.widgets.Composite parent,
                       org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory factory,
                       int style)

  Constructor

  Parameters:
    `parent` - the parent Composite
    `factory` - the factory necessary to create the widget
    `style` -

Method Detail

### createContents

    protected void createContents(org.eclipse.swt.widgets.Composite parent)

  Creates the UI. User must call the super method to create the main widgets (buttons) to this composite.

  Parameters:
    `parent` - this widget

### getNumberOfColumns

    protected int getNumberOfColumns()

  Returns the number of columns in this composite. The default object is 2 because the main composite have 2 widgets. Returning a number less than 2 will be ingnored.

  Returns:
    The number of columns to set in this composite. It must be greater or equals than 2

### hookListeners

    protected void hookListeners()

  Adds the listeners on the choose button. If user overrides this method, he must call the super method to add the corresponding selection listener, otherwise disfunctions may occur

### setEditable

    public void setEditable(boolean isEditable)

  Sets the editable state of the text field. The default value is READ-ONLY. However clients may set this value as true by calling this method

  Parameters:
    `isEditable` -

### setChangeable

    public void setChangeable(boolean isChangeable)

  Set whether the Choose button is enabled

  Parameters:
    `isChangeable` -

### getSelection

    public java.lang.String getSelection()

  Returns the selected object

  Returns:
    the selection

### setSelection

    public void setSelection(java.lang.String selection)

  Set the selection of the comboViewer

  Parameters:
    `selection` - the selected object

### setSelection

    public void setSelection(java.lang.String selection,
                             boolean updateField)

  Set the selection of the FileChooser

  Parameters:
    `selection` -
    `updateField` - boolean update text field if true

### addModifyListener

    public void addModifyListener(org.eclipse.swt.events.ModifyListener listener)

  Add a SelectionListener on the Button

  Parameters:
    `listener` -

### removeModifyListener

    public void removeModifyListener(org.eclipse.swt.events.SelectionListener listener)

  Remove the SelectionListener of the CCombo and the Button

  Parameters:
    `listener` -

### getWidgetFactory

    protected org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory getWidgetFactory()

  Returns:
    the widgetFactory

### getFilterExtensions

    protected java.lang.String[] getFilterExtensions()

  Set the file extensions which the dialog will use to filter the files it shows to the argument, which may be null.

  The strings are platform specific. For example, on Windows, an extension filter string is typically of the form "*.extension", where "*.*" matches all files.

  Returns:
    String[]
  See Also:
    `to specify the user-friendly names corresponding to the extensions`

### setFilterExtensions

    protected void setFilterExtensions(java.lang.String[] filterExtensions)

  Parameters:
    `filterExtensions` - String[]

### setStatus

    public void setStatus(java.util.List<org.eclipse.core.runtime.IStatus> statusList)

  Set widget status

  Parameters:
    `statusList` -

Copyright 2007 Anyware Technologies. All Rights Reserved.