zaphod Power User


Joined: 04 Nov 2004 Posts: 51 Location: Magdeburg, Germany
|
Posted: Fri Jan 06, 2006 3:09 am Post subject: |
|
|
I guess something like that:
First get all opened components: | Code: | XComponentContext ctx = bootstrapContext();
XDesktop desk = getDesktop(ctx);
com.sun.star.container.XEnumeration enum = desk.getComponents().createEnumeration();
|
Iterate through them via nextElement() method, until you find the appropriate component. (E.g check the Title, document type, URL or whatever via mediadescriptor). Then get the frame of the component and set it acitive:
| Code: | XModel xModel = (XModel) UnoRuntime.queryInterface( XModel.class, xCompo)
xModel.getCurrentController().getFrame().activate(); |
I hope this was, what you meant. |
|