Modelers

org.topcased.modeler.editor.properties.sections
Class AbstractEnumerationPropertySection

java.lang.Object
  extended by org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
      extended by org.topcased.modeler.editor.properties.sections.AbstractModelerPropertySection
          extended by org.topcased.modeler.editor.properties.sections.AbstractEnumerationPropertySection
All Implemented Interfaces:
org.eclipse.ui.views.properties.tabbed.ISection

public abstract class AbstractEnumerationPropertySection
extends AbstractModelerPropertySection

An abstract implementation of a section with a enumeration field using a combo box (pulldown).


Field Summary
protected  org.eclipse.swt.custom.CCombo combo
          The combo box control for the section.
 
Fields inherited from class org.topcased.modeler.editor.properties.sections.AbstractModelerPropertySection
eObject, eObjectList, propertySheetPage, selectedEditPart
 
Fields inherited from class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
STANDARD_LABEL_WIDTH
 
Constructor Summary
AbstractEnumerationPropertySection()
           
 
Method Summary
 void createControls(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage aTabbedPropertySheetPage)
           
protected abstract  java.lang.String[] getEnumerationFeatureValues()
          Get the enumeration values of the feature for the combo field for the section.
protected abstract  EStructuralFeature getFeature()
          Get the feature for the combo field for the section.
protected abstract  java.lang.String getFeatureAsText()
          Get the value of the feature as text for the combo field for the section.
protected abstract  java.lang.Object getFeatureValue(int index)
          Get the new value of the feature for the text field for the section.
protected abstract  java.lang.String getLabelText()
          Get the label for the combo field for the section.
protected  void handleComboModified()
          Handle the combo modified event.
protected abstract  boolean isEqual(int index)
          Determine if the provided index of the enumeration is equal to the current setting of the enumeration property.
 void refresh()
           
 
Methods inherited from class org.topcased.modeler.editor.properties.sections.AbstractModelerPropertySection
getChoices, getStandardLabelWidth, setInput
 
Methods inherited from class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
aboutToBeHidden, aboutToBeShown, dispose, getMinimumHeight, getPart, getSelection, getWidgetFactory, shouldUseExtraSpace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

combo

protected org.eclipse.swt.custom.CCombo combo
The combo box control for the section.

Constructor Detail

AbstractEnumerationPropertySection

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

handleComboModified

protected void handleComboModified()
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()

isEqual

protected abstract boolean isEqual(int index)
Determine if the provided index of the enumeration is equal to the current setting of the enumeration property.

Parameters:
index - the new index in the enumeration.
Returns:
true if the new index value is equal to the current property setting.

getFeature

protected abstract EStructuralFeature getFeature()
Get the feature for the combo field for the section.

Returns:
the feature for the text.

getEnumerationFeatureValues

protected abstract java.lang.String[] getEnumerationFeatureValues()
Get the enumeration values of the feature for the combo field for the section.

Returns:
the list of values of the feature as text.

getFeatureAsText

protected abstract java.lang.String getFeatureAsText()
Get the value of the feature as text for the combo field for the section.

Returns:
the value of the feature as text.

getFeatureValue

protected abstract java.lang.Object getFeatureValue(int index)
Get the new value of the feature for the text field for the section.

Parameters:
index - the new index in the enumeration.
Returns:
the new value of the feature.

getLabelText

protected abstract java.lang.String getLabelText()
Get the label for the combo field for the section.

Returns:
the label for the text field.

Modelers

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.