private void appendHeader( final StringBuilder sb, final ConditionCol52 condition ) { if ( validator.isConditionHeaderValid( condition ) ) { sb.append( "[" ); sb.append( condition.getHeader() ); sb.append( "] " ); } }
public void onClick( ClickEvent w ) { if ( !canConditionBeDeleted( (LimitedEntryBRLConditionColumn) c ) ) { Window.alert( Constants.INSTANCE.UnableToDeleteConditionColumn( c.getHeader() ) ); return; } String cm = Constants.INSTANCE.DeleteConditionColumnWarning( c.getHeader() ); if ( Window.confirm( cm ) ) { dtable.deleteColumn( (LimitedEntryBRLConditionColumn) c ); refreshConditionsWidget(); } } } );
public void onClick( ClickEvent w ) { if ( !canConditionBeDeleted( c ) ) { Window.alert( Constants.INSTANCE.UnableToDeleteConditionColumn( c.getHeader() ) ); return; } String cm = Constants.INSTANCE.DeleteConditionColumnWarning( c.getHeader() ); if ( Window.confirm( cm ) ) { dtable.deleteColumn( c ); refreshConditionsWidget(); } } } );
public void onClick( ClickEvent w ) { if ( !canConditionBeDeleted( (BRLConditionColumn) c ) ) { Window.alert( Constants.INSTANCE.UnableToDeleteConditionColumn( c.getHeader() ) ); return; } String cm = Constants.INSTANCE.DeleteConditionColumnWarning( c.getHeader() ); if ( Window.confirm( cm ) ) { dtable.deleteColumn( (BRLConditionColumn) c ); refreshConditionsWidget(); } } } );
private SmallLabel makeColumnLabel( ConditionCol52 cc ) { StringBuilder sb = new StringBuilder(); if ( cc.isBound() ) { sb.append( cc.getBinding() ); sb.append( " : " ); } sb.append( cc.getHeader() ); SmallLabel label = new SmallLabel( sb.toString() ); if ( cc.isHideColumn() ) { label.setStylePrimaryName( Resources.INSTANCE.css().columnLabelHidden() ); } return label; }
public void onClick( ClickEvent w ) { if ( null == editingCol.getHeader() || "".equals( editingCol.getHeader() ) ) { Window.alert( Constants.INSTANCE.YouMustEnterAColumnHeaderValueDescription() ); return; if ( !unique( editingCol.getHeader() ) ) { Window.alert( Constants.INSTANCE.ThatColumnNameIsAlreadyInUsePleasePickAnother() ); return; if ( !col.getHeader().equals( editingCol.getHeader() ) ) { if ( !unique( editingCol.getHeader() ) ) { Window.alert( Constants.INSTANCE.ThatColumnNameIsAlreadyInUsePleasePickAnother() ); return;
private void populateModelColumn( final ConditionCol52 col, final ConditionCol52 editingCol ) { col.setConstraintValueType( editingCol.getConstraintValueType() ); col.setFactField( editingCol.getFactField() ); col.setFieldType( editingCol.getFieldType() ); col.setHeader( editingCol.getHeader() ); col.setOperator( editingCol.getOperator() ); col.setValueList( editingCol.getValueList() ); col.setDefaultValue( editingCol.getDefaultValue() ); col.setHideColumn( editingCol.isHideColumn() ); col.setParameters( editingCol.getParameters() ); col.setBinding( editingCol.getBinding() ); if ( col instanceof LimitedEntryCol && editingCol instanceof LimitedEntryCol ) { ( (LimitedEntryCol) col ).setValue( ( (LimitedEntryCol) editingCol ).getValue() ); } }
tsdt.getPattern( tsdt.getConditionPattern( "z1" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Driver z1 age", tsdt.getConditionPattern( "z1" ).getChildColumns().get( 0 ).getHeader() ); assertEquals( "==", tsdt.getConditionPattern( "z1" ).getChildColumns().get( 0 ).getOperator() ); tsdt.getPattern( tsdt.getConditionPattern( "z1" ).getChildColumns().get( 1 ) ).getFactType() ); assertEquals( "Driver rating", tsdt.getConditionPattern( "z1" ).getChildColumns().get( 1 ).getHeader() ); assertEquals( "==", tsdt.getConditionPattern( "z1" ).getChildColumns().get( 1 ).getOperator() ); tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Person f1 name", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getHeader() ); assertEquals( "==", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getOperator() ); tsdt.getPattern( tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Person2 f2 not needed", tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getHeader() ); assertEquals( null, tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getOperator() );
tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Driver f1 age", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getHeader() ); assertEquals( "==", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getOperator() ); tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ) ).getFactType() ); assertEquals( "Driver rating", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ).getHeader() ); assertEquals( "==", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ).getOperator() ); tsdt.getPattern( tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Person f2 name", tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getHeader() ); assertEquals( "==", tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getOperator() ); tsdt.getPattern( tsdt.getConditionPattern( "f2" ).getChildColumns().get( 1 ) ).getFactType() ); assertEquals( "Person f2 not needed", tsdt.getConditionPattern( "f2" ).getChildColumns().get( 1 ).getHeader() ); assertEquals( null, tsdt.getConditionPattern( "f2" ).getChildColumns().get( 1 ).getOperator() );
header.append( " : " ); header.append( cc.getHeader() ); tce.appendChild( makeLabel( header.toString(), width,
tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Driver f1 age", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getHeader() ); assertEquals( "==", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 0 ).getOperator() ); tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ) ).getFactType() ); assertEquals( "Driver f1 name", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ).getHeader() ); assertEquals( "==", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 1 ).getOperator() ); tsdt.getPattern( tsdt.getConditionPattern( "f1" ).getChildColumns().get( 2 ) ).getFactType() ); assertEquals( "Driver rating", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 2 ).getHeader() ); assertEquals( "==", tsdt.getConditionPattern( "f1" ).getChildColumns().get( 2 ).getOperator() ); tsdt.getPattern( tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ) ).getFactType() ); assertEquals( "Driver 2 pimp", tsdt.getConditionPattern( "f2" ).getChildColumns().get( 0 ).getHeader() );
private ConditionCol52 cloneConditionColumn( ConditionCol52 col ) { ConditionCol52 clone = null; if ( col instanceof LimitedEntryConditionCol52 ) { clone = new LimitedEntryConditionCol52(); DTCellValue52 dcv = cloneLimitedEntryValue( ( (LimitedEntryCol) col ).getValue() ); ( (LimitedEntryCol) clone ).setValue( dcv ); } else { clone = new ConditionCol52(); } clone.setConstraintValueType( col.getConstraintValueType() ); clone.setFactField( col.getFactField() ); clone.setFieldType( col.getFieldType() ); clone.setHeader( col.getHeader() ); clone.setOperator( col.getOperator() ); clone.setValueList( col.getValueList() ); clone.setDefaultValue( new DTCellValue52( col.getDefaultValue() ) ); clone.setHideColumn( col.isHideColumn() ); clone.setParameters( col.getParameters() ); clone.setWidth( col.getWidth() ); clone.setBinding( col.getBinding() ); return clone; }
txtColumnHeader.setText( chosenConditionsSelection.getHeader() );
header.setText( col.getHeader() ); header.setEnabled( !isReadOnly ); if ( !isReadOnly ) {