public class GridPasteKeyListener extends Object implements org.eclipse.swt.events.KeyListener
KeyListener
for the paste action on a Grid
control.Constructor and Description |
---|
GridPasteKeyListener(org.eclipse.swt.widgets.Display display,
VControl vControl,
EMFFormsDatabindingEMF dataBinding,
EStructuralFeatureValueConverterService converterService,
EMFFormsLocalizationService localizationService,
boolean selectPastedCells)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected String |
extractDiagnosticMessage(org.eclipse.emf.common.util.Diagnostic diag,
org.eclipse.emf.ecore.EStructuralFeature feature,
String value)
Creates the message for the given
Diagnostic which will be displayed to the user. |
protected EStructuralFeatureValueConverterService |
getConverterService() |
void |
keyPressed(org.eclipse.swt.events.KeyEvent e) |
void |
keyReleased(org.eclipse.swt.events.KeyEvent e) |
List<org.eclipse.swt.graphics.Point> |
pasteContents(org.eclipse.swt.graphics.Point startItem,
org.eclipse.nebula.widgets.grid.Grid grid,
String contents)
Performs the paste operation.
|
void |
pasteSelection(org.eclipse.nebula.widgets.grid.Grid grid,
String contents)
Pastes the given contents in the grid.
|
protected void |
setValue(org.eclipse.core.databinding.observable.value.IObservableValue value,
Object convertedValue)
Sets the given converted value on the observable value.
|
public GridPasteKeyListener(org.eclipse.swt.widgets.Display display, VControl vControl, EMFFormsDatabindingEMF dataBinding, EStructuralFeatureValueConverterService converterService, EMFFormsLocalizationService localizationService, boolean selectPastedCells)
display
- the Display
on which to allocate this command's Clipboard
.vControl
- the VTableControl
.dataBinding
- EMFFormsDatabindingEMF
converterService
- EStructuralFeatureValueConverterService
localizationService
- EMFFormsLocalizationService
selectPastedCells
- whether to select the pasted cellspublic void keyPressed(org.eclipse.swt.events.KeyEvent e)
keyPressed
in interface org.eclipse.swt.events.KeyListener
public void keyReleased(org.eclipse.swt.events.KeyEvent e)
keyReleased
in interface org.eclipse.swt.events.KeyListener
public void pasteSelection(org.eclipse.nebula.widgets.grid.Grid grid, String contents)
grid
- the target Grid
contents
- the contents to pastepublic List<org.eclipse.swt.graphics.Point> pasteContents(org.eclipse.swt.graphics.Point startItem, org.eclipse.nebula.widgets.grid.Grid grid, String contents)
startItem
- the start itemgrid
- the gridcontents
- the pasted contentsprotected void setValue(org.eclipse.core.databinding.observable.value.IObservableValue value, Object convertedValue)
value
- the observable valueconvertedValue
- the converted valueprotected String extractDiagnosticMessage(org.eclipse.emf.common.util.Diagnostic diag, org.eclipse.emf.ecore.EStructuralFeature feature, String value)
Diagnostic
which will be displayed to the user.diag
- the diagnostic with the original error messagefeature
- the validated featurevalue
- the validated valueprotected EStructuralFeatureValueConverterService getConverterService()
EStructuralFeatureValueConverterService
Copyright © 2017. All rights reserved.