// create a unique name by means of an own implementation...
String sName = createUniqueName(m_xDlgModelNameContainer, "FixedLine");
// create a controlmodel at the multiservicefactory of the dialog model...
Object oFLModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedLineModel");
XMultiPropertySet xFLModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oFLModel);
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xFLModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "Orientation", "PositionX", "PositionY", "Width"},
new Object[] { new Integer(8), sName, new Integer(0), new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oFLModel);