public class ScenarioSimulationUtils extends Object
Modifier and Type | Field and Description |
---|---|
protected static AtomicInteger |
subGroupCounter |
Modifier and Type | Method and Description |
---|---|
static int |
getCellHeight(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) |
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(boolean isInstanceAssigned,
boolean isPropertyAssigned,
org.drools.scenariosimulation.api.model.FactMappingValueType valueType,
String className)
It provides the correct PlaceHolder value to be assigned to an empty cell given its parameters
status.
|
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 String getPlaceHolder(boolean isInstanceAssigned, boolean isPropertyAssigned, org.drools.scenariosimulation.api.model.FactMappingValueType valueType, String className)
isInstanceAssigned
- isPropertyAssigned
- valueType
- 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
- public static int getCellHeight(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)
protected static double getColumnWidth(String columnId)
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.