org.eclipse.gmf.runtime.lite.edit.parts.labels
Class NativeLabelTextDisplayer
java.lang.Object
org.eclipse.gmf.runtime.lite.edit.parts.labels.AbstractLabelTextDisplayer
org.eclipse.gmf.runtime.lite.edit.parts.labels.AbstractFeatureBasedLabelTextDisplayer
org.eclipse.gmf.runtime.lite.edit.parts.labels.NativeLabelTextDisplayer
- All Implemented Interfaces:
- ILabelTextDisplayer, org.eclipse.jface.viewers.ICellEditorValidator
public class NativeLabelTextDisplayer
- extends AbstractFeatureBasedLabelTextDisplayer
An implementation of ILabelTextDisplayer
that uses native EMF mechanisms to convert a value of a datatype to
its string representation and create an instance of the datatype from the literal value.
- See Also:
EcoreUtil.convertToString(org.eclipse.emf.ecore.EDataType, Object)
,
EcoreUtil.createFromString(org.eclipse.emf.ecore.EDataType, String)
Method Summary |
protected String |
buildDisplayText(Object[] featureValues)
Returns the text to be displayed by this label processor for the given values. |
protected String |
buildEditText(Object[] featureValues)
Returns the initial edit text to be displayed by this label processor for the given values. |
protected org.eclipse.emf.ecore.EAttribute |
getAttribute()
|
protected Object[] |
parseEditedValues(String newString)
Returns the values that should be set to the corresponding features. |
Methods inherited from class org.eclipse.gmf.runtime.lite.edit.parts.labels.AbstractFeatureBasedLabelTextDisplayer |
getApplyCommand, getDisplayText, getEditText, getFeatures, getValidator, getValidNewValue, getValidValue, getValues, isAffectingEvent, isValid, shouldReplaceEmptyStringsWithNulls |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NativeLabelTextDisplayer
public NativeLabelTextDisplayer(org.eclipse.emf.ecore.EAttribute feature)
NativeLabelTextDisplayer
public NativeLabelTextDisplayer(org.eclipse.emf.ecore.EAttribute[] features)
getAttribute
protected org.eclipse.emf.ecore.EAttribute getAttribute()
buildDisplayText
protected String buildDisplayText(Object[] featureValues)
- Description copied from class:
AbstractFeatureBasedLabelTextDisplayer
- Returns the text to be displayed by this label processor for the given values.
- Specified by:
buildDisplayText
in class AbstractFeatureBasedLabelTextDisplayer
buildEditText
protected String buildEditText(Object[] featureValues)
- Description copied from class:
AbstractFeatureBasedLabelTextDisplayer
- Returns the initial edit text to be displayed by this label processor for the given values.
- Specified by:
buildEditText
in class AbstractFeatureBasedLabelTextDisplayer
parseEditedValues
protected Object[] parseEditedValues(String newString)
throws IllegalArgumentException
- Description copied from class:
AbstractFeatureBasedLabelTextDisplayer
- Returns the values that should be set to the corresponding features.
- Specified by:
parseEditedValues
in class AbstractFeatureBasedLabelTextDisplayer
- Throws:
IllegalArgumentException
- If the given string is invalid.
Copyright © 2012. All Rights Reserved.