Package org.eclipse.sapphire.ui.forms

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


        {
            part = new MasterDetailsEditorPagePart();
        }
        else if( definition instanceof FormEditorPageDef )
        {
            part = new FormEditorPagePart();
        }
       
        if( part == null )
        {
            throw new IllegalStateException();
View Full Code Here


    }

    @Override
    protected void createFormContent( final IManagedForm managedForm )
    {
        final FormEditorPagePart part = getPart();
        final ScrolledForm form = managedForm.getForm();
        final Composite body = form.getForm().getBody();
       
        final Presentation presentation = new SwtPresentation( part, null, body.getShell() )
        {
            @Override
            public void render()
            {
                body.setBackground( getPart().getSwtResourceCache().color( Color.WHITE ) );
                body.setBackgroundMode( SWT.INHERIT_DEFAULT );
               
                managedForm.getToolkit().decorateFormHeading( managedForm.getForm().getForm() );
                body.setLayout( glayout( 2, 0, 0 ) );
               
                for( final FormComponentPart child : part.getChildParts() )
                {
                    final Presentation childPresentation = child.createPresentation( null, body );
                    childPresentation.render();
                }

                final ISapphireDocumentation doc = part.definition().getDocumentation().content();
               
                if( doc != null )
                {
                    ISapphireDocumentationDef docdef = null;
                   
                    if( doc instanceof ISapphireDocumentationDef )
                    {
                        docdef = (ISapphireDocumentationDef) doc;
                    }
                    else
                    {
                        docdef = ( (ISapphireDocumentationRef) doc ).resolve();
                    }
                   
                    if( docdef != null )
                    {
                        HelpSystem.setHelp( body, docdef );
                    }
                }
               
                final SapphireActionGroup actions = part.getActions( CONTEXT_EDITOR_PAGE );
                final SapphireActionPresentationManager actionPresentationManager = new SapphireActionPresentationManager( this, actions );
                final SapphireToolBarManagerActionPresentation actionPresentation = new SapphireToolBarManagerActionPresentation( actionPresentationManager );
                actionPresentation.setToolBarManager( form.getToolBarManager() );
                actionPresentation.render();
            }
View Full Code Here

TOP

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

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.