@Test public void isExecutable_NoSelection() { when(scenarioGridModelMock.getSelectedCells()).thenReturn(Collections.emptyList()); when(scenarioGridModelMock.getSelectedHeaderCells()).thenReturn(Collections.emptyList()); assertFalse(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)); }
ScenarioSimulationKeyboardEditHandler extends KeyboardOperationEditCell { @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)); } }
ScenarioSimulationKeyboardEditHandler extends KeyboardOperationEditCell { @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)); } ScenarioSimulationKeyboardEditHandler(GridLayer gridLayer); }
ScenarioSimulationKeyboardEditHandler extends KeyboardOperationEditCell { @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)); } ScenarioSimulationKeyboardEditHandler(GridLayer gridLayer); @Override boolean isExecutable(final GridWidget gridWidget); @Override boolean perform(final GridWidget gridWidget,
                           final boolean isShiftKeyDown,
                           final boolean isControlKeyDown); }
ScenarioSimulationKeyboardEditHandler extends KeyboardOperationEditCell { @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)); } ScenarioSimulationKeyboardEditHandler(GridLayer gridLayer); @Override boolean isExecutable(final GridWidget gridWidget); @Override boolean perform(final GridWidget gridWidget,
                           final boolean isShiftKeyDown,
                           final boolean isControlKeyDown);  }