Package org.eclipse.sapphire.ui.forms

Examples of org.eclipse.sapphire.ui.forms.HtmlPanelPart


        {
            part = new TabGroupPart();
        }
        else if( definition instanceof HtmlPanelDef )
        {
            part = new HtmlPanelPart();
        }
        else if( definition instanceof SplitFormDef )
        {
            part = new SplitFormPart();
        }
View Full Code Here


    }
   
    @Override
    public void render()
    {
        final HtmlPanelPart part = part();
        final HtmlPanelDef def = part.definition();
       
        final boolean scaleVertically = part.getScaleVertically();
        GridData gd = gdhindent( gdwhint( gdhspan( ( scaleVertically ? gdfill() : gdhfill() ), 2 ), 100 ), 9 );
       
        if( ! scaleVertically )
        {
            gd = gdhhint( gd, def.getHeight().content() );
        }
       
        final int style = ( def.getShowBorder().content() == true ? SWT.BORDER : SWT.NONE );
       
        try
        {
            final Browser browser = new Browser( composite(), style );
            browser.setLayoutData( gd );
           
            register( browser );
           
            if( def.getContentSourceType().content() == HtmlContentSourceType.EMBEDDED )
            {
                browser.setText( part.content() );
               
                attachPartListener
                (
                    new FilteredListener<ContentEvent>()
                    {
                        @Override
                        protected void handleTypedEvent( final ContentEvent event )
                        {
                            browser.setText( part.content() );
                        }
                    }
                );
            }
            else
            {
                browser.setUrl( part.url() );
               
                attachPartListener
                (
                    new FilteredListener<ContentEvent>()
                    {
                        @Override
                        protected void handleTypedEvent( final ContentEvent event )
                        {
                            browser.setUrl( part.url() );
                        }
                    }
                );
            }
        }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.ui.forms.HtmlPanelPart

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.