@Test public void isInstanceAssigned() { assertTrue(scenarioGridSpy.isInstanceAssigned(FactIdentifier.DESCRIPTION)); assertFalse(scenarioGridSpy.isInstanceAssigned(FactIdentifier.INDEX)); assertFalse(scenarioGridSpy.isInstanceAssigned(FactIdentifier.EMPTY)); assertTrue(scenarioGridSpy.isInstanceAssigned(factIdentifierGiven)); }
protected boolean isInstanceAssigned(FactIdentifier factIdentifier) { if (FactIdentifier.DESCRIPTION.equals(factIdentifier)) { return true; } else { return !(FactIdentifier.EMPTY.equals(factIdentifier) || FactIdentifier.INDEX.equals(factIdentifier)); } }
ScenarioGrid extends BaseGridWidget { protected boolean isInstanceAssigned(FactIdentifier factIdentifier) { if (FactIdentifier.DESCRIPTION.equals(factIdentifier)) { return true; } else { return !(FactIdentifier.EMPTY.equals(factIdentifier) || FactIdentifier.INDEX.equals(factIdentifier)); } } }
ScenarioGrid extends BaseGridWidget { protected boolean isInstanceAssigned(FactIdentifier factIdentifier) { if (FactIdentifier.DESCRIPTION.equals(factIdentifier)) { return true; } else { return !(FactIdentifier.EMPTY.equals(factIdentifier) || FactIdentifier.INDEX.equals(factIdentifier)); } } ScenarioGrid(AbstractScesimGridModel model,
                        ScenarioGridLayer scenarioGridLayer,
                        ScenarioGridRenderer renderer,
                        ScenarioContextMenuRegistry scenarioContextMenuRegistry); }
ScenarioGrid extends BaseGridWidget { protected boolean isInstanceAssigned(FactIdentifier factIdentifier) { if (FactIdentifier.DESCRIPTION.equals(factIdentifier)) { return true; } else { return !(FactIdentifier.EMPTY.equals(factIdentifier) || FactIdentifier.INDEX.equals(factIdentifier)); } } ScenarioGrid(AbstractScesimGridModel model,
                        ScenarioGridLayer scenarioGridLayer,
                        ScenarioGridRenderer renderer,
                        ScenarioContextMenuRegistry scenarioContextMenuRegistry); void setContent(AbstractScesimModel abstractScesimModel, ScenarioSimulationModel.Type type); GridWidget getGridWidget(); EventBus getEventBus(); void setEventBus(EventBus eventBus); void setDefaultSelectedDataCell(int cellX, int cellY); ScenarioSimulationContext getScenarioSimulationContext(); void setScenarioSimulationContext(ScenarioSimulationContext scenarioSimulationContext); @Override AbstractScesimGridModel getModel(); ScenarioSimulationModel.Type getType(); void clearSelections(); void setSelectedColumn(int columnIndex); void setSelectedColumnAndHeader(int headerRowIndex, int columnIndex); void ensureCellIsSelected(); void setSelectedCell(int rowIndex, int columnIndex); @Override boolean adjustSelection(final SelectionExtension direction, final boolean isShiftKeyDown); }
ScenarioGrid extends BaseGridWidget { protected boolean isInstanceAssigned(FactIdentifier factIdentifier) { if (FactIdentifier.DESCRIPTION.equals(factIdentifier)) { return true; } else { return !(FactIdentifier.EMPTY.equals(factIdentifier) || FactIdentifier.INDEX.equals(factIdentifier)); } } ScenarioGrid(AbstractScesimGridModel model,
                        ScenarioGridLayer scenarioGridLayer,
                        ScenarioGridRenderer renderer,
                        ScenarioContextMenuRegistry scenarioContextMenuRegistry); void setContent(AbstractScesimModel abstractScesimModel, ScenarioSimulationModel.Type type); GridWidget getGridWidget(); EventBus getEventBus(); void setEventBus(EventBus eventBus); void setDefaultSelectedDataCell(int cellX, int cellY); ScenarioSimulationContext getScenarioSimulationContext(); void setScenarioSimulationContext(ScenarioSimulationContext scenarioSimulationContext); @Override AbstractScesimGridModel getModel(); ScenarioSimulationModel.Type getType(); void clearSelections(); void setSelectedColumn(int columnIndex); void setSelectedColumnAndHeader(int headerRowIndex, int columnIndex); void ensureCellIsSelected(); void setSelectedCell(int rowIndex, int columnIndex); @Override boolean adjustSelection(final SelectionExtension direction, final boolean isShiftKeyDown);  }