Class TableControl
- 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.TableControl
-
- All Implemented Interfaces:
ECPControlSWT
@Deprecated public class TableControl extends SWTControl
Deprecated.The class describing a table control.- Author:
- Eugen Neufeld, emueller
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
TableControl.ECPCellLabelProvider
Deprecated.ECP specficic cell label provider that does also implementIColorProvider
in order to correctly.
-
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 TableControl()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
addRow(org.eclipse.emf.ecore.EClass clazz)
Deprecated.This method is called to add a new entry in the domain model and thus to create a new row in the table.protected void
applyValidation(VDiagnostic diagnostic)
Deprecated.Override this method in order to handle validation.protected org.eclipse.core.databinding.Binding
bindValue()
Deprecated.Triggers the control to perform the databinding.org.eclipse.swt.widgets.Composite
createControl(org.eclipse.swt.widgets.Composite parent)
Deprecated.This method is called to render the control on a parent.java.util.List<RenderingResultRow<org.eclipse.swt.widgets.Control>>
createControls(org.eclipse.swt.widgets.Composite parent)
Deprecated.Renders a control on the provided parent and returning a list ofRenderingResultRows
.protected void
deleteRows(java.util.List<org.eclipse.emf.ecore.EObject> deletionList)
Deprecated.This is called bydeleteRowUserConfirmDialog(List)
after the user confirmed to delete the selected elements.protected void
deleteRowUserConfirmDialog(java.util.List<org.eclipse.emf.ecore.EObject> deletionList)
Deprecated.This method shows a user confirmation dialog when the user attempts to delete a row in the table.void
dispose()
Deprecated.Disposes the control.protected void
fillControlComposite(org.eclipse.swt.widgets.Composite parent)
Deprecated.This method must be overridden by concrete classes.protected java.lang.String
getCellTooltipMessage(VDiagnostic vDiagnostic)
Deprecated.Returns the message of the validation tool tip shown in the cell.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
getCustomUnsetButton()
Deprecated.The default unset button will be displayed to the right of the control's composite.protected java.lang.String
getRowTooltipMessage(VDiagnostic vDiagnostic)
Deprecated.Returns the message of the validation tool tip shown in the row.protected java.lang.String
getTableTooltipMessage(org.eclipse.emf.common.util.Diagnostic diagnostic)
Deprecated.Returns the message of the validation tool tip shown in the table header.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.void
setEditable(boolean isEditable)
Deprecated.void
setTableControlConfiguration(TableControlConfiguration tableControlConfiguration)
Deprecated.boolean
showLabel()
Deprecated.-
Methods inherited from class org.eclipse.emf.ecp.edit.internal.swt.util.SWTControl
backwardCompatibleHandleValidation, createButtonForAction, createContentControl, getHelpText, getModelValue, getSystemColor, getValidationBackgroundColor, getValidationIcon, isEditable, setObservableValue, showUnsetLabel
-
Methods inherited from class org.eclipse.emf.ecp.edit.spi.ECPAbstractControl
enabledmentChanged, getControl, getDataBindingContext, getDomainModelReference, getEditingDomain, getEditingDomain, getFirstSetting, getFirstStructuralFeature, getItemPropertyDescriptor, getLocale, getService, getViewModelContext, handleValidation, init, isEmbedded, postInit, resetValidation, setEmbedded
-
-
-
-
Method Detail
-
setTableControlConfiguration
public final void setTableControlConfiguration(TableControlConfiguration tableControlConfiguration)
Deprecated.- Parameters:
tableControlConfiguration
- theTableControlConfiguration
to use when creating the table
-
bindValue
protected 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
-
createControls
public java.util.List<RenderingResultRow<org.eclipse.swt.widgets.Control>> createControls(org.eclipse.swt.widgets.Composite parent)
Deprecated.Renders a control on the provided parent and returning a list ofRenderingResultRows
.- Specified by:
createControls
in interfaceECPControlSWT
- Overrides:
createControls
in classSWTControl
- Parameters:
parent
- theComposite
to render onto- Returns:
- the list of
RenderingResultRows
- See Also:
ECPControlSWT.createControls(org.eclipse.swt.widgets.Composite)
-
createControl
public org.eclipse.swt.widgets.Composite createControl(org.eclipse.swt.widgets.Composite parent)
Deprecated.Description copied from class:SWTControl
This method is called to render the control on a parent.- Overrides:
createControl
in classSWTControl
- Parameters:
parent
- theComposite
which is the parent- Returns:
- the created
Composite
-
fillControlComposite
protected void fillControlComposite(org.eclipse.swt.widgets.Composite parent)
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:
parent
- theComposite
to add the widget to
-
getCustomUnsetButton
protected org.eclipse.swt.widgets.Button getCustomUnsetButton()
Deprecated.Description copied from class:SWTControl
The default unset button will be displayed to the right of the control's composite. Concrete classes may override this method to include an own unset button in their composite rather than using the default positioning.- Overrides:
getCustomUnsetButton
in classSWTControl
- Returns:
- The custom unset button of the concrete class
-
deleteRowUserConfirmDialog
protected void deleteRowUserConfirmDialog(java.util.List<org.eclipse.emf.ecore.EObject> deletionList)
Deprecated.This method shows a user confirmation dialog when the user attempts to delete a row in the table.- Parameters:
deletionList
- the list of selected EObjects to delete
-
deleteRows
protected void deleteRows(java.util.List<org.eclipse.emf.ecore.EObject> deletionList)
Deprecated.This is called bydeleteRowUserConfirmDialog(List)
after the user confirmed to delete the selected elements.- Parameters:
deletionList
- the list ofEObjects
to delete
-
addRow
protected void addRow(org.eclipse.emf.ecore.EClass clazz)
Deprecated.This method is called to add a new entry in the domain model and thus to create a new row in the table. The element to create is defined by the provided class. You can override this method but you have to call super nonetheless.- Parameters:
clazz
- theEClass
defining the EObject to create
-
dispose
public void dispose()
Deprecated.Disposes the control. A control which needs specific dispose handling must still call super.dispose.- Overrides:
dispose
in classSWTControl
-
applyValidation
protected void applyValidation(VDiagnostic diagnostic)
Deprecated.Override this method in order to handle validation.- Overrides:
applyValidation
in classECPAbstractControl
- Parameters:
diagnostic
- the currentVDiagnostic
- See Also:
ECPAbstractControl.applyValidation(org.eclipse.emf.ecp.view.spi.model.VDiagnostic)
-
getTableTooltipMessage
protected java.lang.String getTableTooltipMessage(org.eclipse.emf.common.util.Diagnostic diagnostic)
Deprecated.Returns the message of the validation tool tip shown in the table header.- Parameters:
diagnostic
- theDiagnostic
to extract the message from- Returns:
- the message
-
getRowTooltipMessage
protected java.lang.String getRowTooltipMessage(VDiagnostic vDiagnostic)
Deprecated.Returns the message of the validation tool tip shown in the row.- Parameters:
vDiagnostic
- theVDiagnostic
to get the message from- Returns:
- the message
-
getCellTooltipMessage
protected java.lang.String getCellTooltipMessage(VDiagnostic vDiagnostic)
Deprecated.Returns the message of the validation tool tip shown in the cell.- Parameters:
vDiagnostic
- theVDiagnostic
to get the message from- Returns:
- the message
-
setEditable
@Deprecated 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
-
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
-
showLabel
@Deprecated public boolean showLabel()
Deprecated.Whether a label should be shown for this control.- Overrides:
showLabel
in classECPAbstractControl
- Returns:
- true if a label should be created, false otherwise
-
-