## org.eclipse.emf.ecoretools.tabbedproperties.sections
Class AbstractTabbedPropertySection

    java.lang.Object
      org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
          org.eclipse.emf.ecoretools.tabbedproperties.sections.AbstractTabbedPropertySection

All Implemented Interfaces:
  org.eclipse.ui.views.properties.tabbed.ISection

Direct Known Subclasses:
  AbstractBooleanPropertySection, AbstractChooserPropertySection, AbstractCollectionPropertySection, AbstractColorPropertySection, AbstractDetailedObjectPropertySection, AbstractEnumerationPropertySection, AbstractFileChooserPropertySection, AbstractFontPropertySection, AbstractListPropertySection, AbstractTextPropertySection

    public abstract class AbstractTabbedPropertySection

extends org.eclipse.ui.views.properties.tabbed.AbstractPropertySection

An abstract implementation of a section in a tab in the tabbed property sheet page for a tree editor. Clients specializing this class may implement the create widgets, setFormData and hooklisteners rather than overriding the create controls. Creation 5 avr. 2006

Field Summary

Fields inherited from class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
`STANDARD_LABEL_WIDTH`

Constructor Summary
`AbstractTabbedPropertySection()`

Method Summary
`void` `aboutToBeHidden()`
`void` `aboutToBeShown()`
`protected org.eclipse.emf.ecore.EObject` `adaptToEObject(java.lang.Object object)` Adapt the given object into an EObject
`protected void` `addListener()` Adds a model listener to this object
`protected void` `clearDecorators()` Clear existing decorators
`protected void` `createCommand(java.lang.Object oldValue, java.lang.Object newValue)` Manages a self-contained set of interrelated EMF models and the `Command`s that modify them.
`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.
`org.eclipse.ui.IWorkbenchPage` `getActivePage()` Obtains the currently active workbench page.
`protected org.eclipse.emf.edit.domain.EditingDomain` `getEditingDomain()` This returns the editing domain as required by the `IEditingDomainProvider` interface.
`protected org.eclipse.emf.ecore.EObject` `getEObject()`
`protected java.util.List<org.eclipse.emf.ecore.EObject>` `getEObjectList()`
`protected abstract org.eclipse.emf.ecore.EStructuralFeature` `getFeature()` Get the feature for the combo field for the section.
`protected abstract java.lang.String` `getLabelText()` Get the label for the text field for the section.
`protected org.eclipse.swt.widgets.Composite` `getMainComposite(org.eclipse.swt.widgets.Composite parent)` Build the main composite for this section
`protected org.eclipse.emf.ecoretools.tabbedproperties.internal.utils.MessageManager` `getMessageManager()`
`protected org.eclipse.emf.common.notify.Adapter` `getModelListener()` Returns the generic model listener
`protected org.eclipse.swt.widgets.Composite` `getSectionComposite()`
`protected int` `getStandardLabelWidth(org.eclipse.swt.widgets.Composite parent, java.lang.String[] labels)` Get the standard label width when labels for sections line up on the left hand side of the composite.
`protected org.eclipse.jface.action.IStatusLineManager` `getStatusLineManager()`
`protected void` `handleModelChanged(org.eclipse.emf.common.notify.Notification msg)` This method is called when an event occurred on the model objects
`protected void` `hookListeners()` Widgets created at `createWidgets(Composite)` may listen platform events.
`protected boolean` `isReadOnly()` This returns whether the resource is read only in editing domain.
`void` `makeContributions(org.eclipse.jface.action.IMenuManager menuManager, org.eclipse.jface.action.IToolBarManager toolBarManager, org.eclipse.jface.action.IStatusLineManager statLineManager)` Sets the manager this view will use
`protected void` `removeListener()` Removes the model listener to this object
`protected void` `setDecorator(org.eclipse.swt.widgets.Control control, java.lang.String message, int type)`
`protected void` `setErrorDecorator(org.eclipse.swt.widgets.Control control, java.lang.String message)` Add a decorator to the given control.
`protected void` `setErrorMessage(java.lang.String errorMessage)` Sets the error message to be displayed in the status line.
`protected void` `setInfoDecorator(org.eclipse.swt.widgets.Control control, java.lang.String message)` Add a decorator to the given control.
`void` `setInput(org.eclipse.ui.IWorkbenchPart part, org.eclipse.jface.viewers.ISelection selection)`
`protected void` `setMessage(java.lang.String message)` Sets the message to be displayed in the status line.
`protected void` `setSectionData(org.eclipse.swt.widgets.Composite composite)` This method should be implemented to set layout data to the widgets created at `createWidgets(Composite)`.
`protected void` `setWarningDecorator(org.eclipse.swt.widgets.Control control, java.lang.String message)` Add a decorator to the given control.

Methods inherited from class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
`dispose, getMinimumHeight, getPart, getSelection, getWidgetFactory, refresh, shouldUseExtraSpace`

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

Constructor Detail

### AbstractTabbedPropertySection

    public AbstractTabbedPropertySection()

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 `org.eclipse.ui.views.properties.tabbed.AbstractPropertySection`
  See Also:
    `ISection.createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)`

### setInput

    public void setInput(org.eclipse.ui.IWorkbenchPart part,
                         org.eclipse.jface.viewers.ISelection selection)

  Specified by:
    `setInput` in interface `org.eclipse.ui.views.properties.tabbed.ISection`
  Overrides:
    `setInput` in class `org.eclipse.ui.views.properties.tabbed.AbstractPropertySection`
  See Also:
    `ISection.setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)`

### adaptToEObject

    protected org.eclipse.emf.ecore.EObject adaptToEObject(java.lang.Object object)

  Adapt the given object into an EObject

  Parameters:
    `object` - the object to adapt
  Returns:
    the adapted object

### aboutToBeHidden

    public void aboutToBeHidden()

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

### aboutToBeShown

    public void aboutToBeShown()

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

### makeContributions

    public void makeContributions(org.eclipse.jface.action.IMenuManager menuManager,
                                  org.eclipse.jface.action.IToolBarManager toolBarManager,
                                  org.eclipse.jface.action.IStatusLineManager statLineManager)

  Sets the manager this view will use

  Parameters:
    `toolBarManager` - the toolBarManager to display buttons on the toolBar
    `menuManager` - the Menu manager to display menus
    `statLineManager` - the status line manager to show messages

### getActivePage

    public org.eclipse.ui.IWorkbenchPage getActivePage()

  Obtains the currently active workbench page.

  Returns:
    the active page, or `null` if none is active

### getSectionComposite

    protected org.eclipse.swt.widgets.Composite getSectionComposite()

  Returns:
    the section Composite

### getMainComposite

    protected org.eclipse.swt.widgets.Composite getMainComposite(org.eclipse.swt.widgets.Composite parent)

  Build the main composite for this section

  Parameters:
    `parent` - The Section
  Returns:
    The main composite for this section

### isReadOnly

    protected boolean isReadOnly()

  This returns whether the resource is read only in editing domain.

  Returns:
    `false` when the file can be written.

### setErrorMessage

    protected void setErrorMessage(java.lang.String errorMessage)

  Sets the error message to be displayed in the status line.

  Parameters:
    `errorMessage` - the message to be displayed, or `null`

### setMessage

    protected void setMessage(java.lang.String message)

  Sets the message to be displayed in the status line. This message is displayed when there is no error message.

  Parameters:
    `message` - the message to be displayed, or `null`

### removeListener

    protected void removeListener()

  Removes the model listener to this object

### addListener

    protected void addListener()

  Adds a model listener to this object

### getStandardLabelWidth

    protected int getStandardLabelWidth(org.eclipse.swt.widgets.Composite parent,
                                        java.lang.String[] labels)

  Get the standard label width when labels for sections line up on the left hand side of the composite. We line up to a fixed position, but if a string is wider than the fixed position, then we use that widest string.

  Parameters:
    `parent` - The parent composite used to create a GC.
    `labels` - The list of labels.
  Returns:
    the standard label width.

### getEditingDomain

    protected org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()

  This returns the editing domain as required by the `IEditingDomainProvider` interface. This is important for implementing the static methods of `AdapterFactoryEditingDomain` and for supporting `CommandAction`.

  Returns:
    The required editing domain
  Throws:
    `java.lang.IllegalArgumentException` - There is an error when the part cannot be adapted in any EditingDomain.

### createCommand

    protected void createCommand(java.lang.Object oldValue,
                                 java.lang.Object newValue)

  Manages a self-contained set of interrelated EMF models and the `Command`s that modify them. The models are maintained in the form of a `ResourceSet`. Commands that modify the model are typically created through the domain and are executed using the `CommandStack`.

  Parameters:
    `oldValue` - The previous property value
    `newValue` - The new value to set

### getEObject

    protected org.eclipse.emf.ecore.EObject getEObject()

  Returns:
    the eObject

### getEObjectList

    protected java.util.List<org.eclipse.emf.ecore.EObject> getEObjectList()

  Returns:
    the eObjectList

### getStatusLineManager

    protected org.eclipse.jface.action.IStatusLineManager getStatusLineManager()

  Returns:
    the statusLineManager

### getMessageManager

    protected org.eclipse.emf.ecoretools.tabbedproperties.internal.utils.MessageManager getMessageManager()

  Returns:
    the message manager to which decorates fields

### setDecorator

    protected void setDecorator(org.eclipse.swt.widgets.Control control,
                                java.lang.String message,
                                int type)

  Parameters:
    `control` - the Control
    `message` - a String
    `type` - the type

### setErrorDecorator

    protected void setErrorDecorator(org.eclipse.swt.widgets.Control control,
                                     java.lang.String message)

  Add a decorator to the given control. A tool tip will display the given message

  Parameters:
    `control` -
    `message` -
  Since:
    1.0 M3

### setWarningDecorator

    protected void setWarningDecorator(org.eclipse.swt.widgets.Control control,
                                       java.lang.String message)

  Add a decorator to the given control. A tool tip will display the given message

  Parameters:
    `control` -
    `message` -
  Since:
    1.0 M3

### setInfoDecorator

    protected void setInfoDecorator(org.eclipse.swt.widgets.Control control,
                                    java.lang.String message)

  Add a decorator to the given control. A tool tip will display the given message

  Parameters:
    `control` -
    `message` -
  Since:
    1.0 M3

### clearDecorators

    protected void clearDecorators()

  Clear existing decorators

  Since:
    1.0 M3

### getModelListener

    protected org.eclipse.emf.common.notify.Adapter getModelListener()

  Returns the generic model listener

  Returns:
    the model listener

### handleModelChanged

    protected void handleModelChanged(org.eclipse.emf.common.notify.Notification msg)

  This method is called when an event occurred on the model objects

  Parameters:
    `msg` - the event notification

### getFeature

    protected abstract org.eclipse.emf.ecore.EStructuralFeature getFeature()

  Get the feature for the combo field for the section.

  Returns:
    the feature for the text.

### getLabelText

    protected abstract java.lang.String getLabelText()

  Get the label for the text field for the section.

  Returns:
    the label for the text field.

### createWidgets

    protected void createWidgets(org.eclipse.swt.widgets.Composite composite)

  Section widgets should be created inside this method. To set the layout data please implement the `setSectionData(Composite)` If widgets has listeners implement the `hookListeners()`.

  Parameters:
    `composite` - the parent Composite
  See Also:
    `createControls(Composite, TabbedPropertySheetPage)`

### setSectionData

    protected void setSectionData(org.eclipse.swt.widgets.Composite composite)

  This method should be implemented to set layout data to the widgets created at `createWidgets(Composite)`. This improves visibility

  Parameters:
    `composite` - Sometimes widgets will be set formDatas and position will depend on parent composite.

### hookListeners

    protected void hookListeners()

  Widgets created at `createWidgets(Composite)` may listen platform events. Set them here in order to improve visibility

Copyright 2007 Anyware Technologies. All Rights Reserved.