Class LinkControl
- 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.reference.LinkControl
-
- All Implemented Interfaces:
ECPControlSWT
- Direct Known Subclasses:
EClassifierControl
@Deprecated public class LinkControl extends SingleControl
Deprecated.Use LinkControlSWTRenderer insteadThis class defines a Control which is used for displayingEStructuralFeature
s which have a reference.- Author:
- Eugen Neufeld
-
-
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 LinkControl()
Deprecated.
-
Method Summary
All Methods Instance 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.Button[]
createButtons(org.eclipse.swt.widgets.Composite composite)
Deprecated.Creates the buttons to delete a reference, add one to an existing and add a new element to be referenced.void
dispose()
Deprecated.Disposes the control.protected void
fillControlComposite(org.eclipse.swt.widgets.Composite composite)
Deprecated.This method must be overridden by concrete classes.org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator
getAdapterFactoryItemDelegator()
Deprecated.org.eclipse.emf.edit.provider.ComposedAdapterFactory
getComposedAdapterFactory()
Deprecated.protected org.eclipse.swt.widgets.Control[]
getControlsForTooltip()
Deprecated.Method for retrieving all controls which should have the help text as their tooltip.protected org.eclipse.swt.widgets.Button
getDeleteButton()
Deprecated.Returns the delete button of this control.protected java.lang.Object
getImage(java.lang.Object value)
Deprecated.Returns the image to be used for the given linkedvalue
.protected java.lang.Object
getLinkText(java.lang.Object value)
Deprecated.Returns the link text to be used for the given linkedvalue
.protected int
getNumButtons()
Deprecated.protected java.lang.String
getUnsetButtonTooltip()
Deprecated.Returns the string for the unset button tooltip.protected java.lang.String
getUnsetLabelText()
Deprecated.Returns the string for the unset label.protected void
linkClicked(org.eclipse.emf.ecore.EObject value)
Deprecated.This code is called whenever the link of the link widget is clicked.void
setAdapterFactoryItemDelegator(org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator adapterFactoryItemDelegator)
Deprecated.void
setComposedAdapterFactory(org.eclipse.emf.edit.provider.ComposedAdapterFactory composedAdapterFactory)
Deprecated.void
setEditable(boolean isEditable)
Deprecated.Sets the state of the widget to be either editable or not.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, 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
-
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
-
getNumButtons
protected int getNumButtons()
Deprecated.- Returns:
- number of buttons added by the link control.
-
createButtons
protected org.eclipse.swt.widgets.Button[] createButtons(org.eclipse.swt.widgets.Composite composite)
Deprecated.Creates the buttons to delete a reference, add one to an existing and add a new element to be referenced.- Parameters:
composite
- theComposite
to place the buttons on- Returns:
- An array of buttons
-
linkClicked
protected void linkClicked(org.eclipse.emf.ecore.EObject value)
Deprecated.This code is called whenever the link of the link widget is clicked. You can overwrite this to change the behavior.- Parameters:
value
- the EObject that is linked
-
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
-
getImage
protected java.lang.Object getImage(java.lang.Object value)
Deprecated.Returns the image to be used for the given linkedvalue
.- Parameters:
value
- the value- Returns:
- The image.
-
getLinkText
protected java.lang.Object getLinkText(java.lang.Object value)
Deprecated.Returns the link text to be used for the given linkedvalue
.- Parameters:
value
- the value- Returns:
- The link text.
-
getDeleteButton
protected org.eclipse.swt.widgets.Button getDeleteButton()
Deprecated.Returns the delete button of this control.- Returns:
- The delete button of this control.
-
updateValidationColor
protected void updateValidationColor(org.eclipse.swt.graphics.Color color)
Deprecated.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- See Also:
SingleControl.updateValidationColor(org.eclipse.swt.graphics.Color)
-
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
-
getUnsetLabelText
protected java.lang.String getUnsetLabelText()
Deprecated.Description copied from class:SWTControl
Returns the string for the unset label.- Specified by:
getUnsetLabelText
in classSWTControl
- Returns:
- The unset label text
-
getUnsetButtonTooltip
protected java.lang.String getUnsetButtonTooltip()
Deprecated.Description copied from class:SWTControl
Returns the string for the unset button tooltip.- Specified by:
getUnsetButtonTooltip
in classSWTControl
- Returns:
- The unset button tooltip
-
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
-
getAdapterFactoryItemDelegator
public org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator getAdapterFactoryItemDelegator()
Deprecated.- Returns:
- the adapterFactoryItemDelegator
-
setAdapterFactoryItemDelegator
public void setAdapterFactoryItemDelegator(org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator adapterFactoryItemDelegator)
Deprecated.- Parameters:
adapterFactoryItemDelegator
- the adapterFactoryItemDelegator to set
-
getComposedAdapterFactory
public org.eclipse.emf.edit.provider.ComposedAdapterFactory getComposedAdapterFactory()
Deprecated.- Returns:
- the composedAdapterFactory
-
setComposedAdapterFactory
public void setComposedAdapterFactory(org.eclipse.emf.edit.provider.ComposedAdapterFactory composedAdapterFactory)
Deprecated.- Parameters:
composedAdapterFactory
- the composedAdapterFactory to set
-
-