@Test public void testGeTextBoxForBRLColumn() throws Exception { BRLActionVariableColumn column = mock(BRLActionVariableColumn.class); doReturn("Person").when(column).getFactType(); doReturn("name").when(column).getFactField(); when(oracle.hasEnums("Person", "name")).thenReturn(false); IsWidget widget = factory.getWidget(column, cellValue); assertTrue(widget instanceof TextBox); }
public Widget getWidget(Pattern52 pattern, ConditionCol52 column, DTCellValue52 value) { final boolean isMultipleSelect = isExplicitListOperator(column.getOperator()); if (columnUtilities.hasValueList(column)) { final String[] valueList = columnUtilities.getValueList(column); return makeListBoxForColumn(DropDownData.create(valueList), pattern, column, value, isMultipleSelect); } else if (oracle.hasEnums(pattern.getFactType(), column.getFactField())) { return makeHasEnumsListBox(pattern, column, value, isMultipleSelect, column.getFactField(), pattern.getFactType()); } DataType.DataTypes type = columnUtilities.getTypeSafeType(pattern, column); return makeHasNoValuesAndEnumsWidget(type, value); }
DTCellValueWidgetFactory { public Widget getWidget(Pattern52 pattern, ConditionCol52 column, DTCellValue52 value) { final boolean isMultipleSelect = isExplicitListOperator(column.getOperator()); if (columnUtilities.hasValueList(column)) { final String[] valueList = columnUtilities.getValueList(column); return makeListBoxForColumn(DropDownData.create(valueList), pattern, column, value, isMultipleSelect); } else if (oracle.hasEnums(pattern.getFactType(), column.getFactField())) { return makeHasEnumsListBox(pattern, column, value, isMultipleSelect, column.getFactField(), pattern.getFactType()); } DataType.DataTypes type = columnUtilities.getTypeSafeType(pattern, column); return makeHasNoValuesAndEnumsWidget(type, value); } }
DTCellValueWidgetFactory { public Widget getWidget(Pattern52 pattern, ConditionCol52 column, DTCellValue52 value) { final boolean isMultipleSelect = isExplicitListOperator(column.getOperator()); if (columnUtilities.hasValueList(column)) { final String[] valueList = columnUtilities.getValueList(column); return makeListBoxForColumn(DropDownData.create(valueList), pattern, column, value, isMultipleSelect); } else if (oracle.hasEnums(pattern.getFactType(), column.getFactField())) { return makeHasEnumsListBox(pattern, column, value, isMultipleSelect, column.getFactField(), pattern.getFactType()); } DataType.DataTypes type = columnUtilities.getTypeSafeType(pattern, column); return makeHasNoValuesAndEnumsWidget(type, value); } private  DTCellValueWidgetFactory(GuidedDecisionTable52 model,
                                     AsyncPackageDataModelOracle oracle,
                                     LimitedEntryDropDownManager dropDownManager,
                                     boolean isReadOnly,
                                     boolean allowEmptyValues); }
DTCellValueWidgetFactory { public Widget getWidget(Pattern52 pattern, ConditionCol52 column, DTCellValue52 value) { final boolean isMultipleSelect = isExplicitListOperator(column.getOperator()); if (columnUtilities.hasValueList(column)) { final String[] valueList = columnUtilities.getValueList(column); return makeListBoxForColumn(DropDownData.create(valueList), pattern, column, value, isMultipleSelect); } else if (oracle.hasEnums(pattern.getFactType(), column.getFactField())) { return makeHasEnumsListBox(pattern, column, value, isMultipleSelect, column.getFactField(), pattern.getFactType()); } DataType.DataTypes type = columnUtilities.getTypeSafeType(pattern, column); return makeHasNoValuesAndEnumsWidget(type, value); } private  DTCellValueWidgetFactory(GuidedDecisionTable52 model,
                                     AsyncPackageDataModelOracle oracle,
                                     LimitedEntryDropDownManager dropDownManager,
                                     boolean isReadOnly,
                                     boolean allowEmptyValues); static DTCellValueWidgetFactory getInstance(GuidedDecisionTable52 model,
                                                       AsyncPackageDataModelOracle oracle,
                                                       boolean isReadOnly,
                                                       boolean allowEmptyValues); DTCellValue52 makeNewValue(DTColumnConfig52 c); DTCellValue52 makeNewValue(Pattern52 p,
                                      ConditionCol52 c); Widget getWidget(Pattern52 pattern,
                            ConditionCol52 column,
                            DTCellValue52 value); DTCellValue52 makeNewValue(Pattern52 p,
                                      ActionSetFieldCol52 c); Widget getWidget(Pattern52 pattern,
                            ActionSetFieldCol52 column,
                            DTCellValue52 value); Widget getWidget(ActionInsertFactCol52 column,
                            DTCellValue52 value); IsWidget getWidget(BRLVariableColumn column,
                              DTCellValue52 value); }
DTCellValueWidgetFactory { public Widget getWidget(Pattern52 pattern, ConditionCol52 column, DTCellValue52 value) { final boolean isMultipleSelect = isExplicitListOperator(column.getOperator()); if (columnUtilities.hasValueList(column)) { final String[] valueList = columnUtilities.getValueList(column); return makeListBoxForColumn(DropDownData.create(valueList), pattern, column, value, isMultipleSelect); } else if (oracle.hasEnums(pattern.getFactType(), column.getFactField())) { return makeHasEnumsListBox(pattern, column, value, isMultipleSelect, column.getFactField(), pattern.getFactType()); } DataType.DataTypes type = columnUtilities.getTypeSafeType(pattern, column); return makeHasNoValuesAndEnumsWidget(type, value); } private  DTCellValueWidgetFactory(GuidedDecisionTable52 model,
                                     AsyncPackageDataModelOracle oracle,
                                     LimitedEntryDropDownManager dropDownManager,
                                     boolean isReadOnly,
                                     boolean allowEmptyValues); static DTCellValueWidgetFactory getInstance(GuidedDecisionTable52 model,
                                                       AsyncPackageDataModelOracle oracle,
                                                       boolean isReadOnly,
                                                       boolean allowEmptyValues); DTCellValue52 makeNewValue(DTColumnConfig52 c); DTCellValue52 makeNewValue(Pattern52 p,
                                      ConditionCol52 c); Widget getWidget(Pattern52 pattern,
                            ConditionCol52 column,
                            DTCellValue52 value); DTCellValue52 makeNewValue(Pattern52 p,
                                      ActionSetFieldCol52 c); Widget getWidget(Pattern52 pattern,
                            ActionSetFieldCol52 column,
                            DTCellValue52 value); Widget getWidget(ActionInsertFactCol52 column,
                            DTCellValue52 value); IsWidget getWidget(BRLVariableColumn column,
                              DTCellValue52 value);  }