private ListBox loadPatterns() { Set<String> vars = new HashSet<String>(); ListBox patterns = new ListBox(); for ( Object o : model.getActionCols() ) { ActionCol52 col = (ActionCol52) o; if ( col instanceof ActionInsertFactCol52 ) { ActionInsertFactCol52 c = (ActionInsertFactCol52) col; if ( !vars.contains( c.getBoundName() ) ) { patterns.addItem( c.getFactType() + " [" + c.getBoundName() + "]", c.getFactType() + " " + c.getBoundName() ); vars.add( c.getBoundName() ); } } } return patterns; }
private ListBox loadPatterns() { Set<String> vars = new HashSet<String>(); ListBox patterns = new ListBox(); for ( Object o : model.getActionCols() ) { ActionCol52 col = (ActionCol52) o; if ( col instanceof ActionInsertFactCol52 ) { ActionInsertFactCol52 c = (ActionInsertFactCol52) col; if ( !vars.contains( c.getBoundName() ) ) { patterns.addItem( c.getFactType() + " [" + c.getBoundName() + "]", c.getFactType() + " " + c.getBoundName() ); vars.add( c.getBoundName() ); } } } return patterns; }
public InsertFactActionDetectorKey( ActionInsertFactCol52 actionCol ) { super( actionCol ); this.factType = actionCol.getFactType(); this.boundName = actionCol.getBoundName(); this.factField = actionCol.getFactField(); }
private void doPatternLabel() { if ( this.editingCol.getFactType() != null ) { this.patternLabel.setText( this.editingCol.getFactType() + " [" + editingCol.getBoundName() + "]" ); } }
public void onClick( ClickEvent arg0 ) { if ( oracle.isGlobalVariable( editingCol.getBoundName() ) ) { cb.setEnabled( false ); editingCol.setInsertLogical( false ); } else { editingCol.setInsertLogical( cb.getValue() ); } } } );
final String binding = baseActionColumn.getBoundName(); for ( ActionCol52 ac : this.model.getActionCols() ) { if ( ac instanceof ActionInsertFactCol52 ) { final ActionInsertFactCol52 aif = (ActionInsertFactCol52) ac; if ( aif.getBoundName().equals( binding ) ) { currentValueMap.put( aif.getFactField(), getValue( aif ) );
final String binding = baseActionColumn.getBoundName(); for ( ActionCol52 ac : this.model.getActionCols() ) { if ( ac instanceof ActionInsertFactCol52 ) { final ActionInsertFactCol52 aif = (ActionInsertFactCol52) ac; if ( aif.getBoundName().equals( binding ) ) { if ( aif instanceof LimitedEntryCol ) { currentValueMap.put( aif.getFactField(),
final String binding = baseActionColumn.getBoundName(); for ( ActionCol52 ac : this.model.getActionCols() ) { if ( ac instanceof ActionInsertFactCol52 ) { final ActionInsertFactCol52 aif = (ActionInsertFactCol52) ac; if ( aif.getBoundName().equals( binding ) ) { if ( oracle.isDependentEnum( baseActionColumn.getFactType(), baseActionColumn.getFactField(),
@Override public void initialise() { view.init( this ); view.setValidator( getValidator() ); patternToActionsMap.clear(); //Set-up validator for the pattern-to-action mapping voodoo getValidator().setPatternToActionInsertFactFieldsMap( patternToActionsMap ); //Set-up a factory for value editors view.setDTCellValueWidgetFactory( DTCellValueWidgetFactory.getInstance( model, oracle, false, allowEmptyValues() ) ); //Available types final List<String> availableTypes = Arrays.asList( oracle.getFactTypes() ); view.setAvailableFactTypes( availableTypes ); //Existing ActionInsertFactCols (should be empty for a new Decision Table) for ( ActionCol52 a : model.getActionCols() ) { if ( a instanceof ActionInsertFactCol52 ) { final ActionInsertFactCol52 aif = (ActionInsertFactCol52) a; final ActionInsertFactFieldsPattern p = lookupExistingInsertFactPattern( aif.getBoundName() ); final List<ActionInsertFactCol52> actions = patternToActionsMap.get( p ); getValidator().addActionPattern( p ); actions.add( aif ); } } view.setChosenPatterns( new ArrayList<ActionInsertFactFieldsPattern>() ); view.setAvailableFields( new ArrayList<AvailableField>() ); view.setChosenFields( new ArrayList<ActionInsertFactCol52>() ); content.setWidget( view ); }
final String binding = baseActionColumn.getBoundName(); for ( ActionCol52 ac : this.model.getActionCols() ) { if ( ac instanceof ActionInsertFactCol52 ) { final ActionInsertFactCol52 aif = (ActionInsertFactCol52) ac; if ( aif.getBoundName().equals( binding ) ) { if ( oracle.isDependentEnum( baseActionColumn.getFactType(), baseActionColumn.getFactField(),
final String binding = baseActionColumn.getBoundName(); for ( ActionCol52 ac : this.model.getActionCols() ) { if ( ac instanceof ActionInsertFactCol52 ) { final ActionInsertFactCol52 aif = (ActionInsertFactCol52) ac; if ( aif.getBoundName().equals( binding ) ) { final int iCol = allColumns.indexOf( aif ); currentValueMap.put( aif.getFactField(),
ActionInsertFactCol52 aifc = (ActionInsertFactCol52) ac; String factType = aifc.getFactType(); String binding = aifc.getBoundName(); if ( factType != null && factType.length() > 0 ) { label.append( factType );
if ( !isEqualOrNull( origColumn.getBoundName(), editColumn.getBoundName() ) ) { if ( !isEqualOrNull( origColumn.getFactType(), editColumn.getFactType() )
private void populateModelColumn( final ActionInsertFactCol52 col, final ActionInsertFactCol52 editingCol ) { col.setBoundName( editingCol.getBoundName() ); col.setType( editingCol.getType() ); col.setFactField( editingCol.getFactField() ); col.setHeader( editingCol.getHeader() ); col.setValueList( editingCol.getValueList() ); col.setDefaultValue( editingCol.getDefaultValue() ); col.setHideColumn( editingCol.isHideColumn() ); col.setFactType( editingCol.getFactType() ); col.setInsertLogical( editingCol.isInsertLogical() ); if ( col instanceof LimitedEntryCol && editingCol instanceof LimitedEntryCol ) { ( (LimitedEntryCol) col ).setValue( ( (LimitedEntryCol) editingCol ).getValue() ); } }
private ActionInsertFactCol52 cloneActionInsertColumn( ActionInsertFactCol52 col ) { ActionInsertFactCol52 clone = null; if ( col instanceof LimitedEntryActionInsertFactCol52 ) { clone = new LimitedEntryActionInsertFactCol52(); DTCellValue52 dcv = cloneLimitedEntryValue( ( (LimitedEntryCol) col ).getValue() ); ( (LimitedEntryCol) clone ).setValue( dcv ); } else { clone = new ActionInsertFactCol52(); } clone.setBoundName( col.getBoundName() ); clone.setType( col.getType() ); clone.setFactField( col.getFactField() ); clone.setFactType( col.getFactType() ); clone.setHeader( col.getHeader() ); clone.setValueList( col.getValueList() ); clone.setDefaultValue( new DTCellValue52( col.getDefaultValue() ) ); clone.setHideColumn( col.isHideColumn() ); clone.setInsertLogical( col.isInsertLogical() ); return clone; }
a1.getBoundName() ); assertEquals( "Cheese", a1.getFactType() );
a1.getBoundName() ); assertEquals( "Cheese", a1.getFactType() );