public String toString() { return FormulaUtil.quoteReference(name); }
public String toString() { return FormulaUtil.quoteReference( name ); }
/** * This method gets called when a bound property is changed. * * @param evt A PropertyChangeEvent object describing the event source and the property that has changed. */ public void propertyChange( final PropertyChangeEvent evt ) { final FieldDefinition value = (FieldDefinition) evt.getNewValue(); final String text = FormulaUtil.quoteReference( value.getName() ); insertText( text ); } }
@Override public void propertyChange( final PropertyChangeEvent evt ) { final FieldDefinition value = (FieldDefinition) evt.getNewValue(); //noinspection MagicCharacter,StringConcatenation if ( value != null ) { final String text = FormulaUtil.quoteReference( value.getName() ); final String parameterValue = getParameterValue( paramIndex ); final TextFieldHolderStruct fieldStruct = getParameterField( paramIndex ); final InlineEditTextField field = fieldStruct.getTextFields(); final StringBuilder b = new StringBuilder( parameterValue ); // remove the selected content, if any b.delete( field.getSelectionStart(), field.getSelectionEnd() ); // then insert the new content at the cursor position final int caretPosition = field.getCaretPosition(); b.insert( caretPosition, text ); fieldStruct.setText( b.toString() ); } } }
for ( int i = 0; i < definitions.length; i++ ) { final FieldDefinition fieldDefinition = definitions[ i ]; comboBoxModel.addElement( "=" + FormulaUtil.quoteReference( fieldDefinition.getName() ) );
return new TypeValuePair( TextType.TYPE, FormulaUtil.quoteString( textResult ) ); } else if ( encodingResult.equals( "formula-reference" ) ) { return new TypeValuePair( TextType.TYPE, FormulaUtil.quoteReference( textResult ) ); } else { // javascript return new TypeValuePair( TextType.TYPE, saveConvert( textResult ) );