use of org.uberfire.ext.wires.core.grids.client.widget.grid.impl.KeyboardOperationMoveDown in project drools-wb by kiegroup.
the class ScenarioGridPanelProducer method initializeGrid.
protected void initializeGrid(ScenarioGridLayer scenarioGridLayer, ScenarioGridPanel scenarioGridPanel, AbstractScesimGridModel abstractScesimGridModel, ScenarioSimulationContext scenarioSimulationContext, int defaultDataCellX, int defaultDataCellY) {
final ScenarioGrid scenarioGrid = new ScenarioGrid(abstractScesimGridModel, scenarioGridLayer, new ScenarioGridRenderer(false), scenarioContextMenuRegistry);
scenarioGridLayer.addScenarioGrid(scenarioGrid);
scenarioGridPanel.add(scenarioGridLayer);
scenarioGrid.setScenarioSimulationContext(scenarioSimulationContext);
scenarioGrid.setDefaultSelectedDataCell(defaultDataCellX, defaultDataCellY);
abstractScesimGridModel.setCollectionEditorSingletonDOMElementFactory(new CollectionEditorSingletonDOMElementFactory(scenarioGridPanel, scenarioGridLayer, scenarioGridLayer.getScenarioGrid(), scenarioSimulationContext, viewsProvider));
abstractScesimGridModel.setScenarioCellTextAreaSingletonDOMElementFactory(new ScenarioCellTextAreaSingletonDOMElementFactory(scenarioGridPanel, scenarioGridLayer, scenarioGridLayer.getScenarioGrid()));
abstractScesimGridModel.setScenarioHeaderTextBoxSingletonDOMElementFactory(new ScenarioHeaderTextBoxSingletonDOMElementFactory(scenarioGridPanel, scenarioGridLayer, scenarioGridLayer.getScenarioGrid()));
abstractScesimGridModel.setScenarioExpressionCellTextAreaSingletonDOMElementFactory(new ScenarioExpressionCellTextAreaSingletonDOMElementFactory(scenarioGridPanel, scenarioGridLayer, scenarioGridLayer.getScenarioGrid()));
final ScenarioSimulationKeyboardEditHandler scenarioSimulationKeyboardEditHandler = new ScenarioSimulationKeyboardEditHandler(scenarioGridLayer);
final ScenarioInvokeContextMenuForSelectedCell invokeContextMenuKeyboardOperation = new ScenarioInvokeContextMenuForSelectedCell(scenarioGridLayer, scenarioContextMenuRegistry);
final BaseGridWidgetKeyboardHandler handler = new BaseGridWidgetKeyboardHandler(scenarioGridLayer);
handler.addOperation(scenarioSimulationKeyboardEditHandler, new KeyboardOperationSelectTopLeftCell(scenarioGridLayer), new KeyboardOperationMoveLeft(scenarioGridLayer), new KeyboardOperationMoveRight(scenarioGridLayer), new KeyboardOperationMoveUp(scenarioGridLayer), new KeyboardOperationMoveDown(scenarioGridLayer), new KeyboardOperationSelectBottomRightCell(scenarioGridLayer), invokeContextMenuKeyboardOperation);
scenarioGridPanel.addKeyDownHandler(handler);
// Hack to enable PINNED MODE i.e. not draggable
scenarioGridLayer.enterPinnedMode(scenarioGrid, () -> {
});
}
use of org.uberfire.ext.wires.core.grids.client.widget.grid.impl.KeyboardOperationMoveDown in project kie-wb-common by kiegroup.
the class ExpressionEditorViewImpl method setupGridPanel.
protected void setupGridPanel() {
final Transform transform = new Transform().scale(VP_SCALE);
gridPanel.getElement().setId("dmn_container_" + com.google.gwt.dom.client.Document.get().createUniqueId());
gridPanel.getViewport().setTransform(transform);
final BaseGridWidgetKeyboardHandler handler = new BaseGridWidgetKeyboardHandler(gridLayer);
addKeyboardOperation(handler, new KeyboardOperationEditCell(gridLayer));
addKeyboardOperation(handler, new KeyboardOperationEscapeGridCell(gridLayer));
addKeyboardOperation(handler, new KeyboardOperationMoveLeft(gridLayer, gridPanel));
addKeyboardOperation(handler, new KeyboardOperationMoveRight(gridLayer, gridPanel));
addKeyboardOperation(handler, new KeyboardOperationMoveUp(gridLayer, gridPanel));
addKeyboardOperation(handler, new KeyboardOperationMoveDown(gridLayer, gridPanel));
addKeyboardOperation(handler, new KeyboardOperationInvokeContextMenuForSelectedCell(gridLayer));
gridPanel.addKeyDownHandler(handler);
gridPanelContainer.clear();
gridPanelContainer.setWidget(gridPanel);
}
Aggregations