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

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.AbstractDetailedObjectPropertySection
All Implemented Interfaces:
org.eclipse.ui.views.properties.tabbed.ISection

public abstract class AbstractDetailedObjectPropertySection
extends AbstractTabbedPropertySection

An abstract section used to create a model object inside the selected element. You can then, depending on the selected model object edit its properties through a detailed Composite which is dynamically updated. Creation 10 nov. 06


Field Summary
 
Fields inherited from class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
STANDARD_LABEL_WIDTH
 
Constructor Summary
AbstractDetailedObjectPropertySection()
           
 
Method Summary
 void aboutToBeHidden()
           
 void aboutToBeShown()
           
 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  org.eclipse.swt.widgets.Composite getDetailsComposite()
          This method should return the Composite that should be associated with the details Group
protected abstract  java.lang.String getFeatureAsText()
          Get the text value corresponding to the selected Constraint
 org.eclipse.swt.widgets.Group getGroupDetails()
          This method returns the groupDetails composite.
protected  org.eclipse.jface.viewers.ILabelProvider getLabelProvider()
          Get the LabelProvider to use to display the Constraint element
protected abstract  org.eclipse.emf.ecore.EObject getRelatedEObject()
          Return the model object associated with the section.
 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  void updateGroupContents()
          This method should be called when the contents of the groupDetails should be updated.
 
Methods inherited from class org.eclipse.emf.ecoretools.tabbedproperties.sections.AbstractTabbedPropertySection
adaptToEObject, addListener, clearDecorators, createCommand, getActivePage, getEditingDomain, getEObject, getEObjectList, getFeature, getLabelText, getMainComposite, getMessageManager, getModelListener, getSectionComposite, getStandardLabelWidth, getStatusLineManager, handleModelChanged, hookListeners, 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

AbstractDetailedObjectPropertySection

public AbstractDetailedObjectPropertySection()
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:
AbstractTabbedPropertySection.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)

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()

updateGroupContents

protected void updateGroupContents()
This method should be called when the contents of the groupDetails should be updated.


aboutToBeShown

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

aboutToBeHidden

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

getLabelProvider

protected org.eclipse.jface.viewers.ILabelProvider getLabelProvider()
Get the LabelProvider to use to display the Constraint element

Returns:
ILabelProvider

getGroupDetails

public org.eclipse.swt.widgets.Group getGroupDetails()
This method returns the groupDetails composite. Subclasses should used it to retrieve that composite and add the custom detailsComposite

Returns:
Group the Group Composite used to display details informations about the relatedEObject

getFeatureAsText

protected abstract java.lang.String getFeatureAsText()
Get the text value corresponding to the selected Constraint

Returns:
String

getRelatedEObject

protected abstract org.eclipse.emf.ecore.EObject getRelatedEObject()
Return the model object associated with the section. This is not the same model object returned by the getEObject() method, but this is generally an internal model object that can be edited.

Returns:
EObject model object

getDetailsComposite

protected abstract org.eclipse.swt.widgets.Composite getDetailsComposite()
This method should return the Composite that should be associated with the details Group

Returns:
the Composite used as children of the detailsGroup

Copyright 2007 Anyware Technologies.
All Rights Reserved.