org.eclipse.gmf.runtime.diagram.ui.properties.sections
Class AbstractBasicTextPropertySection
java.lang.Object
org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractModelerPropertySection
org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractBasicTextPropertySection
-
All Implemented Interfaces:
-
ISection
-
Direct Known Subclasses:
-
DiagramGeneralSection
-
public abstract class AbstractBasicTextPropertySection
- extends
AbstractModelerPropertySection
A generic class to edit a property via text field. This class supports
multi-select behavior
Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.properties.sections.
AbstractModelerPropertySection
|
aboutToBeHidden,
aboutToBeShown,
adapt,
addToEObjectList,
createCommand,
createCommand,
digIntoGroups,
executeAsCompositeCommand,
executeAsReadAction,
getEditingDomain,
getEObject,
getEObjectList,
getEventListener,
getFilter,
getInput,
getPrimarySelection,
getStandardLabelWidth,
getUpdateRequestCollapser,
handleElementModifiedEvent,
isCurrentSelection,
isDisposed,
isNotifierDeleted,
isReadOnly,
postUpdateRequest,
setEditingDomain,
setEObject,
setInput,
unwrap,
update,
update
|
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
AbstractBasicTextPropertySection
public AbstractBasicTextPropertySection()
getPropertyNameLabel
protected abstract java.lang.String getPropertyNameLabel()
-
-
Returns:
- - name of the property to place in the label widget
setPropertyValue
protected abstract void setPropertyValue(org.eclipse.emf.ecore.EObject object,
java.lang.Object value)
- Set property value for the given object
-
-
Parameters:
-
object
- -
owner of the property -
value
- -
new value
getPropertyValueString
protected abstract java.lang.String getPropertyValueString()
-
-
Returns:
- - string representation of the property value
getPropertyChangeCommandName
protected abstract java.lang.String getPropertyChangeCommandName()
-
-
Returns:
- - title of the command which will be executed to set the property
createControls
public void createControls(
Composite parent,
TabbedPropertySheetPage aTabbedPropertySheetPage)
-
-
Specified by:
-
createControls
in interface
ISection
-
Overrides:
-
createControls
in class
AbstractModelerPropertySection
-
doCreateControls
public void doCreateControls(
Composite parent,
TabbedPropertySheetPage aTabbedPropertySheetPage)
- Creates the GUI
Control
for this text property section
-
-
Parameters:
-
parent
- parent Composite
-
aTabbedPropertySheetPage
- TabbedPropertySheetPage
-
See Also:
-
org.eclipse.gmf.runtime.common.ui.properties.ISection#createControls(org.eclipse.swt.widgets.Composite,
org.eclipse.gmf.runtime.common.ui.properties.TabbedPropertySheetPage)
startTextWidgetEventListener
protected void startTextWidgetEventListener()
- Start listening to the text widget events
-
stopTextWidgetEventListener
protected void stopTextWidgetEventListener()
- Stop listening to text widget events
-
createTextWidget
protected
Text createTextWidget(
Composite parent)
- Instantiate a text widget
-
-
Parameters:
-
parent
- -
parent composite
-
Returns:
- - a text widget to display and edit the property
getPropertyNameStringsArray
protected java.lang.String[] getPropertyNameStringsArray()
- returns as an array the property name
-
-
Returns:
- - array of strings where each describes a property name one per
property. The strings will be used to calculate common indent
from the left
createLabelWidget
protected
CLabel createLabelWidget(
Composite parent)
- Create a label for property name
-
-
Parameters:
-
parent
- -
parent composite
-
Returns:
- - label to show property name
setPropertyValue
protected void setPropertyValue(
Control control)
- User pressed Enter key after editing text field - update the model
-
-
Parameters:
-
control
- Control
computeNewPropertyValue
protected java.lang.Object computeNewPropertyValue()
-
-
Returns:
- - a default implementation returns contents of the text widget as
a new value for the property. Subclasses can override.
dispose
public void dispose()
-
-
Specified by:
-
dispose
in interface
ISection
-
Overrides:
-
dispose
in class
AbstractModelerPropertySection
-
refresh
public void refresh()
-
-
Specified by:
-
refresh
in interface
ISection
-
Overrides:
-
refresh
in class
AbstractPropertySection
-
refreshUI
protected void refreshUI()
- Refresh UI body - referesh will surround this with read action block
-
getListener
protected
TextChangeHelper getListener()
-
-
Returns:
- Returns the listener.
getTextWidget
protected
Text getTextWidget()
-
-
Returns:
- Returns the textWidget.
getPropertyNameLabelWidget
public
CLabel getPropertyNameLabelWidget()
-
-
Returns:
- Returns the propertyNameLabelWidget.
getSectionComposite
public
Composite getSectionComposite()
-
-
Returns:
- Returns the sectionComposite.
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.