private TextBox textBoxEditor(final ValueChangeHandler<String> valueChangeHandler, final String dataType, String fieldName, String initialValue) { final TextBox tb = TextBoxFactory.getTextBox(dataType); tb.setText(initialValue); tb.setTitle(TestScenarioConstants.INSTANCE.ValueFor0(fieldName)); tb.addValueChangeHandler(valueChangeHandler); return tb; }
private static TextBox editableTextBox(final ValueChanged changed, final String dataType, String fieldName, String initialValue) { final TextBox tb = TextBoxFactory.getTextBox(dataType); tb.setText( initialValue ); String m = TestScenarioConstants.INSTANCE.ValueFor0( fieldName ); tb.setTitle( m ); tb.addChangeHandler( new ChangeHandler() { public void onChange(ChangeEvent event) { changed.valueChanged( tb.getText() ); } } ); return tb; }
private TextBox boundTextBox(final CallFieldValue c) { final TextBox box = TextBoxFactory.getTextBox(methodParameter.type); box.setStyleName( "constraint-value-Editor" ); if ( c.value == null ) {
private TextBox boundTextBox( final ActionFieldValue c ) { final TextBox box = TextBoxFactory.getTextBox( methodParameter.getType() ); box.setStyleName( "constraint-value-Editor" ); if ( c.getValue() == null ) {
private Widget literalEditor() { if ( this.readOnly ) { return new SmallLabel( assertValue() ); } //Date picker if ( DataType.TYPE_DATE.equals( value.getType() ) ) { final PopupDatePicker dp = new PopupDatePicker( false ); // Wire up update handler dp.addValueChangeHandler( new ValueChangeHandler<Date>() { public void onValueChange( ValueChangeEvent<Date> event ) { value.setValue( PopupDatePicker.convertToString( event ) ); } } ); dp.setValue( assertValue() ); return dp; } //Default editor for all other literals final TextBox box = TextBoxFactory.getTextBox( value.getType() ); box.setStyleName( "constraint-value-Editor" ); box.addChangeHandler( new ChangeHandler() { public void onChange( ChangeEvent event ) { value.setValue( box.getText() ); executeOnChangeCommand(); makeDirty(); } } ); box.setText( assertValue() ); attachDisplayLengthHandler( box ); return box; }
final TextBox box = TextBoxFactory.getTextBox( DataType.TYPE_STRING ); box.setStyleName( "constraint-value-Editor" ); box.addChangeHandler( new ChangeHandler() { final TextBox box = TextBoxFactory.getTextBox( fieldType ); box.setStyleName( "constraint-value-Editor" ); box.addChangeHandler( new ChangeHandler() {