Package org.openoffice.examples.embedding

Examples of org.openoffice.examples.embedding.EditorFrame


                m_nObjectState = com.sun.star.embed.EmbedStates.LOADED;
            }
            else
            {
                m_aEditorFrame = new EditorFrame( m_aEntryName, this, 5, 20 );
                m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;
                m_aObjSize = m_aEditorFrame.getAppSize();
            }
        }
        else if ( nEntryConnectionMode == com.sun.star.embed.EntryInitModes.TRUNCATE_INIT )
        {           
            SwitchOwnPersistence( xStorage, aEntryName );
            m_aEditorFrame = new EditorFrame( m_aEntryName, this, 5, 20 );
            m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;
            m_aObjSize = m_aEditorFrame.getAppSize();
        }
        else
            throw new com.sun.star.lang.IllegalArgumentException();
View Full Code Here


            if ( nOldState == com.sun.star.embed.EmbedStates.LOADED )
            {
                // switch to the RUNNING state first
                String aText = ReadStringFromStream( m_xOwnStorage, "content.txt" );

                EditorFrame aEditorFrame = new EditorFrame( m_aEntryName, this, 5, 20 );
                aEditorFrame.setText( aText );

                ReadSizeFromOwnStorage();

                m_aEditorFrame = aEditorFrame;
                m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;

                if ( nNewState == com.sun.star.embed.EmbedStates.ACTIVE )
                {
                    if ( m_xClient == null )
                        throw new com.sun.star.embed.WrongStateException();

                    m_aEditorFrame.show();
                    m_aEditorFrame.toFront();

                    if ( m_aObjSize != null )
                        aEditorFrame.setAppSize( m_aObjSize );

                    m_xClient.visibilityChanged( true );
                    m_nObjectState = com.sun.star.embed.EmbedStates.ACTIVE;
                }
            }
            else if ( nOldState == com.sun.star.embed.EmbedStates.RUNNING )
            {
                if ( nNewState == com.sun.star.embed.EmbedStates.LOADED )
                {
                    EditorFrame aFrame = m_aEditorFrame;
                    m_aEditorFrame = null;
                    aFrame.dispose();
                    m_nObjectState = nNewState;
                }
                else // nNewState == ACTIVE
                {
                    if ( m_aEditorFrame == null )
                        throw new com.sun.star.uno.RuntimeException();

                    if ( m_xClient == null )
                        throw new com.sun.star.embed.WrongStateException();

                    m_aEditorFrame.show();
                    m_aEditorFrame.toFront();

                    if ( m_aObjSize != null )
                        m_aEditorFrame.setAppSize( m_aObjSize );
                   
                    m_xClient.visibilityChanged( true );

                    m_nObjectState = nNewState;
                }
            }
            else // nOldState == ACTIVE
            {
                UpdateSizeAndGetFromActive();
                if ( nNewState == com.sun.star.embed.EmbedStates.RUNNING )
                {
                    m_aEditorFrame.hide();
                    m_nObjectState = nNewState;
                }
                else // nNewState == LOADED
                {
                    EditorFrame aFrame = m_aEditorFrame;
                    m_aEditorFrame = null;
                    aFrame.dispose();
                    m_nObjectState = nNewState;
                }
            }
        }
        catch( com.sun.star.uno.Exception e )
View Full Code Here

            if ( nOldState == com.sun.star.embed.EmbedStates.LOADED )
            {
                // switch to the RUNNING state first
                String aText = ReadStringFromStream( m_xOwnStorage, "content.txt" );

                EditorFrame aEditorFrame = new EditorFrame( m_aEntryName, this, 5, 20 );
                aEditorFrame.setText( aText );

                ReadSizeFromOwnStorage();

                m_aEditorFrame = aEditorFrame;
                m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;

                if ( nNewState == com.sun.star.embed.EmbedStates.ACTIVE )
                {
                    if ( m_xClient == null )
                        throw new com.sun.star.embed.WrongStateException();

                    m_aEditorFrame.show();
                    m_aEditorFrame.toFront();

                    if ( m_aObjSize != null )
                        aEditorFrame.setAppSize( m_aObjSize );

                    m_xClient.visibilityChanged( true );
                    m_nObjectState = com.sun.star.embed.EmbedStates.ACTIVE;
                }
            }
            else if ( nOldState == com.sun.star.embed.EmbedStates.RUNNING )
            {
                if ( nNewState == com.sun.star.embed.EmbedStates.LOADED )
                {
                    EditorFrame aFrame = m_aEditorFrame;
                    m_aEditorFrame = null;
                    aFrame.dispose();
                    m_nObjectState = nNewState;
                }
                else // nNewState == ACTIVE
                {
                    if ( m_aEditorFrame == null )
                        throw new com.sun.star.uno.RuntimeException();

                    if ( m_xClient == null )
                        throw new com.sun.star.embed.WrongStateException();

                    m_aEditorFrame.show();
                    m_aEditorFrame.toFront();

                    if ( m_aObjSize != null )
                        m_aEditorFrame.setAppSize( m_aObjSize );
                   
                    m_xClient.visibilityChanged( true );

                    m_nObjectState = nNewState;
                }
            }
            else // nOldState == ACTIVE
            {
                UpdateSizeAndGetFromActive();
                if ( nNewState == com.sun.star.embed.EmbedStates.RUNNING )
                {
                    m_aEditorFrame.hide();
                    m_nObjectState = nNewState;
                }
                else // nNewState == LOADED
                {
                    EditorFrame aFrame = m_aEditorFrame;
                    m_aEditorFrame = null;
                    aFrame.dispose();
                    m_nObjectState = nNewState;
                }
            }
        }
        catch( com.sun.star.uno.Exception e )
View Full Code Here

                m_nObjectState = com.sun.star.embed.EmbedStates.LOADED;
            }
            else
            {
                m_aEditorFrame = new EditorFrame( m_aEntryName, this, 5, 20 );
                m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;
                m_aObjSize = m_aEditorFrame.getAppSize();
            }
        }
        else if ( nEntryConnectionMode == com.sun.star.embed.EntryInitModes.TRUNCATE_INIT )
        {           
            SwitchOwnPersistence( xStorage, aEntryName );
            m_aEditorFrame = new EditorFrame( m_aEntryName, this, 5, 20 );
            m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;
            m_aObjSize = m_aEditorFrame.getAppSize();
        }
        else
            throw new com.sun.star.lang.IllegalArgumentException();
View Full Code Here

                m_nObjectState = com.sun.star.embed.EmbedStates.LOADED;
            }
            else
            {
                m_aEditorFrame = new EditorFrame( m_aEntryName, this, 5, 20 );
                m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;
                m_aObjSize = m_aEditorFrame.getAppSize();
            }
        }
        else if ( nEntryConnectionMode == com.sun.star.embed.EntryInitModes.TRUNCATE_INIT )
        {           
            SwitchOwnPersistence( xStorage, aEntryName );
            m_aEditorFrame = new EditorFrame( m_aEntryName, this, 5, 20 );
            m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;
            m_aObjSize = m_aEditorFrame.getAppSize();
        }
        else
            throw new com.sun.star.lang.IllegalArgumentException();
View Full Code Here

            if ( nOldState == com.sun.star.embed.EmbedStates.LOADED )
            {
                // switch to the RUNNING state first
                String aText = ReadStringFromStream( m_xOwnStorage, "content.txt" );

                EditorFrame aEditorFrame = new EditorFrame( m_aEntryName, this, 5, 20 );
                aEditorFrame.setText( aText );

                ReadSizeFromOwnStorage();

                m_aEditorFrame = aEditorFrame;
                m_nObjectState = com.sun.star.embed.EmbedStates.RUNNING;

                if ( nNewState == com.sun.star.embed.EmbedStates.ACTIVE )
                {
                    if ( m_xClient == null )
                        throw new com.sun.star.embed.WrongStateException();

                    m_aEditorFrame.show();
                    m_aEditorFrame.toFront();

                    if ( m_aObjSize != null )
                        aEditorFrame.setAppSize( m_aObjSize );

                    m_xClient.visibilityChanged( true );
                    m_nObjectState = com.sun.star.embed.EmbedStates.ACTIVE;
                }
            }
            else if ( nOldState == com.sun.star.embed.EmbedStates.RUNNING )
            {
                if ( nNewState == com.sun.star.embed.EmbedStates.LOADED )
                {
                    EditorFrame aFrame = m_aEditorFrame;
                    m_aEditorFrame = null;
                    aFrame.dispose();
                    m_nObjectState = nNewState;
                }
                else // nNewState == ACTIVE
                {
                    if ( m_aEditorFrame == null )
                        throw new com.sun.star.uno.RuntimeException();

                    if ( m_xClient == null )
                        throw new com.sun.star.embed.WrongStateException();

                    m_aEditorFrame.show();
                    m_aEditorFrame.toFront();

                    if ( m_aObjSize != null )
                        m_aEditorFrame.setAppSize( m_aObjSize );
                   
                    m_xClient.visibilityChanged( true );

                    m_nObjectState = nNewState;
                }
            }
            else // nOldState == ACTIVE
            {
                UpdateSizeAndGetFromActive();
                if ( nNewState == com.sun.star.embed.EmbedStates.RUNNING )
                {
                    m_aEditorFrame.hide();
                    m_nObjectState = nNewState;
                }
                else // nNewState == LOADED
                {
                    EditorFrame aFrame = m_aEditorFrame;
                    m_aEditorFrame = null;
                    aFrame.dispose();
                    m_nObjectState = nNewState;
                }
            }
        }
        catch( com.sun.star.uno.Exception e )
View Full Code Here

TOP

Related Classes of org.openoffice.examples.embedding.EditorFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.