@Test public void isExecutable_CellSelected() { when(scenarioGridModelMock.getSelectedCells()).thenReturn(Arrays.asList(selectedCell)); when(scenarioGridModelMock.getSelectedHeaderCells()).thenReturn(Collections.emptyList()); assertTrue(handler.isExecutable(scenarioGridMock)); }
@Override public boolean isExecutable(final GridWidget gridWidget) { final GridData model = gridWidget.getModel(); return ((!model.getSelectedHeaderCells().isEmpty() && model.getSelectedCells().isEmpty()) || (model.getSelectedHeaderCells().isEmpty() && model.getSelectedCells().size() == 1)); }
ScenarioInvokeContextMenuForSelectedCell extends KeyboardOperationInvokeContextMenuForSelectedCell { @Override public boolean isExecutable(final GridWidget gridWidget) { final GridData model = gridWidget.getModel(); return ((!model.getSelectedHeaderCells().isEmpty() && model.getSelectedCells().isEmpty()) || (model.getSelectedHeaderCells().isEmpty() && model.getSelectedCells().size() == 1)); } }
ScenarioInvokeContextMenuForSelectedCell extends KeyboardOperationInvokeContextMenuForSelectedCell { @Override public boolean isExecutable(final GridWidget gridWidget) { final GridData model = gridWidget.getModel(); return ((!model.getSelectedHeaderCells().isEmpty() && model.getSelectedCells().isEmpty()) || (model.getSelectedHeaderCells().isEmpty() && model.getSelectedCells().size() == 1)); } ScenarioInvokeContextMenuForSelectedCell(final GridLayer gridLayer, final ScenarioContextMenuRegistry
            scenarioContextMenuRegistry); }
ScenarioInvokeContextMenuForSelectedCell extends KeyboardOperationInvokeContextMenuForSelectedCell { @Override public boolean isExecutable(final GridWidget gridWidget) { final GridData model = gridWidget.getModel(); return ((!model.getSelectedHeaderCells().isEmpty() && model.getSelectedCells().isEmpty()) || (model.getSelectedHeaderCells().isEmpty() && model.getSelectedCells().size() == 1)); } ScenarioInvokeContextMenuForSelectedCell(final GridLayer gridLayer, final ScenarioContextMenuRegistry
            scenarioContextMenuRegistry); @Override boolean isExecutable(final GridWidget gridWidget); @Override boolean perform(final GridWidget gridWidget, final boolean isShiftKeyDown, final boolean isControlKeyDown); }
ScenarioInvokeContextMenuForSelectedCell extends KeyboardOperationInvokeContextMenuForSelectedCell { @Override public boolean isExecutable(final GridWidget gridWidget) { final GridData model = gridWidget.getModel(); return ((!model.getSelectedHeaderCells().isEmpty() && model.getSelectedCells().isEmpty()) || (model.getSelectedHeaderCells().isEmpty() && model.getSelectedCells().size() == 1)); } ScenarioInvokeContextMenuForSelectedCell(final GridLayer gridLayer, final ScenarioContextMenuRegistry
            scenarioContextMenuRegistry); @Override boolean isExecutable(final GridWidget gridWidget); @Override boolean perform(final GridWidget gridWidget, final boolean isShiftKeyDown, final boolean isControlKeyDown);  }