Difference between revisions of "Documentation/DevGuide/JavaBean/OfficeConnection Interface"
OOoWikiBot (Talk | contribs) m (FINAL VERSION FOR L10N) |
|||
Line 7: | Line 7: | ||
{{Documentation/DevGuideLanguages|Documentation/DevGuide/JavaBean/{{SUBPAGENAME}}}} | {{Documentation/DevGuideLanguages|Documentation/DevGuide/JavaBean/{{SUBPAGENAME}}}} | ||
{{DISPLAYTITLE:OfficeConnection Interface}} | {{DISPLAYTITLE:OfficeConnection Interface}} | ||
− | The <code>com.sun.star.comp.beans.OfficeConnection</code> interface contains the methods used to configure, initiate,and manage the connection to {{ | + | The <code>com.sun.star.comp.beans.OfficeConnection</code> interface contains the methods used to configure, initiate,and manage the connection to {{AOo}}. These methods are: |
− | + | <syntaxhighlight lang="java"> | |
public void setUnoUrl(String URL) throws java.net.MalformedURLException | public void setUnoUrl(String URL) throws java.net.MalformedURLException | ||
public com.sun.star.uno.XComponentContext getComponentContext() | public com.sun.star.uno.XComponentContext getComponentContext() | ||
public OfficeWindow createOfficeWindow(Container container) | public OfficeWindow createOfficeWindow(Container container) | ||
public void setContainerFactory(ContainerFactory containerFactory) | public void setContainerFactory(ContainerFactory containerFactory) | ||
− | + | </syntaxhighlight> | |
− | The client uses <code>setUnoUrl()</code> to specify to the Office Bean how it connects to the {{ | + | The client uses <code>setUnoUrl()</code> to specify to the Office Bean how it connects to the {{AOo}} process. See the section [[Documentation/DevGuide/JavaBean/Configuring the Office Bean|Configuring the Office Bean]] for a description of the syntax of the URL. A <code>java.net.MalformedURLException</code> is thrown by the concrete implementation if the client passes a badly formed URL as an argument. |
− | The method <code>getComponentContext()</code> gets an object that implements the <idl>com.sun.star.uno.XComponentContext</idl> interface from the Office Bean. This object is then used to obtain objects implementing the full {{ | + | The method <code>getComponentContext()</code> gets an object that implements the <idl>com.sun.star.uno.XComponentContext</idl> interface from the Office Bean. This object is then used to obtain objects implementing the full {{AOo}} API from the backend {{AOo}} process. |
A call to <code>createOfficeWindow()</code> requests a new <code>OfficeWindow</code> from the <code>OfficeConnection</code>. The client obtains the <code>java.awt.Component</code> from the <code>OfficeWindow</code> to plug into its UI. See the <code>getAWTComponent()</code> method below on how to obtain the Component from the <code>OfficeWindow</code>. The client provides <code>java.awt.Container</code> that indicates to the implementation what kind of <code>OfficeWindow</code> it is to create. | A call to <code>createOfficeWindow()</code> requests a new <code>OfficeWindow</code> from the <code>OfficeConnection</code>. The client obtains the <code>java.awt.Component</code> from the <code>OfficeWindow</code> to plug into its UI. See the <code>getAWTComponent()</code> method below on how to obtain the Component from the <code>OfficeWindow</code>. The client provides <code>java.awt.Container</code> that indicates to the implementation what kind of <code>OfficeWindow</code> it is to create. |
Latest revision as of 17:35, 21 December 2020
- The Internal Office Bean API
- OfficeConnection Interface
- OfficeWindow Interface
- ContainerFactory Interface
- LocalOfficeConnection and LocalOfficeWindow
The com.sun.star.comp.beans.OfficeConnection
interface contains the methods used to configure, initiate,and manage the connection to Apache OpenOffice. These methods are:
public void setUnoUrl(String URL) throws java.net.MalformedURLException public com.sun.star.uno.XComponentContext getComponentContext() public OfficeWindow createOfficeWindow(Container container) public void setContainerFactory(ContainerFactory containerFactory)
The client uses setUnoUrl()
to specify to the Office Bean how it connects to the Apache OpenOffice process. See the section Configuring the Office Bean for a description of the syntax of the URL. A java.net.MalformedURLException
is thrown by the concrete implementation if the client passes a badly formed URL as an argument.
The method getComponentContext()
gets an object that implements the com.sun.star.uno.XComponentContext interface from the Office Bean. This object is then used to obtain objects implementing the full Apache OpenOffice API from the backend Apache OpenOffice process.
A call to createOfficeWindow()
requests a new OfficeWindow
from the OfficeConnection
. The client obtains the java.awt.Component
from the OfficeWindow
to plug into its UI. See the getAWTComponent()
method below on how to obtain the Component from the OfficeWindow
. The client provides java.awt.Container
that indicates to the implementation what kind of OfficeWindow
it is to create.
The method setContainerFactory()
specifies to the Office Bean the factory object it uses to create Java AWT windows to display popup windows in the Java environment. This factory object implements the com.sun.star.comp.beans.ContainerFactory
interface. See below for a definition of the ContainerFactory
interface.
If the client does not implement its own ContainerFactory
interface, the Office Bean uses its own default ContainerFactory
creating instances of java.awt.Canvas
.
Content on this page is licensed under the Public Documentation License (PDL). |