public class ScenarioSimulationUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static AtomicInteger |
subGroupCounter |
| Constructor and Description |
|---|
ScenarioSimulationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getColumnSubGroup(String columnGroup)
Given a columnGroup, it creates a new subGroup with the following format: 'columnGroupName-x'.
|
protected static double |
getColumnWidth(String columnId) |
static ScenarioSimulationBuilders.HeaderBuilder |
getHeaderBuilder(String instanceTitle,
String propertyTitle,
String columnId,
String columnGroup,
org.drools.scenariosimulation.api.model.FactMappingType factMappingType,
ScenarioHeaderTextBoxSingletonDOMElementFactory factoryHeader)
Retrieve a single or triple level Header metadata, i.e. a
List<GridColumn.HeaderMetaData> with one or three elements,
depending on the column Group:
OTHER: single level
EXPECT/GIVEN: triple level
|
static com.ait.lienzo.client.core.types.Point2D |
getMiddleXYCell(org.uberfire.ext.wires.core.grids.client.widget.grid.GridWidget gridWidget,
org.uberfire.ext.wires.core.grids.client.model.GridColumn<?> column,
boolean isHeader,
int uiRowIndex,
org.uberfire.ext.wires.core.grids.client.widget.layer.GridLayer gridLayer)
Returns an array where the 0-element is middle x of given cell and 1-element is middle y
|
static String |
getOriginalColumnGroup(String columnGroup)
Given a columnGroup, it returns the original group name, removing the the subgroup part (added in
getColumnSubGroup with the following format: 'columnGroupName-x' |
static String |
getPlaceholder(String canonicalClassName) |
static List<String> |
getPropertyNameElementsWithoutAlias(List<String> propertyNameElements,
org.drools.scenariosimulation.api.model.FactIdentifier factIdentifier)
Method to retrieve a new
List of property name elements where the first one is the
the actual class name (i.e. an eventual alias get replaced) |
static ScenarioGridColumn |
getScenarioGridColumn(ScenarioSimulationBuilders.HeaderBuilder headerBuilder,
ScenarioCellTextAreaSingletonDOMElementFactory factoryCell,
String placeHolder)
Returns a
ScenarioGridColumn with the following default values:
width: 150
isMovable: false;
columnRenderer: new ScenarioGridColumnRenderer()
|
static ScenarioGridColumn |
getScenarioGridColumn(String instanceTitle,
String propertyTitle,
String columnId,
String columnGroup,
org.drools.scenariosimulation.api.model.FactMappingType factMappingType,
ScenarioHeaderTextBoxSingletonDOMElementFactory factoryHeader,
ScenarioCellTextAreaSingletonDOMElementFactory factoryCell,
String placeHolder)
Returns a
ScenarioGridColumn with the following default values:
width: 150
isMovable: false;
isPropertyAssigned: false;
columnRenderer: new ScenarioGridColumnRenderer()
|
static ScenarioSimulationBuilders.ScenarioGridColumnBuilder |
getScenarioGridColumnBuilder(ScenarioCellTextAreaSingletonDOMElementFactory factoryCell,
ScenarioSimulationBuilders.HeaderBuilder headerBuilder,
String placeHolder)
Returns a
ScenarioSimulationBuilders.ScenarioGridColumnBuilder with the following default values:
width: 150
isMovable: false;
isPropertyAssigned: false;
columnRenderer: new ScenarioGridColumnRenderer()
|
static boolean |
isSimpleJavaType(String className)
This method can be used ONLY when managing a RULE type Test Scenario.
|
protected static AtomicInteger subGroupCounter
public static String getColumnSubGroup(String columnGroup)
columnGroup - public static String getOriginalColumnGroup(String columnGroup)
getColumnSubGroup with the following format: 'columnGroupName-x'columnGroup - public static boolean isSimpleJavaType(String className)
className - public static List<String> getPropertyNameElementsWithoutAlias(List<String> propertyNameElements, org.drools.scenariosimulation.api.model.FactIdentifier factIdentifier)
List of property name elements where the first one is the
the actual class name (i.e. an eventual alias get replaced)propertyNameElements - factIdentifier - public static ScenarioGridColumn getScenarioGridColumn(String instanceTitle, String propertyTitle, String columnId, String columnGroup, org.drools.scenariosimulation.api.model.FactMappingType factMappingType, ScenarioHeaderTextBoxSingletonDOMElementFactory factoryHeader, ScenarioCellTextAreaSingletonDOMElementFactory factoryCell, String placeHolder)
ScenarioGridColumn with the following default values:
width: 150
isMovable: false;
isPropertyAssigned: false;
columnRenderer: new ScenarioGridColumnRenderer()
instanceTitle - propertyTitle - columnId - columnGroup - factMappingType - factoryHeader - factoryCell - placeHolder - public static ScenarioGridColumn getScenarioGridColumn(ScenarioSimulationBuilders.HeaderBuilder headerBuilder, ScenarioCellTextAreaSingletonDOMElementFactory factoryCell, String placeHolder)
ScenarioGridColumn with the following default values:
width: 150
isMovable: false;
columnRenderer: new ScenarioGridColumnRenderer()
headerBuilder - factoryCell - placeHolder - public static ScenarioSimulationBuilders.ScenarioGridColumnBuilder getScenarioGridColumnBuilder(ScenarioCellTextAreaSingletonDOMElementFactory factoryCell, ScenarioSimulationBuilders.HeaderBuilder headerBuilder, String placeHolder)
ScenarioSimulationBuilders.ScenarioGridColumnBuilder with the following default values:
width: 150
isMovable: false;
isPropertyAssigned: false;
columnRenderer: new ScenarioGridColumnRenderer()
factoryCell - headerBuilder - placeHolder - public static ScenarioSimulationBuilders.HeaderBuilder getHeaderBuilder(String instanceTitle, String propertyTitle, String columnId, String columnGroup, org.drools.scenariosimulation.api.model.FactMappingType factMappingType, ScenarioHeaderTextBoxSingletonDOMElementFactory factoryHeader)
List<GridColumn.HeaderMetaData> with one or three elements,
depending on the column Group:
OTHER: single level
EXPECT/GIVEN: triple level
instanceTitle - propertyTitle - columnId - columnGroup - factMappingType - factoryHeader - public static com.ait.lienzo.client.core.types.Point2D getMiddleXYCell(org.uberfire.ext.wires.core.grids.client.widget.grid.GridWidget gridWidget,
org.uberfire.ext.wires.core.grids.client.model.GridColumn<?> column,
boolean isHeader,
int uiRowIndex,
org.uberfire.ext.wires.core.grids.client.widget.layer.GridLayer gridLayer)
gridWidget - column - isHeader - uiRowIndex - gridLayer - protected static double getColumnWidth(String columnId)
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.