| Modifier and Type | Class and Description |
|---|---|
| private class | OOoBean.
Helper class to listen on the connection to learn when it dies. |
| Modifier and Type | Field and Description |
|---|---|
| private transient Controller | |
| private transient OfficeDocument | |
| private transient Frame | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private transient OfficeConnection | iConnection
References Deprecated
OfficeConnection is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private int | |
| private int | |
| private int | |
| private transient OOoBean. | |
| private transient com. | |
| private OfficeWindow | xFrameWindow
References Deprecated
OfficeWindow is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private transient com. | |
| private transient com. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | OOoBean(OfficeConnection iConnection)
Deprecated
Clients could use the getOOoConnection to obtain an OfficeConnection
and use it as argument in a constructor for another OOoBean instance.
Constructor for an OOoBean which uses a specific office connection. |
| Modifier and Type | Method and Description |
|---|---|
| protected com. | addArgument(com.
Adds a single argument to an array of arguments. |
| protected void | applyToolVisibilities()
Deprecated
Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars.
Applies all tool visibilities to the real thing. |
| public synchronized void | |
| public synchronized void | |
| public synchronized void | clearDocument(boolean
Not only the document content but also the state of the bean,
like visibility of child components is cleared. bClearStateToo)
Deprecated
There is currently no way to dismiss changes, except for loading
of the unchanged initial document.
Resets this bean to an empty document. |
| private void | |
| public Controller | Returns: a Java class which implements all interfaces which the service com::sun::star::frame::Controller implements. Thus, methods can be called directly without queryInterface. This feature might be implemented by UNO or explicitly coded.returns the com::sun::star::frame::Controller of the bean. |
| public OfficeDocument | Returns: a Java class which implements all interfaces which the service com::sun::star::document::OfficeDocument implements. Thus, methods can be called directly without queryInterface. This feature might be implemented by UNO or explicitly coded.returns the com::sun::star::document::OfficeDocument of the bean. |
| public Frame | Returns: a Java class which implements all interfaces which the service com::sun::star::frame::Frame implements. Thus, methods can be called directly without queryInterface. This feature might be implemented by UNO or explicitly coded.returns the com::sun::star::frame::Frame of the bean. |
| public synchronized com. | |
| public synchronized OfficeConnection | getOOoConnection()
References Deprecated
OfficeConnection is deprecated or references (maybe indirectly) at least one deprecated element.
Returns a connection to an OOo instance. |
| public synchronized com. | |
| public boolean | Returns: True if the menu bar is visible, false if the menu bar is hidden.
Deprecated
Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars.
Returns the visibility of the menu bar. |
| public boolean | isOOoConnected()
Deprecated
This method is not useful in a multithreaded environment. Then
all threads accessing the instance would have to be synchronized in order to
make is method work. It is better to call OOoBean's methods and be prepared
to catch a NoConnectionException.
Returns true if this OOoBean is connected to an OOo instance, false otherwise. |
| public boolean | Returns: True if the main function bar is visible, false if the main function bar is hidden.
Deprecated
Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars.
Returns the visibility of the main function bar. |
| public boolean | Returns: True if the status function bar is visible, false if the status function bar is hidden.
Deprecated
Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars.
Returns the visibility of the status function bar. |
| public boolean | Returns: True if the tool function bar is visible, false if the tool function bar is hidden.
Deprecated
Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars.
Returns the visibility of the tool function bar. |
| public void | loadFromByteArray(final byte[] aInBuffer, final com.
Loads a document from a byte array. |
| public void | loadFromStream(final InputStream iInStream, final com.
Loads a document from a Java stream. |
| public void | loadFromURL(final String aURL, final com.
Loads the bean from the given URL. |
| public void | |
| public void | readExternal(ObjectInput aObjIn)
Implements java.
Deprecated
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
| public synchronized void | releaseSystemWindow()
Deprecated
When Component.removeNotify of the parent window of the actual
office window is called, then the actions are performed for which this method
needed to be called previously.
This method must be called when the OOoBean before the system window may be released by its parent AWT/Swing component. |
| public void | setAllBarsVisible(boolean bVisible)
Deprecated
Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars.
Sets visibility of all tool bars known by this OOoBean version. |
| public void | setMenuBarVisible(boolean
If false, the menu bar is disabled,
If true, the menu bar is visible. bVisible)
Deprecated
Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars.
Sets the visibility of the menu bar. |
| public void | |
| public void | |
| private synchronized void | setOOoConnection(OfficeConnection iNewConnection)
References Deprecated
OfficeConnection is deprecated or references (maybe indirectly) at least one deprecated element.
Sets a connection to an OOo instance. |
| public void | |
| public void | setStandardBarVisible(boolean
If false, the main function bar is disabled,
If true, the main function bar is visible. bVisible)
Deprecated
Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars.
Sets the main function bar visibility. |
| public void | setStatusBarVisible(boolean
If false, the status function bar is disabled,
If true, the status function bar is visible. bVisible)
Deprecated
Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars.
Sets the status function bar visibility. |
| public void | setToolBarVisible(boolean
If false, the tool function bar is disabled,
If true, the tool function bar is visible. bVisible)
Deprecated
Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars.
Sets the tool function bar visibility. |
| protected boolean | setToolVisible(String aProperty, String aResourceURL, boolean bOldValue, boolean
If false, the tool bar is disabled,
If true, the tool bar is visible. bNewValue)
Deprecated
Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars.
Helper method to set tool bar visibility. |
| public void | startOOoConnection(String aConnectionURL)
Starts a connection to an OOo instance which is launched if not running. |
| public synchronized void | |
| public byte[] | storeToByteArray(byte[] aOutBuffer, final com.
Stores a document to a byte array. |
| public OutputStream | storeToStream(OutputStream aOutStream, final com.
Stores a document to a stream. |
| public void | storeToURL(final String aURL, final com.
Stores a document to the given URL. |
| public void | writeExternal(ObjectOutput aObjOut)
Implements java.
Deprecated
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
| aController | back to summary |
|---|---|
| private transient Controller aController | |
| aDocument | back to summary |
|---|---|
| private transient OfficeDocument aDocument | |
| aFrame | back to summary |
|---|---|
| private transient Frame aFrame | |
| bIgnoreVisibility | back to summary |
|---|---|
| private boolean bIgnoreVisibility | |
| bMenuBarVisible | back to summary |
|---|---|
| private boolean bMenuBarVisible | |
| bStandardBarVisible | back to summary |
|---|---|
| private boolean bStandardBarVisible | |
| bStatusBarVisible | back to summary |
|---|---|
| private boolean bStatusBarVisible | |
| bToolBarVisible | back to summary |
|---|---|
| private boolean bToolBarVisible | |
| iConnection | back to summary |
|---|---|
| private transient OfficeConnection iConnection
References Deprecated
See corresponding docs for further information. | |
| nOOoCallTimeOut | back to summary |
|---|---|
| private int nOOoCallTimeOut | |
| nOOoCheckCycle | back to summary |
|---|---|
| private int nOOoCheckCycle | |
| nOOoStartTimeOut | back to summary |
|---|---|
| private int nOOoStartTimeOut | |
| xConnectionListener | back to summary |
|---|---|
| private transient OOoBean. | |
| xDesktop | back to summary |
|---|---|
| private transient com. | |
| xFrameWindow | back to summary |
|---|---|
| private OfficeWindow xFrameWindow
References Deprecated
See corresponding docs for further information. | |
| xServiceFactory | back to summary |
|---|---|
| private transient com. | |
| xURLTransformer | back to summary |
|---|---|
| private transient com. | |
| OOoBean | back to summary |
|---|---|
| public OOoBean() Generic constructor of the OOoBean. Neither a connection is established nor any document loaded. | |
| OOoBean | back to summary |
|---|---|
| public OOoBean(OfficeConnection iConnection) throws NoConnectionException
Deprecated Clients could use the getOOoConnection to obtain an OfficeConnection and use it as argument in a constructor for another OOoBean instance. Calling the dispose method of the OfficeConnection or the OOoBean's stopOOoConnection method would make all instances of OOoBean stop working. Constructor for an OOoBean which uses a specific office connection. The connection must be established but no document is loaded.
| |
| addArgument | back to summary |
|---|---|
| protected com. Adds a single argument to an array of arguments. If the argument by its name is already in aArguments it is exchanged and aArguments is returned. If the argument by its name is not yet in aArguments, a new array is created, aArgument added and the new array returned. | |
| applyToolVisibilities | back to summary |
|---|---|
| protected void applyToolVisibilities()
Deprecated Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars. See also
Applies all tool visibilities to the real thing.
| |
| aquireSystemWindow | back to summary |
|---|---|
| public synchronized void aquireSystemWindow() throws SystemWindowException, NoConnectionException This method causes the office window to be displayed.
If no document is loaded and the instance is added to a Java container that
is showing, then this method needs not to be called. If later one of the methods
Another scenario is that an OOoBean contains a document and is removed from a Java container and later added again. Then aquireSystemWindow needs to be called after the container window is displayed.
| |
| clear | back to summary |
|---|---|
| public synchronized void clear() Resets the OOoBean to an empty status. Any loaded document is unloaded, no matter whether it is modified or not. After calling this method, the OOoBean has no office document and no frame anymore. The connection will stay, though. This method works with or without an established connection. | |
| clearDocument | back to summary |
|---|---|
| public synchronized void clearDocument(boolean bClearStateToo)
Deprecated There is currently no way to dismiss changes, except for loading
of the unchanged initial document. Furthermore it is unclear how derived classes
handle this and what exactly their state is (e.g. what members make up their state).
Calling this method on a derived class requires knowledge about their implementation.
Therefore a deriving class should declare their own clearDocument if needed. Clients
should call the clearDocument of the deriving class or Resets this bean to an empty document. If a document is loaded and the content modified, the changes are dismissed. Otherwise nothing happens. This method is intended to be overridden in derived classes. This implementation simply calls clear.
| |
| dbgPrint | back to summary |
|---|---|
| private void dbgPrint(String aMessage) | |
| getController | back to summary |
|---|---|
| public Controller getController() throws NoConnectionException returns the com::sun::star::frame::Controller of the bean.
| |
| getDocument | back to summary |
|---|---|
| public OfficeDocument getDocument() throws NoConnectionException returns the com::sun::star::document::OfficeDocument of the bean.
| |
| getFrame | back to summary |
|---|---|
| public Frame getFrame() throws NoConnectionException returns the com::sun::star::frame::Frame of the bean.
| |
| getMultiServiceFactory | back to summary |
|---|---|
| public synchronized com. Returns the service factory used by this OOoBean instance.
| |
| getOOoConnection | back to summary |
|---|---|
| public synchronized OfficeConnection getOOoConnection() throws NoConnectionException
References Deprecated
See corresponding docs for further information. Returns a connection to an OOo instance.
If no connection exists, a default connection will be created. An OfficeConnection
can be used to register listeners of type com.sun.star.lang.EventListener,
which are notified when the connection to the office dies. One should not call the
dispose method, because this may result in receiving com.sun.star.lang.DisposedExceptions
when calling
| |
| getOOoDesktop | back to summary |
|---|---|
| public synchronized com. Returns the XDesktop interface of the OOo instance used by this OOoBean.
| |
| isMenuBarVisible | back to summary |
|---|---|
| public boolean isMenuBarVisible()
Deprecated Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars. See also
Returns the visibility of the menu bar. This method works independently from a connection or loaded document. If no connection is established or no document is loaded, this method just returns a memorized status.
| |
| isOOoConnected | back to summary |
|---|---|
| public boolean isOOoConnected()
Deprecated This method is not useful in a multithreaded environment. Then all threads accessing the instance would have to be synchronized in order to make is method work. It is better to call OOoBean's methods and be prepared to catch a NoConnectionException. Returns true if this OOoBean is connected to an OOo instance, false otherwise.
| |
| isStandardBarVisible | back to summary |
|---|---|
| public boolean isStandardBarVisible()
Deprecated Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars. See also
Returns the visibility of the main function bar. This method works independently from a connection or loaded document. If no connection is established or no document is loaded, this method just returns a memorized status.
| |
| isStatusBarVisible | back to summary |
|---|---|
| public boolean isStatusBarVisible()
Deprecated Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars. See also
Returns the visibility of the status function bar. This method works independently from a connection or loaded document. If no connection is established or no document is loaded, this method just returns a memorized status.
| |
| isToolBarVisible | back to summary |
|---|---|
| public boolean isToolBarVisible()
Deprecated Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars. See also
Returns the visibility of the tool function bar. This method works independently from a connection or loaded document. If no connection is established or no document is loaded, this method just returns a memorized status.
| |
| loadFromByteArray | back to summary |
|---|---|
| public void loadFromByteArray(final byte[] aInBuffer, final com. Loads a document from a byte array. See loadFromURL() for further information. | |
| loadFromStream | back to summary |
|---|---|
| public void loadFromStream(final InputStream iInStream, final com. Loads a document from a Java stream. See loadFromURL() for further information. | |
| loadFromURL | back to summary |
|---|---|
| public void loadFromURL(final String aURL, final com. Loads the bean from the given URL. If a document is already loaded and the content modified, the changes are dismissed. If no connection exists, a default connection is established.
| |
| paint | back to summary |
|---|---|
| public void paint(Graphics aGraphics) Overrides java. Doc from java. Deprecated
Paints the container. This forwards the paint to any lightweight components that are children of this container. If this method is reimplemented, super.paint(g) should be called so that lightweight components are properly rendered. If a child component is entirely clipped by the current clipping setting in g, paint() will not be forwarded to that child.
| |
| readExternal | back to summary |
|---|---|
| public void readExternal(ObjectInput aObjIn) Implements java. Doc from java. Deprecated
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.
| |
| releaseSystemWindow | back to summary |
|---|---|
| public synchronized void releaseSystemWindow() throws SystemWindowException, NoConnectionException
Deprecated When Component.removeNotify of the parent window of the actual office window is called, then the actions are performed for which this method needed to be called previously. This method must be called when the OOoBean before the system window may be released by its parent AWT/Swing component. This is the case when java.awt.Component.isDisplayable() returns true. This is definitely the case when the OOoBean is removed from its parent container.
| |
| setAllBarsVisible | back to summary |
|---|---|
| public void setAllBarsVisible(boolean bVisible)
Deprecated Clients should use the service com.sun.star.frame.LayoutManager, which can be obtained from a frame, to control toolbars. For example:
com.sun.star.beans.XPropertySet xPropSet =
(com.sun.star.beans.XPropertySet) UnoRuntime.queryInterface(
com.sun.star.beans.XPropertySet.class, aFrame );
com.sun.star.frame.XLayoutManager xLayoutManager =
(com.sun.star.frame.XLayoutManager) UnoRuntime.queryInterface(
com.sun.star.frame.XLayoutManager.class,
xPropSet.getPropertyValue( "LayoutManager" ) );
xLayoutManager.showElement("private:resource/menubar/menubar");
Sets visibility of all tool bars known by this OOoBean version. Initially all tool bars are visible. By hiding all tool bars utilizing this method, it is possible to turn just a subset of toolbars on afterwards, no matter whether all available tool bars are known or not. If an older OOoBean instance is used with a newer OOo instance, some tool bars might not be affected by this method. If no connection is established or no document is loaded, the setting is memorized until a document is loaded. Same is valid when the connection dies within this function call.
| |
| setMenuBarVisible | back to summary |
|---|---|
| public void setMenuBarVisible(boolean bVisible)
Deprecated Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars. See also
Sets the visibility of the menu bar. Initially the menu bar is visible. If not connected or no document loaded, the value is stored and automatically applied to the document after it is loaded. Same is valid when the connection dies within this function call.
| |
| setOOoCallTimeOut | back to summary |
|---|---|
| public void setOOoCallTimeOut(int nMilliSecs) Sets the timeout for normal OOO methods calls in milliseconds. This method does not need a connection to an OOo instance. | |
| setOOoCheckCycle | back to summary |
|---|---|
| public void setOOoCheckCycle(int nMilliSecs) Sets the period length in milliseconds to check the OOo connection. This method does not need a connection to an OOo instance. | |
| setOOoConnection | back to summary |
|---|---|
| private synchronized void setOOoConnection(OfficeConnection iNewConnection) throws HasConnectionException, NoConnectionException
References Deprecated
See corresponding docs for further information. Sets a connection to an OOo instance. | |
| setOOoStartTimeOut | back to summary |
|---|---|
| public void setOOoStartTimeOut(int nMilliSecs) Sets the timeout for methods which launch OOo in milliseconds. This method does not need a connection to an OOo instance. | |
| setStandardBarVisible | back to summary |
|---|---|
| public void setStandardBarVisible(boolean bVisible)
Deprecated Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars. See also
Sets the main function bar visibility. Initially the standard bar is visible. If not connected or no document loaded, the value is stored and automatically applied to the document after it is loaded. Same is valid when the connection dies within this function call.
| |
| setStatusBarVisible | back to summary |
|---|---|
| public void setStatusBarVisible(boolean bVisible)
Deprecated Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars. See also
Sets the status function bar visibility. Initially the status bar is visible. If not connected or no document loaded, the value is stored and automatically applied to the document after it is loaded. Same is valid when the connection dies within this function call.
| |
| setToolBarVisible | back to summary |
|---|---|
| public void setToolBarVisible(boolean bVisible)
Deprecated Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars. See also
Sets the tool function bar visibility. Initially the tool bar is visible. If not connected or no document loaded, the value is stored and automatically applied to the document after it is loaded. Same is valid when the connection dies within this function call.
| |
| setToolVisible | back to summary |
|---|---|
| protected boolean setToolVisible(String aProperty, String aResourceURL, boolean bOldValue, boolean bNewValue) throws InterruptedException
Deprecated Clients should use the service com.sun.star.frame.LayoutManager,
which can be obtained from a frame, to control toolbars. See also
Helper method to set tool bar visibility.
| |
| startOOoConnection | back to summary |
|---|---|
| public void startOOoConnection(String aConnectionURL) throws MalformedURLException, HasConnectionException, NoConnectionException Starts a connection to an OOo instance which is launched if not running.
| |
| stopOOoConnection | back to summary |
|---|---|
| public synchronized void stopOOoConnection() Disconnects from the connected OOo instance. If there was no connection yet or anymore, this method can be called anyway. When the OOoBean is displayed in an applet by a web browser, then this method must be called from within java.applet.Applet.stop. | |
| storeToByteArray | back to summary |
|---|---|
| public byte[] storeToByteArray(byte[] aOutBuffer, final com. Stores a document to a byte array.
See
| |
| storeToStream | back to summary |
|---|---|
| public OutputStream storeToStream(OutputStream aOutStream, final com. Stores a document to a stream.
See
| |
| storeToURL | back to summary |
|---|---|
| public void storeToURL(final String aURL, final com. Stores a document to the given URL.
Due due a bug (50651) calling this method may cause the office to crash,
when at the same time the office writes a backup of the document. This bug
also affects
java -Dcom.sun.star.officebean.Options=--norestore ...
It is planned to offer a way of specifying startup options in a future version.
The property can be used until then. When using this property only one option
can be provided.
| |
| writeExternal | back to summary |
|---|---|
| public void writeExternal(ObjectOutput aObjOut) Implements java. Doc from java. Deprecated
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | queryTermination(com.
gets called when the user wants to terminate OOo |
| public void |
| aTag | back to summary |
|---|---|
| pack-priv String aTag | |
| EventListener | back to summary |
|---|---|
| pack-priv EventListener(String aTag) throws NoConnectionException | |
| disposing | back to summary |
|---|---|
| public void disposing(com. gets called when the connection dies | |
| end | back to summary |
|---|---|
| public void end() | |
| notifyTermination | back to summary |
|---|---|
| public void notifyTermination(com. gets called when OOo terminates | |
| queryTermination | back to summary |
|---|---|
| public void queryTermination(com. gets called when the user wants to terminate OOo | |
| run | back to summary |
|---|---|
| public void run() Overrides java. Implements java. watching the connection
| |