/** * Check whether empty values are permitted * @return True if empty values are permitted */ protected boolean allowEmptyValues() { return this.model.getTableFormat() == GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY; }
@Override public GuidedDecisionTable52.TableFormat getTableFormat() { return model.getTableFormat(); }
@Override public GuidedDecisionTable52.TableFormat getTableFormat() { return model.getTableFormat(); }
@Override public GuidedDecisionTable52.TableFormat getTableFormat() { return model.getTableFormat(); }
private boolean allowEmptyValues() { return this.model.getTableFormat() == TableFormat.EXTENDED_ENTRY; }
private boolean allowEmptyValues() { return this.model.getTableFormat() == TableFormat.EXTENDED_ENTRY; }
private boolean allowEmptyValues() { return this.model.getTableFormat() == TableFormat.EXTENDED_ENTRY; }
private ActionInsertFactCol52 makeNewActionInsertColumn() { switch ( model.getTableFormat() ) { case LIMITED_ENTRY: return new LimitedEntryActionInsertFactCol52(); default: return new ActionInsertFactCol52(); } }
private BRLActionColumn makeNewActionBRLFragment() { switch ( model.getTableFormat() ) { case LIMITED_ENTRY: return new LimitedEntryBRLActionColumn(); default: return new BRLActionColumn(); } }
private void addColumn( final Pattern52 p, final ConditionCol52 c ) { switch ( model.getTableFormat() ) { case EXTENDED_ENTRY: addExtendedEntryColumn( p, c ); break; case LIMITED_ENTRY: addLimitedEntryColumn( c ); break; } }
private ConditionCol52 makeNewConditionColumn() { switch ( model.getTableFormat() ) { case LIMITED_ENTRY: return new LimitedEntryConditionCol52(); default: return new ConditionCol52(); } }
private ActionSetFieldCol52 makeNewActionSetColumn() { switch ( model.getTableFormat() ) { case LIMITED_ENTRY: return new LimitedEntryActionSetFieldCol52(); default: return new ActionSetFieldCol52(); } }
private BRLConditionColumn makeNewConditionBRLFragment() { switch ( model.getTableFormat() ) { case LIMITED_ENTRY: return new LimitedEntryBRLConditionColumn(); default: return new BRLConditionColumn(); } }
private void addColumn( final ActionSetFieldCol52 a ) { final ColumnValues cv = new ColumnValues( columns, EMPTY_VALUE, model.getTableFormat() == GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY ? a.getDefaultValue() : new DTCellValue52( Boolean.FALSE ) ); cv.setExpandColumn( false ); this.expandedColumns.put( a, cv ); this.columns.add( cv ); }
private void addColumn( final ActionInsertFactCol52 a ) { final ColumnValues cv = new ColumnValues( columns, EMPTY_VALUE, model.getTableFormat() == GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY ? a.getDefaultValue() : new DTCellValue52( Boolean.FALSE ) ); cv.setExpandColumn( false ); this.expandedColumns.put( a, cv ); this.columns.add( cv ); }
private void doValueList() { if ( model.getTableFormat() == TableFormat.LIMITED_ENTRY ) { return; } //Don't show a Value List if either the Fact\Field is empty final String factType = editingCol.getFactType(); final String factField = editingCol.getFactField(); boolean enableValueList = !( ( factType == null || "".equals( factType ) ) || ( factField == null || "".equals( factField ) ) ); //Don't show a Value List if the Fact\Field has an enumeration if ( enableValueList ) { enableValueList = !oracle.hasEnums( factType, factField ); } valueListWidget.setEnabled( enableValueList ); if ( !enableValueList ) { valueListWidget.setText( "" ); } }
private ActionRetractFactCol52 makeNewActionRetractFact() { switch ( model.getTableFormat() ) { case LIMITED_ENTRY: LimitedEntryActionRetractFactCol52 ler = new LimitedEntryActionRetractFactCol52(); ler.setValue( new DTCellValue52( "" ) ); return ler; default: return new ActionRetractFactCol52(); } }
private void doValueList() { if ( model.getTableFormat() == TableFormat.LIMITED_ENTRY ) { return; } //Don't show a Value List if either the Fact\Field is empty final String factType = utils.getBoundFactType( editingCol.getBoundName() ); final String factField = editingCol.getFactField(); boolean enableValueList = !( ( factType == null || "".equals( factType ) ) || ( factField == null || "".equals( factField ) ) ); //Don't show a Value List if the Fact\Field has an enumeration if ( enableValueList ) { enableValueList = !oracle.hasEnums( factType, factField ); } valueListWidget.setEnabled( enableValueList ); if ( !enableValueList ) { valueListWidget.setText( "" ); } }
public static DTCellValueWidgetFactory getInstance( GuidedDecisionTable52 dtable, DataModelOracle oracle, boolean isReadOnly, boolean allowEmptyValues ) { switch ( dtable.getTableFormat() ) { case EXTENDED_ENTRY: return new DTCellValueWidgetFactory( dtable, oracle, new DefaultValueDropDownManager( dtable, oracle ), isReadOnly, allowEmptyValues ); default: return new DTCellValueWidgetFactory( dtable, oracle, new LimitedEntryDropDownManager( dtable, oracle ), isReadOnly, allowEmptyValues ); } }
private void doCalculationType() { if ( model.getTableFormat() == TableFormat.LIMITED_ENTRY ) { return; } //Disable Formula and Predicate if the Fact\Field has enums final String factType = editingPattern.getFactType(); final String factField = editingCol.getFactField(); final boolean hasEnums = oracle.hasEnums( factType, factField ); this.literal.setEnabled( hasEnums || !isReadOnly ); this.formula.setEnabled( !( hasEnums || isReadOnly ) ); this.predicate.setEnabled( !( hasEnums || isReadOnly ) ); //If Fact\Field has enums the Value Type has to be a literal if ( hasEnums ) { this.editingCol.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL ); } }