Class AbstractTextControl
- java.lang.Object
-
- org.eclipse.emf.ecp.edit.spi.ECPAbstractControl
-
- org.eclipse.emf.ecp.edit.internal.swt.util.SWTControl
-
- org.eclipse.emf.ecp.edit.internal.swt.controls.SingleControl
-
- org.eclipse.emf.ecp.edit.internal.swt.controls.AbstractTextControl
-
- All Implemented Interfaces:
ECPControlSWT
- Direct Known Subclasses:
NumericalControl
,StringControl
,XmlDateControlText
@Deprecated public abstract class AbstractTextControl extends SingleControl
Deprecated.This abstract class is used as a common superclass for all widgets that use aText
widget.- Author:
- Eugen Neufeld
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractTextControl.ModelToTargetUpdateStrategy
Deprecated.protected class
AbstractTextControl.TargetToModelUpdateStrategy
Deprecated.
-
Field Summary
-
Fields inherited from class org.eclipse.emf.ecp.edit.internal.swt.util.SWTControl
CUSTOM_VARIANT, VALIDATION_ERROR_ICON, validationLabel
-
-
Constructor Summary
Constructors Constructor Description AbstractTextControl()
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.eclipse.core.databinding.Binding
bindValue()
Deprecated.Triggers the control to perform the databinding.protected org.eclipse.swt.widgets.ToolTip
createToolTip(int style, java.lang.String text, java.lang.String message)
Deprecated.Creates aToolTip
.protected org.eclipse.core.databinding.Binding
createTooltipBinding(org.eclipse.core.databinding.UpdateValueStrategy targetToModel, org.eclipse.core.databinding.UpdateValueStrategy modelToTarget)
Deprecated.Creates a tooltip binding for this control.protected void
customizeText(org.eclipse.swt.widgets.Text text)
Deprecated.This method allows to set custom values to the text field, e.g.void
dispose()
Deprecated.Disposes the control.protected void
fillControlComposite(org.eclipse.swt.widgets.Composite composite)
Deprecated.This method must be overridden by concrete classes.protected org.eclipse.swt.widgets.Control[]
getControlsForTooltip()
Deprecated.Method for retrieving all controls which should have the help text as their tooltip.org.eclipse.swt.widgets.Text
getText()
Deprecated.protected abstract java.lang.String
getTextVariantID()
Deprecated.The VariantId to use e.g.protected org.eclipse.swt.layout.GridData
getTextWidgetLayoutData()
Deprecated.The LayoutData for the createdText
widget.protected int
getTextWidgetStyle()
Deprecated.The style to apply to the text widget.void
setEditable(boolean isEditable)
Deprecated.Sets the state of the widget to be either editable or not.protected void
setUnvalidatedString(java.lang.String string)
Deprecated.Sets the content of the SWT text control to the given string without calling#validateString(String)
.protected void
updateValidationColor(org.eclipse.swt.graphics.Color color)
Deprecated.Allows controls to supply a second visual effect for controls on validation.-
Methods inherited from class org.eclipse.emf.ecp.edit.internal.swt.controls.SingleControl
addControlDecoration, handleValidation, resetValidation, showLabel
-
Methods inherited from class org.eclipse.emf.ecp.edit.internal.swt.util.SWTControl
backwardCompatibleHandleValidation, createButtonForAction, createContentControl, createControl, createControls, getCustomUnsetButton, getHelpText, getModelValue, getSystemColor, getUnsetButtonTooltip, getUnsetLabelText, getValidationBackgroundColor, getValidationIcon, isEditable, setObservableValue, showUnsetLabel
-
Methods inherited from class org.eclipse.emf.ecp.edit.spi.ECPAbstractControl
applyValidation, enabledmentChanged, getControl, getDataBindingContext, getDomainModelReference, getEditingDomain, getEditingDomain, getFirstSetting, getFirstStructuralFeature, getItemPropertyDescriptor, getLocale, getService, getViewModelContext, init, isEmbedded, postInit, setEmbedded
-
-
-
-
Method Detail
-
updateValidationColor
protected void updateValidationColor(org.eclipse.swt.graphics.Color color)
Deprecated.Description copied from class:SingleControl
Allows controls to supply a second visual effect for controls on validation. The color to set is provided as the parameter.- Overrides:
updateValidationColor
in classSingleControl
- Parameters:
color
- the color to set, null if the default background color should be set
-
fillControlComposite
protected void fillControlComposite(org.eclipse.swt.widgets.Composite composite)
Deprecated.Description copied from class:SWTControl
This method must be overridden by concrete classes. Here the widget displaying the data is added to the composite.- Specified by:
fillControlComposite
in classSWTControl
- Parameters:
composite
- theComposite
to add the widget to
-
createToolTip
protected org.eclipse.swt.widgets.ToolTip createToolTip(int style, java.lang.String text, java.lang.String message)
Deprecated.Creates aToolTip
.- Parameters:
style
- the SWT styletext
- the textmessage
- the message- Returns:
- a
ToolTip
-
customizeText
protected void customizeText(org.eclipse.swt.widgets.Text text)
Deprecated.This method allows to set custom values to the text field, e.g. a tooltip or a validation.- Parameters:
text
- the text widget to customize
-
getTextVariantID
protected abstract java.lang.String getTextVariantID()
Deprecated.The VariantId to use e.g. for RAP- Returns:
- the String identifying this control
-
getTextWidgetLayoutData
protected org.eclipse.swt.layout.GridData getTextWidgetLayoutData()
Deprecated.The LayoutData for the createdText
widget. Can be changed by the concrete classes.- Returns:
- the
GridData
to apply
-
getTextWidgetStyle
protected int getTextWidgetStyle()
Deprecated.The style to apply to the text widget. This can be changed by the concrete classes.- Returns:
- the style to apply
-
getControlsForTooltip
protected org.eclipse.swt.widgets.Control[] getControlsForTooltip()
Deprecated.Description copied from class:SWTControl
Method for retrieving all controls which should have the help text as their tooltip.- Specified by:
getControlsForTooltip
in classSWTControl
- Returns:
- the array of the controls to set a tooltip to
-
setEditable
public void setEditable(boolean isEditable)
Deprecated.Sets the state of the widget to be either editable or not.- Overrides:
setEditable
in classECPAbstractControl
- Parameters:
isEditable
- whether to set the widget editable
-
bindValue
public org.eclipse.core.databinding.Binding bindValue()
Deprecated.Description copied from class:SWTControl
Triggers the control to perform the databinding.- Specified by:
bindValue
in classSWTControl
- Returns:
- The
Binding
-
createTooltipBinding
protected org.eclipse.core.databinding.Binding createTooltipBinding(org.eclipse.core.databinding.UpdateValueStrategy targetToModel, org.eclipse.core.databinding.UpdateValueStrategy modelToTarget)
Deprecated.Creates a tooltip binding for this control.- Parameters:
targetToModel
- theUpdateValueStrategy
from target to ModelmodelToTarget
- theUpdateValueStrategy
from model to target- Returns:
- the created
Binding
-
setUnvalidatedString
protected void setUnvalidatedString(java.lang.String string)
Deprecated.Sets the content of the SWT text control to the given string without calling#validateString(String)
.- Parameters:
string
- the content of the SWT Text control
-
dispose
public void dispose()
Deprecated.Description copied from class:SingleControl
Disposes the control. A control which needs specific dispose handling must still call super.dispose.- Overrides:
dispose
in classSingleControl
-
getText
public org.eclipse.swt.widgets.Text getText()
Deprecated.- Returns:
- the text
-
-