return xTextComponent;
}
public XButton insertButton(XActionListener _xActionListener, int _nPosX, int _nPosY, int _nWidth, String _sLabel, short _nPushButtonType){
XButton xButton = null;
try{
// create a unique name by means of an own implementation...
String sName = createUniqueName(m_xDlgModelNameContainer, "CommandButton");
// create a controlmodel at the multiservicefactory of the dialog model...
Object oButtonModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlButtonModel");
XMultiPropertySet xButtonMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oButtonModel);
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xButtonMPSet.setPropertyValues(
new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "PushButtonType", "Width" } ,
new Object[] {new Integer(14), _sLabel, sName, new Integer(_nPosX), new Integer(_nPosY), new Short(_nPushButtonType), new Integer(_nWidth)});
// add the model to the NameContainer of the dialog model
m_xDlgModelNameContainer.insertByName(sName, oButtonModel);
XControl xButtonControl = m_xDlgContainer.getControl(sName);
xButton = (XButton) UnoRuntime.queryInterface(XButton.class, xButtonControl);
// An ActionListener will be notified on the activation of the button...
xButton.addActionListener(_xActionListener);
} catch (com.sun.star.uno.Exception ex) {
/* perform individual exception handling here.
* Possible exception types are:
* com.sun.star.lang.IllegalArgumentException,
* com.sun.star.lang.WrappedTargetException,