Modelers

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

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.AbstractTextPropertySection
All Implemented Interfaces:
org.eclipse.ui.views.properties.tabbed.ISection
Direct Known Subclasses:
AbstractIntegerPropertySection, AbstractStringPropertySection

public abstract class AbstractTextPropertySection
extends AbstractModelerPropertySection

An abstract implementation of a section with a text field.


Field Summary
protected  TextChangeHelper listener
          A helper to listen for events that indicate that a text field has been changed.
protected  org.eclipse.swt.widgets.Text text
          The text 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
AbstractTextPropertySection()
           
 
Method Summary
 void createControls(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage tabbedPropertySheetPage)
           
protected abstract  EAttribute getFeature()
          Get the feature for the text field for the section.
protected abstract  java.lang.String getFeatureAsText()
          Get the value of the feature as text for the text field for the section.
protected abstract  java.lang.Object getFeatureValue(java.lang.String newText)
          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 text field for the section.
protected  int getStyle()
          Get the style of the text widget.
protected  void handleTextModified()
          Handle the text modified event.
protected abstract  boolean isEqual(java.lang.String newText)
          Determine if the provided string value is an equal representation of the current setting of the text 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

text

protected org.eclipse.swt.widgets.Text text
The text control for the section.


listener

protected TextChangeHelper listener
A helper to listen for events that indicate that a text field has been changed.

Constructor Detail

AbstractTextPropertySection

public AbstractTextPropertySection()
Method Detail

createControls

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

handleTextModified

protected void handleTextModified()
Handle the text 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:
AbstractPropertySection.refresh()

getStyle

protected int getStyle()
Get the style of the text widget. By default, this is a single line text

Returns:
the style

isEqual

protected abstract boolean isEqual(java.lang.String newText)
Determine if the provided string value is an equal representation of the current setting of the text property.

Parameters:
newText - the new string value.
Returns:
true if the new string value is equal to the current property setting.

getFeature

protected abstract EAttribute getFeature()
Get the feature for the text field for the section.

Returns:
the feature for the text.

getFeatureAsText

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

Returns:
the value of the feature as text.

getFeatureValue

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

Parameters:
newText - the new value of the feature as a string.
Returns:
the new value of the feature.

getLabelText

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

Returns:
the label for the text field.

Modelers

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