Package org.uberfire.workbench.model

Examples of org.uberfire.workbench.model.PanelDefinition


        return ( minSize == null ? DEFAULT_MIN_SIZE : minSize );
    }

    int getChildSize( final PanelDefinition panel ) {
        int childSize = 0;
        final PanelDefinition eastPanel = panel.getChild( Position.EAST );
        final PanelDefinition westPanel = panel.getChild( Position.WEST );
        if ( eastPanel != null ) {
            childSize = childSize + assertSize( eastPanel.getWidth() ) + getChildSize( eastPanel );
        }
        if ( westPanel != null ) {
            childSize = childSize + assertSize( westPanel.getWidth() ) + getChildSize( westPanel );
        }
        return childSize;
    }
View Full Code Here


            getSelectWorkbenchPartEvent().fire( new SelectPlaceEvent( place ) );
            return;
        }

        final PartDefinition part = new PartDefinitionImpl( place );
        final PanelDefinition panel;
        if ( _panel != null ) {
            panel = _panel;
        } else {
            panel = addWorkbenchPanelTo( position, activity.preferredHeight(), activity.preferredWidth() );
        }
View Full Code Here

        perspectiveDefinition.setTransient( !isSerializable );

        final JsArray<JSPartDefinition> parts = view.getParts();
        final JsArray<JSPanelDefinition> panels = view.getChildren();

        final PanelDefinition root = perspectiveDefinition.getRoot();

        buildParts( root, parts );
        buildPanels( root, panels );

        return perspectiveDefinition;
View Full Code Here

                              final JsArray<JSPanelDefinition> panels ) {
        if ( panels != null ) {
            for ( int i = 0; i < panels.length(); i++ ) {
                final JSPanelDefinition activePanelDef = panels.get( i );

                final PanelDefinition newPanel = new PanelDefinitionImpl( getPanelType( activePanelDef.getPanelTypeAsString(), PanelType.MULTI_TAB ) );

                newPanel.setContextDisplayMode( JSNativePerspective.this.getContextDisplayMode( activePanelDef.getContextDisplayModeAsString(), ContextDisplayMode.SHOW ) );
                if ( activePanelDef.getContextId() != null ) {
                    newPanel.setContextDefinition( new ContextDefinitionImpl( new DefaultPlaceRequest( activePanelDef.getContextId() ) ) );
                }

                if ( activePanelDef.getWidth() > 0 ) {
                    newPanel.setWidth( activePanelDef.getWidth() );
                }

                if ( activePanelDef.getMinWidth() > 0 ) {
                    newPanel.setMinWidth( activePanelDef.getMinWidth() );
                }

                if ( activePanelDef.getHeight() > 0 ) {
                    newPanel.setHeight( activePanelDef.getHeight() );
                }

                if ( activePanelDef.getMinHeight() > 0 ) {
                    newPanel.setHeight( activePanelDef.getMinHeight() );
                }

                buildParts( newPanel, activePanelDef.getParts() );

                buildPanels( newPanel, activePanelDef.getChildren() );
View Full Code Here

            if ( child.getHeight() == null || child.getWidth() == null ) {
                buildSize( child );
            }

            final PanelDefinition target = nativePerspective.getPanelManager().addWorkbenchPanel( panel,
                                                                                                  child,
                                                                                                  child.getPosition() );
            addChildren( target );
        }
    }
View Full Code Here

TOP

Related Classes of org.uberfire.workbench.model.PanelDefinition

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.