publicclass ValueBinding extends integration.forms.TestCase
{ /** Creates a new instance of ValueBinding */ public ValueBinding()
{ super( DocumentType.WRITER );
}
/* ------------------------------------------------------------------ */
@Override public String getTestObjectName()
{ return"Form Control Value Binding Test";
}
// insert a table with exactly one cell. The content of this table will be synced with // the content of a form control
XTextDocument textDoc = UnoRuntime.queryInterface( XTextDocument.class, m_document.getDocument() );
XText documentText = textDoc.getText();
XTextCursor textCursor = documentText.createTextCursor();
// create a value binding for the first cell of the table
XValueBinding cellBinding = new TableCellTextBinding( table.getCellByName( "A1" ) ); // and bind it to the control
XBindableValue bindable = UnoRuntime.queryInterface(
XBindableValue.class, textControl
);
bindable.setValueBinding( cellBinding );
// toggle the view to alive mode
m_document.getCurrentView( ).toggleFormDesignMode( );
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.21 Sekunden
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.