public abstract class BaseKeyboardOperation extends Object implements KeyboardOperation
KeyboardOperation.TriStateBoolean
Constructor and Description |
---|
BaseKeyboardOperation(GridLayer gridLayer) |
Modifier and Type | Method and Description |
---|---|
protected GridData.SelectedCell |
getSelectedCellOrigin(GridData gridModel,
boolean isHeaderCellSelected)
It retrieves the selected cell in
GridData model, which could be an header cell or a
simple one. |
KeyboardOperation.TriStateBoolean |
isControlKeyDown()
Gets the control-key state that this operation matches.
|
boolean |
isExecutable(GridWidget gridWidget)
Decides about @link{GridWidget} state for execution of the operation.
|
KeyboardOperation.TriStateBoolean |
isShiftKeyDown()
Gets the shift-key state that this operation matches.
|
protected boolean |
scrollSelectedCellIntoView(GridWidget gridWidget) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKeyCode, perform
protected GridLayer gridLayer
public BaseKeyboardOperation(GridLayer gridLayer)
public KeyboardOperation.TriStateBoolean isShiftKeyDown()
KeyboardOperation
isShiftKeyDown
in interface KeyboardOperation
public KeyboardOperation.TriStateBoolean isControlKeyDown()
KeyboardOperation
isControlKeyDown
in interface KeyboardOperation
public boolean isExecutable(GridWidget gridWidget)
KeyboardOperation
isExecutable
in interface KeyboardOperation
gridWidget
- The GridWidget on which to perform the operation.protected boolean scrollSelectedCellIntoView(GridWidget gridWidget)
protected GridData.SelectedCell getSelectedCellOrigin(GridData gridModel, boolean isHeaderCellSelected)
GridData
model, which could be an header cell or a
simple one. In case of an header cell, it manages a possible case where a cell is spanned over multiple
columns: when pressing KEY_RIGHT
, it selected the last cell of the selected header cells group in
order to show all the spanned cell. The otherwise in all other casesgridModel
- isHeaderCellSelected
- Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.