private String convertStringValueToString( DTCellValue52 dcv ) { final String value = dcv.getStringValue(); return ( value == null ? "" : value ); }
private boolean updateCellsForOptionValueList( final DTColumnConfig52 editColumn, final DTColumnConfig52 origColumn ) { //If the new column definition has no Value List the existing values remain valid List<String> vals = Arrays.asList( utils.getValueList( editColumn ) ); final boolean clearExistingValues = vals.size() > 0; boolean bUpdateColumnData = false; int iCol = model.getExpandedColumns().indexOf( origColumn ); for ( List<DTCellValue52> row : this.model.getData() ) { if ( !vals.contains( row.get( iCol ).getStringValue() ) ) { bUpdateColumnData = true; } if ( clearExistingValues ) { row.get( iCol ).clearValues(); } } return bUpdateColumnData; }
private TextBox makeTextBox( final DTCellValue52 value ) { TextBox tb = new TextBox(); tb.setValue( value.getStringValue() ); // Wire up update handler tb.setEnabled( !isReadOnly ); if ( !isReadOnly ) { tb.addValueChangeHandler( new ValueChangeHandler<String>() { public void onValueChange( ValueChangeEvent<String> event ) { value.setStringValue( event.getValue() ); } } ); } return tb; }
if ( value != null ) { currentValueMap.put( cc.getFactField(), value.getStringValue() );
return ( shortValue == null ? null : shortValue.toString() ); default: return dcv.getStringValue();
return format.format( cv.getDateValue() ); default: return cv.getStringValue();
private void convertDTCellValueFromString( DataType.DataTypes dataType, DTCellValue52 dcv ) { String text = dcv.getStringValue(); switch ( dataType ) { case BOOLEAN:
private void isRowEquivalent( List<DTCellValue52> row, String[] array ) { assertEquals( row.size(), array.length ); int newRowNum = (Integer) row.get( 0 ).getNumericValue(); int oldRowNum = Integer.valueOf( array[ 0 ] ); assertEquals( newRowNum, oldRowNum ); for ( int iCol = 1; iCol < row.size(); iCol++ ) { DTCellValue52 cell = row.get( iCol ); String v1 = cell.getStringValue(); String v2 = array[ iCol ]; assertTrue( isEqualOrNull( v1, v2 ) ); assertEquals( v1, v2 ); } }
factField, Arrays.asList( allValueList ), realCellValue.getStringValue(), operator ); } else if ( type == null ) { newDetector = new StringConditionDetector( pattern, factField, realCellValue.getStringValue(), operator ); } else if ( type.equals( DataType.TYPE_NUMERIC ) ) {
String currentItem = value.getStringValue(); int selectedIndexOffset = ( allowEmptyValues ? 1 : 0 ); for ( int i = 0; i < completions.length; i++ ) {
private ActionRetractFactCol52 cloneActionRetractColumn( ActionRetractFactCol52 col ) { ActionRetractFactCol52 clone = null; if ( col instanceof LimitedEntryCol ) { clone = new LimitedEntryActionRetractFactCol52(); DTCellValue52 dcv = new DTCellValue52( ( (LimitedEntryCol) col ).getValue().getStringValue() ); ( (LimitedEntryCol) clone ).setValue( dcv ); } else { clone = new ActionRetractFactCol52(); } clone.setHeader( col.getHeader() ); clone.setHideColumn( col.isHideColumn() ); return clone; }
String factType = ( (LimitedEntryActionRetractFactCol52) ac ).getValue().getStringValue(); if ( factType != null && factType.length() > 0 ) { label.append( factType );
break; default: targetCell.setStringValue( sourceCell.getStringValue() );
tsdt.getMetadataCols().get( 0 ).getMetadata() ); assertEquals( "yes", tsdt.getMetadataCols().get( 0 ).getDefaultValue().getStringValue() ); tsdt.getAttributeCols().get( 0 ).getAttribute() ); assertEquals( "66", tsdt.getAttributeCols().get( 0 ).getDefaultValue().getStringValue() ); a4.getFactField() ); assertEquals( "whee", a4.getDefaultValue().getStringValue() ); assertEquals( DataType.TYPE_STRING, a4.getType() ); StringBuilder sb = new StringBuilder(); for ( DTCellValue52 c : tsdt.getData().get( i ) ) { sb.append( c.getStringValue() + ", " ); (Integer) tsdt.getData().get( 0 ).get( 0 ).getNumericValue() ); assertEquals( "desc", tsdt.getData().get( 0 ).get( 1 ).getStringValue() ); assertEquals( "metar1", tsdt.getData().get( 0 ).get( 2 ).getStringValue() ); assertEquals( "saliencer1", tsdt.getData().get( 0 ).get( 3 ).getStringValue() ); assertEquals( "f1c1r1", tsdt.getData().get( 0 ).get( 4 ).getStringValue() ); assertEquals( "f1c2r1", tsdt.getData().get( 0 ).get( 5 ).getStringValue() );
break; default: cell = makeNewStringCellValue( dcv.getStringValue() ); if ( column instanceof AttributeCol52 ) { AttributeCol52 ac = (AttributeCol52) column; if ( ac.getAttribute().equals( RuleAttributeWidget.DIALECT_ATTR ) ) { cell = makeNewDialectCellValue( dcv.getStringValue() );
StringBuilder sb = new StringBuilder(); for ( DTCellValue52 c : tsdt.getData().get( i ) ) { sb.append( c.getStringValue() + ", " ); (Integer) tsdt.getData().get( 0 ).get( 0 ).getNumericValue() ); assertEquals( "desc", tsdt.getData().get( 0 ).get( 1 ).getStringValue() ); assertEquals( "z1c1r1", tsdt.getData().get( 0 ).get( 2 ).getStringValue() ); assertEquals( "z1c2r1", tsdt.getData().get( 0 ).get( 3 ).getStringValue() ); assertEquals( "f1c1r1", tsdt.getData().get( 0 ).get( 4 ).getStringValue() ); assertEquals( "f2c1r1", tsdt.getData().get( 0 ).get( 5 ).getStringValue() ); tsdt.getData().get( 1 ).get( 1 ).getStringValue() ); assertEquals( "z1c1r2", tsdt.getData().get( 1 ).get( 2 ).getStringValue() ); assertEquals( "z1c2r2", tsdt.getData().get( 1 ).get( 3 ).getStringValue() ); assertEquals( "f1c1r2", tsdt.getData().get( 1 ).get( 4 ).getStringValue() ); assertEquals( "f2c1r2", tsdt.getData().get( 1 ).get( 5 ).getStringValue() );
tsdt.getMetadataCols().get( 0 ).getMetadata() ); assertEquals( "yes", tsdt.getMetadataCols().get( 0 ).getDefaultValue().getStringValue() ); tsdt.getAttributeCols().get( 0 ).getAttribute() ); assertEquals( "66", tsdt.getAttributeCols().get( 0 ).getDefaultValue().getStringValue() ); a4.getFactField() ); assertEquals( "whee", a4.getDefaultValue().getStringValue() ); assertEquals( DataType.TYPE_STRING, a4.getType() );
final ListBox patterns = loadBoundFacts( ler.getValue().getStringValue() ); patterns.setEnabled( !isReadOnly ); if ( !isReadOnly ) {
final DTCellValue52 dcv = at.getDefaultValue(); defaultValue.setStyleName( "form-field" ); defaultValue.setText( ( dcv == null ? "" : dcv.getStringValue() ) ); defaultValue.setEnabled( !isReadOnly ); defaultValue.addChangeHandler( new ChangeHandler() {