Class OOoBean

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Externalizable, java.io.Serializable

    public class OOoBean
    extends java.awt.Container
    implements java.io.Externalizable
    This is the basic JavaBean for all OOo application modules.
    Since:
    OOo 2.0.0
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Constructor Summary

      Constructors 
      Constructor Description
      OOoBean()
      Generic constructor of the OOoBean.
      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.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected com.sun.star.beans.PropertyValue[] addArgument​(com.sun.star.beans.PropertyValue[] aArguments, com.sun.star.beans.PropertyValue aArgument)
      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.
      void aquireSystemWindow()
      This method causes the office window to be displayed.
      void clear()
      Resets the OOoBean to an empty status.
      void clearDocument​(boolean bClearStateToo)
      Deprecated.
      There is currently no way to dismiss changes, except for loading of the unchanged initial document.
      Controller getController()
      returns the com::sun::star::frame::Controller of the bean.
      OfficeDocument getDocument()
      returns the com::sun::star::document::OfficeDocument of the bean.
      Frame getFrame()
      returns the com::sun::star::frame::Frame of the bean.
      com.sun.star.lang.XMultiServiceFactory getMultiServiceFactory()
      Returns the service factory used by this OOoBean instance.
      OfficeConnection getOOoConnection()
      Returns a connection to an OOo instance.
      com.sun.star.frame.XDesktop getOOoDesktop()
      Returns the XDesktop interface of the OOo instance used by this OOoBean.
      boolean isMenuBarVisible()
      Deprecated.
      Clients should use the service com.sun.star.frame.LayoutManager, which can be obtained from a frame, to control toolbars.
      boolean isOOoConnected()
      Deprecated.
      This method is not useful in a multithreaded environment.
      boolean isStandardBarVisible()
      Deprecated.
      Clients should use the service com.sun.star.frame.LayoutManager, which can be obtained from a frame, to control toolbars.
      boolean isStatusBarVisible()
      Deprecated.
      Clients should use the service com.sun.star.frame.LayoutManager, which can be obtained from a frame, to control toolbars.
      boolean isToolBarVisible()
      Deprecated.
      Clients should use the service com.sun.star.frame.LayoutManager, which can be obtained from a frame, to control toolbars.
      void loadFromByteArray​(byte[] aInBuffer, com.sun.star.beans.PropertyValue[] aArguments)
      Loads a document from a byte array.
      void loadFromStream​(java.io.InputStream iInStream, com.sun.star.beans.PropertyValue[] aArguments)
      Loads a document from a Java stream.
      void loadFromURL​(java.lang.String aURL, com.sun.star.beans.PropertyValue[] aArguments)
      Loads the bean from the given URL.
      void paint​(java.awt.Graphics aGraphics)
      Deprecated.
      void readExternal​(java.io.ObjectInput aObjIn)
      Deprecated.
      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.
      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.
      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.
      void setOOoCallTimeOut​(int nMilliSecs)
      Sets the timeout for normal OOO methods calls in milliseconds.
      void setOOoCheckCycle​(int nMilliSecs)
      Sets the period length in milliseconds to check the OOo connection.
      void setOOoStartTimeOut​(int nMilliSecs)
      Sets the timeout for methods which launch OOo in milliseconds.
      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.
      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.
      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.
      protected boolean setToolVisible​(java.lang.String aProperty, java.lang.String aResourceURL, boolean bOldValue, boolean bNewValue)
      Deprecated.
      Clients should use the service com.sun.star.frame.LayoutManager, which can be obtained from a frame, to control toolbars.
      void startOOoConnection​(java.lang.String aConnectionURL)
      Starts a connection to an OOo instance which is launched if not running.
      void stopOOoConnection()
      Disconnects from the connected OOo instance.
      byte[] storeToByteArray​(byte[] aOutBuffer, com.sun.star.beans.PropertyValue[] aArguments)
      Stores a document to a byte array.
      java.io.OutputStream storeToStream​(java.io.OutputStream aOutStream, com.sun.star.beans.PropertyValue[] aArguments)
      Stores a document to a stream.
      void storeToURL​(java.lang.String aURL, com.sun.star.beans.PropertyValue[] aArguments)
      Stores a document to the given URL.
      void writeExternal​(java.io.ObjectOutput aObjOut)
      Deprecated.
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • OOoBean

        public OOoBean()
        Generic constructor of the OOoBean. Neither a connection is established nor any document loaded.
      • OOoBean

        @Deprecated
        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.
        Throws:
        NoConnectionException - if the connection is not established.
    • Method Detail

      • writeExternal

        @Deprecated
        public void writeExternal​(java.io.ObjectOutput aObjOut)
        Deprecated.
        Specified by:
        writeExternal in interface java.io.Externalizable
      • readExternal

        @Deprecated
        public void readExternal​(java.io.ObjectInput aObjIn)
        Deprecated.
        Specified by:
        readExternal in interface java.io.Externalizable
      • setOOoStartTimeOut

        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.
      • setOOoCallTimeOut

        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

        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.
      • isOOoConnected

        @Deprecated
        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.
      • stopOOoConnection

        public 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.
      • getOOoConnection

        public OfficeConnection getOOoConnection()
                                          throws NoConnectionException
        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 stopOOoConnection or other API methods. If other instances share the same connection then they will stop function properly, because they lose their connection as well. The recommended way to end the connection is by calling stopOOoConnection.
        Throws:
        NoConnectionException - if no connection can be established
      • getMultiServiceFactory

        public com.sun.star.lang.XMultiServiceFactory getMultiServiceFactory()
                                                                      throws NoConnectionException
        Returns the service factory used by this OOoBean instance.
        Throws:
        NoConnectionException - if no connection is established and no default connection can be established.
      • getOOoDesktop

        public com.sun.star.frame.XDesktop getOOoDesktop()
                                                  throws NoConnectionException
        Returns the XDesktop interface of the OOo instance used by this OOoBean.
        Throws:
        NoConnectionException - if no connection is established and no default connection can be established.
      • clearDocument

        @Deprecated
        public 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 clear() which discards the currently displayed document.
        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.
        Parameters:
        bClearStateToo - Not only the document content but also the state of the bean, like visibility of child components is cleared.
      • clear

        public 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.
      • aquireSystemWindow

        public 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 loadFromURL, loadFromStream1, or loadFromByteArray is called, then the document is automatically displayed. Should one of the load methods have been called before the Java container was showing, then this method needs to be called after the container window was made visible (java.lang.Component.setVisible(true)).

        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.

        Throws:
        SystemWindowException - if no system window can be acquired.
        NoConnectionException - if the connection is not established.
      • releaseSystemWindow

        @Deprecated
        public 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.
        Throws:
        SystemWindowException - if system window is not acquired.
        NoConnectionException - if the connection is not established.
      • loadFromURL

        public void loadFromURL​(java.lang.String aURL,
                                com.sun.star.beans.PropertyValue[] aArguments)
                         throws NoConnectionException,
                                java.io.IOException,
                                com.sun.star.lang.IllegalArgumentException,
                                com.sun.star.util.CloseVetoException
        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.
        Throws:
        java.lang.IllegalArgumentException - if either of the arguments is out of the specified range.
        java.io.IOException - if an IO error occurs reading the resource specified by the URL.
        NoConnectionException - if no connection can be established.
        com.sun.star.util.CloseVetoException - if the currently displayed document cannot be closed because it is still be used, for example it is printed.
        com.sun.star.lang.IllegalArgumentException
      • loadFromStream

        public void loadFromStream​(java.io.InputStream iInStream,
                                   com.sun.star.beans.PropertyValue[] aArguments)
                            throws NoConnectionException,
                                   java.io.IOException,
                                   com.sun.star.lang.IllegalArgumentException,
                                   com.sun.star.util.CloseVetoException
        Loads a document from a Java stream. See loadFromURL() for further information.
        Throws:
        NoConnectionException
        java.io.IOException
        com.sun.star.lang.IllegalArgumentException
        com.sun.star.util.CloseVetoException
      • loadFromByteArray

        public void loadFromByteArray​(byte[] aInBuffer,
                                      com.sun.star.beans.PropertyValue[] aArguments)
                               throws NoConnectionException,
                                      java.io.IOException,
                                      com.sun.star.lang.IllegalArgumentException,
                                      com.sun.star.util.CloseVetoException
        Loads a document from a byte array. See loadFromURL() for further information.
        Throws:
        NoConnectionException
        java.io.IOException
        com.sun.star.lang.IllegalArgumentException
        com.sun.star.util.CloseVetoException
      • storeToURL

        public void storeToURL​(java.lang.String aURL,
                               com.sun.star.beans.PropertyValue[] aArguments)
                        throws NoConnectionException,
                               java.io.IOException,
                               com.sun.star.lang.IllegalArgumentException,
                               NoDocumentException
        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 storeToByteArray and storeToStream. The workaround is to start the office with the option --norestore, which disables the automatic backup and recovery mechanism. OOoBean offers currently no supported way of providing startup options for OOo. But it is possible to set a Java property when starting Java, which is examined by OOoBean:

                    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.
        Throws:
        java.lang.IllegalArgumentException - if either of the arguments is out of the specified range.
        java.io.IOException - if an IO error occurs reading the resource specified by the URL.
        NoConnectionException - if no connection is established.
        NoDocumentException - if no document is loaded
        com.sun.star.lang.IllegalArgumentException
      • getFrame

        public Frame getFrame()
                       throws NoConnectionException
        returns the com::sun::star::frame::Frame of the bean.
        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.
        Throws:
        NoConnectionException - if the connection is not established.
      • getController

        public Controller getController()
                                 throws NoConnectionException
        returns the com::sun::star::frame::Controller of the bean.
        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.
        Throws:
        NoConnectionException - if the connection is not established.
      • getDocument

        public OfficeDocument getDocument()
                                   throws NoConnectionException
        returns the com::sun::star::document::OfficeDocument of the bean.
        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.
        Throws:
        NoConnectionException - if the connection is not established.
      • setAllBarsVisible

        @Deprecated
        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.

      • applyToolVisibilities

        @Deprecated
        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 setAllBarsVisible.
        Applies all tool visibilities to the real thing.
      • setToolVisible

        @Deprecated
        protected boolean setToolVisible​(java.lang.String aProperty,
                                         java.lang.String aResourceURL,
                                         boolean bOldValue,
                                         boolean bNewValue)
                                  throws java.lang.InterruptedException
        Deprecated.
        Clients should use the service com.sun.star.frame.LayoutManager, which can be obtained from a frame, to control toolbars. See also setAllBarsVisible(boolean).
        Helper method to set tool bar visibility.
        Parameters:
        bNewValue - If false, the tool bar is disabled, If true, the tool bar is visible.
        Throws:
        java.lang.InterruptedException
      • setMenuBarVisible

        @Deprecated
        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 setAllBarsVisible(boolean).
        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.

        Parameters:
        bVisible - If false, the menu bar is disabled, If true, the menu bar is visible.
      • isMenuBarVisible

        @Deprecated
        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 setAllBarsVisible(boolean).
        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.
        Returns:
        True if the menu bar is visible, false if the menu bar is hidden.
      • setStandardBarVisible

        @Deprecated
        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 setAllBarsVisible(boolean).
        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.
        Parameters:
        bVisible - If false, the main function bar is disabled, If true, the main function bar is visible.
      • isStandardBarVisible

        @Deprecated
        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 setAllBarsVisible(boolean).
        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.
        Returns:
        True if the main function bar is visible, false if the main function bar is hidden.
      • setToolBarVisible

        @Deprecated
        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 setAllBarsVisible(boolean).
        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.
        Parameters:
        bVisible - If false, the tool function bar is disabled, If true, the tool function bar is visible.
      • isToolBarVisible

        @Deprecated
        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 setAllBarsVisible(boolean).
        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.
        Returns:
        True if the tool function bar is visible, false if the tool function bar is hidden.
      • setStatusBarVisible

        @Deprecated
        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 setAllBarsVisible(boolean).
        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.
        Parameters:
        bVisible - If false, the status function bar is disabled, If true, the status function bar is visible.
      • isStatusBarVisible

        @Deprecated
        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 setAllBarsVisible(boolean).
        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.
        Returns:
        True if the status function bar is visible, false if the status function bar is hidden.
      • paint

        @Deprecated
        public void paint​(java.awt.Graphics aGraphics)
        Deprecated.
        Overrides:
        paint in class java.awt.Container
      • addArgument

        protected com.sun.star.beans.PropertyValue[] addArgument​(com.sun.star.beans.PropertyValue[] aArguments,
                                                                 com.sun.star.beans.PropertyValue aArgument)
        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.