// add all interfaces for the given object to the tree under the node parent
private void addInterfacesToTree( Object a,
DefaultMutableTreeNode parent ) {
try {
// get the type provider for the given object
XTypeProvider xTypeProvider = ( XTypeProvider ) UnoRuntime.queryInterface( XTypeProvider.class, a );
if ( xTypeProvider != null ) {
// get all interfaces
Type[] type = xTypeProvider.getTypes();
for ( int m = 0; m < type.length; m++ ) {
// create a node for the current interface and add it to the tree
DefaultMutableTreeNode child = new DefaultMutableTreeNode( type[ m ].getTypeName() );
//DefaultMutableTreeNode child = new DefaultMutableTreeNode( com.sun.star.lib.uno.typedesc.TypeDescription.getTypeDescription( type[ m ] ).getTypeName() );