Search in sources :

Example 1 with EJRWTTrayPane

use of org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayPane in project rap by entirej.

the class EJRWTFormRenderer method createGroupCanvas.

private void createGroupCanvas(Composite parent, final EJCanvasProperties canvasProperties, EJCanvasController canvasController) {
    final EJRWTTrayPane trayPane = new EJRWTTrayPane(parent);
    trayPane.setLayoutData(createCanvasGridData(canvasProperties));
    EJ_RWT.setTestId(trayPane, _form.getProperties().getName() + "." + canvasProperties.getName());
    parent = trayPane;
    String frameTitle = canvasProperties.getGroupFrameTitle();
    if (canvasProperties.getDisplayGroupFrame() && frameTitle != null && frameTitle.length() > 0) {
        Group group = new Group(parent, SWT.NONE);
        group.setData(EJ_RWT.CUSTOM_VARIANT, EJ_RWT.CSS_CV_FORM);
        group.setLayout(new FillLayout());
        group.setLayoutData(createCanvasGridData(canvasProperties));
        group.setText(frameTitle);
        trayPane.initBase(group);
        parent = group;
    }
    final EJRWTEntireJGridPane groupPane = new EJRWTEntireJGridPane(parent, canvasProperties.getNumCols(), canvasProperties.getDisplayGroupFrame() && (frameTitle == null || frameTitle.length() == 0) ? SWT.BORDER : SWT.NONE);
    groupPane.setData(EJ_RWT.CUSTOM_VARIANT, EJ_RWT.CSS_CV_FORM);
    if (canvasProperties.getDisplayGroupFrame()) {
    // .cleanLayoutTop();
    } else {
    // groupPane.cleanLayout();
    }
    groupPane.setPaneName(canvasProperties.getName());
    if (!(canvasProperties.getDisplayGroupFrame() && frameTitle != null && frameTitle.length() > 0)) {
        groupPane.setLayoutData(createCanvasGridData(canvasProperties));
        trayPane.initBase(groupPane);
    }
    CanvasHandler canvasHandler = new CanvasHandler() {

        private Collection<EJMessage> msgs;

        @Override
        public void clearCanvasMessages() {
            this.msgs = null;
            if (trayPane != null && !trayPane.isDisposed()) {
                trayPane.closeTray();
            }
        }

        @Override
        public void setCanvasMessages(Collection<EJMessage> messages) {
            this.msgs = messages;
            if (trayPane != null && !trayPane.isDisposed()) {
                if (trayPane.getTray() != null) {
                    trayPane.closeTray();
                }
                {
                    MessageTray messageTray = new MessageTray(canvasProperties.getCloseableMessagePane()) {

                        @Override
                        void close() {
                            if (trayPane != null && !trayPane.isDisposed()) {
                                trayPane.closeTray();
                            }
                        }
                    };
                    messageTray.setMessages(msgs);
                    TrayLocation location = TrayLocation.RIGHT;
                    switch(canvasProperties.getMessagePosition()) {
                        case BOTTOM:
                            location = TrayLocation.BOTTOM;
                            break;
                        case LEFT:
                            location = TrayLocation.LEFT;
                            break;
                        case RIGHT:
                            location = TrayLocation.RIGHT;
                            break;
                        case TOP:
                            location = TrayLocation.TOP;
                            break;
                        default:
                            break;
                    }
                    trayPane.openTray(location, messageTray, canvasProperties.getMessagePaneSize());
                }
            }
        }

        @Override
        public void add(EJInternalBlock block) {
            EJRWTAppBlockRenderer blockRenderer = (EJRWTAppBlockRenderer) block.getRendererController().getRenderer();
            if (blockRenderer == null) {
                throw new EJApplicationException(new EJMessage("Block " + block.getProperties().getName() + " has a canvas defined but no renderer. A block cannot be rendererd if no canvas has been defined."));
            }
            blockRenderer.buildGuiComponent(groupPane);
            trayPane.setLayoutData(groupPane.getLayoutData());
        }

        @Override
        public EJCanvasType getType() {
            return EJCanvasType.BLOCK;
        }
    };
    _canvases.put(groupPane.getPaneName(), canvasHandler);
    _canvasesIds.add(groupPane.getPaneName());
    EJInternalBlock block = _blocks.get(groupPane.getPaneName());
    if (block != null) {
        canvasHandler.add(block);
    }
    if (!canvasProperties.getCloseableMessagePane()) {
        canvasHandler.setCanvasMessages(Collections.<EJMessage>emptyList());
    }
    if (canvasProperties.getType() == EJCanvasType.GROUP) {
        for (EJCanvasProperties containedCanvas : canvasProperties.getGroupCanvasContainer().getAllCanvasProperties()) {
            switch(containedCanvas.getType()) {
                case BLOCK:
                case GROUP:
                    createGroupCanvas(groupPane, containedCanvas, canvasController);
                    break;
                case FORM:
                    createFormCanvas(groupPane, containedCanvas, canvasController);
                    break;
                case SEPARATOR:
                    createSeparatorCanvas(groupPane, containedCanvas);
                    break;
                case SPLIT:
                    createSplitCanvas(groupPane, containedCanvas, canvasController);
                    break;
                case STACKED:
                    createStackedCanvas(groupPane, containedCanvas, canvasController);
                    break;
                case TAB:
                    createTabCanvas(groupPane, containedCanvas, canvasController);
                    break;
                case DRAWER:
                    createDrawerCanvas(groupPane, containedCanvas, canvasController);
                    break;
                case POPUP:
                    throw new AssertionError();
            }
        }
    }
}
Also used : Group(org.eclipse.swt.widgets.Group) EJInternalBlock(org.entirej.framework.core.internal.EJInternalBlock) EJCanvasProperties(org.entirej.framework.core.properties.interfaces.EJCanvasProperties) EJApplicationException(org.entirej.framework.core.EJApplicationException) FillLayout(org.eclipse.swt.layout.FillLayout) EJRWTAppBlockRenderer(org.entirej.applicationframework.rwt.renderer.interfaces.EJRWTAppBlockRenderer) EJMessage(org.entirej.framework.core.EJMessage) TrayLocation(org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayDialog.TrayLocation) Collection(java.util.Collection) EJRWTTrayPane(org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayPane) EJRWTEntireJGridPane(org.entirej.applicationframework.rwt.layout.EJRWTEntireJGridPane)

Example 2 with EJRWTTrayPane

use of org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayPane in project rap by entirej.

the class EJRWTFormRenderer method createFormCanvas.

private void createFormCanvas(Composite parent, final EJCanvasProperties canvasProperties, EJCanvasController canvasController) {
    final EJRWTTrayPane trayPane = new EJRWTTrayPane(parent);
    trayPane.setLayoutData(createCanvasGridData(canvasProperties));
    parent = trayPane;
    final String name = canvasProperties.getName();
    Composite stackedPane = new Composite(parent, SWT.NONE);
    stackedPane.setData(EJ_RWT.CUSTOM_VARIANT, EJ_RWT.CSS_CV_FORM);
    stackedPane.setLayout(new FillLayout());
    stackedPane.setLayoutData(createCanvasGridData(canvasProperties));
    EJ_RWT.setTestId(trayPane, _form.getProperties().getName() + "." + canvasProperties.getName());
    _formPanes.put(name, stackedPane);
    trayPane.initBase(stackedPane);
    _canvasesIds.add(name);
    CanvasHandler canvasHandler = new CanvasHandler() {

        private Collection<EJMessage> msgs;

        @Override
        public void clearCanvasMessages() {
            this.msgs = null;
            if (trayPane != null && !trayPane.isDisposed()) {
                trayPane.closeTray();
            }
        }

        @Override
        public void setCanvasMessages(Collection<EJMessage> messages) {
            this.msgs = messages;
            if (trayPane != null && !trayPane.isDisposed()) {
                if (trayPane.getTray() != null) {
                    trayPane.closeTray();
                }
                {
                    MessageTray messageTray = new MessageTray(canvasProperties.getCloseableMessagePane()) {

                        @Override
                        void close() {
                            if (trayPane != null && !trayPane.isDisposed()) {
                                trayPane.closeTray();
                            }
                        }
                    };
                    messageTray.setMessages(msgs);
                    TrayLocation location = TrayLocation.RIGHT;
                    switch(canvasProperties.getMessagePosition()) {
                        case BOTTOM:
                            location = TrayLocation.BOTTOM;
                            break;
                        case LEFT:
                            location = TrayLocation.LEFT;
                            break;
                        case RIGHT:
                            location = TrayLocation.RIGHT;
                            break;
                        case TOP:
                            location = TrayLocation.TOP;
                            break;
                        default:
                            break;
                    }
                    trayPane.openTray(location, messageTray, canvasProperties.getMessagePaneSize());
                }
            }
        }

        @Override
        public void add(EJInternalBlock block) {
        }

        @Override
        public EJCanvasType getType() {
            return EJCanvasType.FORM;
        }
    };
    _canvases.put(canvasProperties.getName(), canvasHandler);
    if (!canvasProperties.getCloseableMessagePane()) {
        canvasHandler.setCanvasMessages(Collections.<EJMessage>emptyList());
    }
    if (canvasProperties.getReferredFormId() != null && canvasProperties.getReferredFormId().length() > 0) {
        _form.openEmbeddedForm(canvasProperties.getReferredFormId(), name, null);
    }
    if (_formPanesCache.containsKey(name)) {
        openEmbeddedForm(_formPanesCache.get(name));
        _formPanesCache.remove(name);
    }
}
Also used : TrayLocation(org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayDialog.TrayLocation) Composite(org.eclipse.swt.widgets.Composite) EJRWTScrolledComposite(org.entirej.applicationframework.rwt.layout.EJRWTScrolledComposite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) EJInternalBlock(org.entirej.framework.core.internal.EJInternalBlock) Collection(java.util.Collection) EJRWTTrayPane(org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayPane) FillLayout(org.eclipse.swt.layout.FillLayout)

Example 3 with EJRWTTrayPane

use of org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayPane in project rap by entirej.

the class EJRWTFormRenderer method createTabCanvas.

private void createTabCanvas(Composite parent, final EJCanvasProperties canvasProperties, final EJCanvasController canvasController) {
    int style = SWT.FLAT;
    EJFrameworkExtensionProperties rendererProp = EJCoreProperties.getInstance().getApplicationDefinedProperties();
    if (rendererProp != null) {
        boolean displayBorder = rendererProp.getBooleanProperty("DISPLAY_TAB_BORDER", false);
        if (displayBorder) {
            style = SWT.FLAT | SWT.BORDER;
        }
    }
    switch(canvasProperties.getTabPosition()) {
        case BOTTOM:
            style = style | SWT.BOTTOM;
            break;
        case LEFT:
            style = style | SWT.LEFT;
            break;
        case RIGHT:
            style = style | SWT.RIGHT;
            break;
        default:
            style = style | SWT.TOP;
            break;
    }
    final String name = canvasProperties.getName();
    final EJRWTTrayPane trayPane = new EJRWTTrayPane(parent);
    EJ_RWT.setTestId(trayPane, _form.getProperties().getName() + "." + canvasProperties.getName());
    trayPane.setLayoutData(createCanvasGridData(canvasProperties));
    parent = trayPane;
    ITabFolder folder = null;
    CTabFolder cfolder = new CTabFolder(parent, style);
    cfolder.setData(EJ_RWT.CUSTOM_VARIANT, EJ_RWT.CSS_CV_FORM);
    final EJTabFolder tabFolder = new EJTabFolder(this, cfolder, canvasController);
    trayPane.initBase(tabFolder.getFolder());
    cfolder.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            canvasController.tabPageChanged(name, tabFolder.getActiveKey());
            EJ_RWT.setAttribute(cfolder, "ej-item-selection", tabFolder.getActiveKey());
        }
    });
    folder = tabFolder;
    CanvasHandler canvasHandler = new CanvasHandler() {

        private Collection<EJMessage> msgs;

        @Override
        public void clearCanvasMessages() {
            this.msgs = null;
            if (trayPane != null && !trayPane.isDisposed()) {
                trayPane.closeTray();
            }
        }

        @Override
        public void setCanvasMessages(Collection<EJMessage> messages) {
            this.msgs = messages;
            if (trayPane != null && !trayPane.isDisposed()) {
                if (trayPane.getTray() != null) {
                    trayPane.closeTray();
                }
                {
                    MessageTray messageTray = new MessageTray(canvasProperties.getCloseableMessagePane()) {

                        @Override
                        void close() {
                            if (trayPane != null && !trayPane.isDisposed()) {
                                trayPane.closeTray();
                            }
                        }
                    };
                    messageTray.setMessages(msgs);
                    TrayLocation location = TrayLocation.RIGHT;
                    switch(canvasProperties.getMessagePosition()) {
                        case BOTTOM:
                            location = TrayLocation.BOTTOM;
                            break;
                        case LEFT:
                            location = TrayLocation.LEFT;
                            break;
                        case RIGHT:
                            location = TrayLocation.RIGHT;
                            break;
                        case TOP:
                            location = TrayLocation.TOP;
                            break;
                        default:
                            break;
                    }
                    trayPane.openTray(location, messageTray, canvasProperties.getMessagePaneSize());
                }
            }
        }

        @Override
        public void add(EJInternalBlock block) {
        }

        @Override
        public EJCanvasType getType() {
            return EJCanvasType.TAB;
        }
    };
    _canvases.put(canvasProperties.getName(), canvasHandler);
    if (!canvasProperties.getCloseableMessagePane()) {
        canvasHandler.setCanvasMessages(Collections.<EJMessage>emptyList());
    }
    _tabFolders.put(name, folder);
    folder.getFolder().setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));
    Collection<EJTabPageProperties> allTabPageProperties = canvasProperties.getTabPageContainer().getAllTabPageProperties();
    int index = 0;
    for (EJTabPageProperties page : allTabPageProperties) {
        ITabFolder.ITab tab = folder.newTab(page);
        if (page.isVisible()) {
            tab.create(index == 0);
        }
        tab.setIndex(index);
        index++;
        folder.put(page.getName(), tab);
    }
    if (_tabFoldersCache.containsKey(name)) {
        folder.showPage(_tabFoldersCache.get(name));
        _tabFoldersCache.remove(name);
    }
    _canvasesIds.add(name);
}
Also used : EJFrameworkExtensionProperties(org.entirej.framework.core.properties.definitions.interfaces.EJFrameworkExtensionProperties) CTabFolder(org.eclipse.swt.custom.CTabFolder) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) EJInternalBlock(org.entirej.framework.core.internal.EJInternalBlock) Point(org.eclipse.swt.graphics.Point) EJTabPageProperties(org.entirej.framework.core.properties.interfaces.EJTabPageProperties) TrayLocation(org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayDialog.TrayLocation) SelectionEvent(org.eclipse.swt.events.SelectionEvent) GridData(org.eclipse.swt.layout.GridData) Collection(java.util.Collection) EJRWTTrayPane(org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayPane)

Example 4 with EJRWTTrayPane

use of org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayPane in project rap by entirej.

the class EJRWTFormRenderer method createStackedCanvas.

private void createStackedCanvas(Composite parent, final EJCanvasProperties canvasProperties, final EJCanvasController canvasController) {
    final String name = canvasProperties.getName();
    final EJRWTTrayPane trayPane = new EJRWTTrayPane(parent);
    trayPane.setLayoutData(createCanvasGridData(canvasProperties));
    parent = trayPane;
    final EJRWTEntireJStackedPane stackedPane = new EJRWTEntireJStackedPane(parent);
    trayPane.initBase(stackedPane);
    stackedPane.setData(EJ_RWT.CUSTOM_VARIANT, EJ_RWT.CSS_CV_FORM);
    stackedPane.setLayoutData(createCanvasGridData(canvasProperties));
    _stackedPanes.put(name, stackedPane);
    CanvasHandler canvasHandler = new CanvasHandler() {

        private Collection<EJMessage> msgs;

        @Override
        public void clearCanvasMessages() {
            this.msgs = null;
            if (trayPane != null && !trayPane.isDisposed()) {
                trayPane.closeTray();
            }
        }

        @Override
        public void setCanvasMessages(Collection<EJMessage> messages) {
            this.msgs = messages;
            if (trayPane != null && !trayPane.isDisposed()) {
                if (trayPane.getTray() != null) {
                    trayPane.closeTray();
                }
                {
                    MessageTray messageTray = new MessageTray(canvasProperties.getCloseableMessagePane()) {

                        @Override
                        void close() {
                            if (trayPane != null && !trayPane.isDisposed()) {
                                trayPane.closeTray();
                            }
                        }
                    };
                    messageTray.setMessages(msgs);
                    TrayLocation location = TrayLocation.RIGHT;
                    switch(canvasProperties.getMessagePosition()) {
                        case BOTTOM:
                            location = TrayLocation.BOTTOM;
                            break;
                        case LEFT:
                            location = TrayLocation.LEFT;
                            break;
                        case RIGHT:
                            location = TrayLocation.RIGHT;
                            break;
                        case TOP:
                            location = TrayLocation.TOP;
                            break;
                        default:
                            break;
                    }
                    trayPane.openTray(location, messageTray, canvasProperties.getMessagePaneSize());
                }
            }
        }

        @Override
        public void add(EJInternalBlock block) {
        }

        @Override
        public EJCanvasType getType() {
            return EJCanvasType.STACKED;
        }
    };
    _canvases.put(canvasProperties.getName(), canvasHandler);
    if (!canvasProperties.getCloseableMessagePane()) {
        canvasHandler.setCanvasMessages(Collections.<EJMessage>emptyList());
    }
    for (final EJStackedPageProperties page : canvasProperties.getStackedPageContainer().getAllStackedPageProperties()) {
        stackedPane.add(page.getName(), new EJRWTEntireJStackedPane.StackedPage() {

            Control control;

            @Override
            public String getKey() {
                return page.getName();
            }

            @Override
            public Control getControl() {
                if (control != null && !control.isDisposed()) {
                    return control;
                }
                final ScrolledComposite scrollComposite = new EJRWTScrolledComposite(stackedPane, SWT.V_SCROLL | SWT.H_SCROLL);
                control = scrollComposite;
                final EJRWTEntireJGridPane pagePane = new EJRWTEntireJGridPane(scrollComposite, page.getNumCols());
                pagePane.cleanLayout();
                int width = 0;
                int height = 0;
                for (EJCanvasProperties properties : page.getContainedCanvases().getAllCanvasProperties()) {
                    createCanvas(pagePane, properties, canvasController);
                    int width2 = properties.getWidth();
                    int height2 = properties.getHeight();
                    if (properties.getBlockProperties() != null) {
                        width2 = properties.getBlockProperties().getMainScreenProperties().getWidth();
                        height2 = properties.getBlockProperties().getMainScreenProperties().getHeight();
                    }
                    if (width < width2) {
                        width = width2;
                    }
                    if (height < height2) {
                        height = height2;
                    }
                }
                scrollComposite.setContent(pagePane);
                scrollComposite.setMinSize(width, height);
                scrollComposite.setExpandHorizontal(true);
                scrollComposite.setExpandVertical(true);
                scrollComposite.setContent(pagePane);
                stackedPane.layout();
                return control;
            }
        });
    }
    if (canvasProperties.getInitialStackedPageName() != null) {
        stackedPane.showPane(canvasProperties.getInitialStackedPageName());
    }
    if (_stackedPanesCache.containsKey(name)) {
        stackedPane.showPane(_stackedPanesCache.get(name));
        _stackedPanesCache.remove(name);
    }
    _canvasesIds.add(name);
}
Also used : EJInternalBlock(org.entirej.framework.core.internal.EJInternalBlock) EJCanvasProperties(org.entirej.framework.core.properties.interfaces.EJCanvasProperties) EJRWTEntireJStackedPane(org.entirej.applicationframework.rwt.layout.EJRWTEntireJStackedPane) EJRWTScrolledComposite(org.entirej.applicationframework.rwt.layout.EJRWTScrolledComposite) EJStackedPageProperties(org.entirej.framework.core.properties.interfaces.EJStackedPageProperties) Control(org.eclipse.swt.widgets.Control) TrayLocation(org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayDialog.TrayLocation) Collection(java.util.Collection) EJRWTScrolledComposite(org.entirej.applicationframework.rwt.layout.EJRWTScrolledComposite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) EJRWTTrayPane(org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayPane) EJRWTEntireJGridPane(org.entirej.applicationframework.rwt.layout.EJRWTEntireJGridPane)

Example 5 with EJRWTTrayPane

use of org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayPane in project rap by entirej.

the class EJRWTFormRenderer method createDrawerCanvas.

private void createDrawerCanvas(Composite parent, final EJCanvasProperties canvasProperties, final EJCanvasController canvasController) {
    int style = SWT.NONE;
    final String name = canvasProperties.getName();
    final EJRWTTrayPane trayPane = new EJRWTTrayPane(parent);
    trayPane.setLayoutData(createCanvasGridData(canvasProperties));
    EJ_RWT.setTestId(trayPane, _form.getProperties().getName() + "." + canvasProperties.getName());
    parent = trayPane;
    EJDrawerFolder folder = null;
    final EJDrawerFolder tabFolder = new EJDrawerFolder(this, canvasController, parent, style) {

        @Override
        protected void selection(String page) {
            canvasController.drawerPageChanged(name, page);
            EJ_RWT.setAttribute(getFolder(), "ej-item-selection", page);
        }
    };
    // tabFolder.setDefaultWidth(canvasProperties.getWidth());
    tabFolder.setPosition(canvasProperties.getDrawerPosition());
    tabFolder.setData(EJ_RWT.CUSTOM_VARIANT, EJ_RWT.CSS_CV_FORM);
    trayPane.initBase(tabFolder.getFolder());
    folder = tabFolder;
    CanvasHandler canvasHandler = new CanvasHandler() {

        private Collection<EJMessage> msgs;

        @Override
        public void clearCanvasMessages() {
            this.msgs = null;
            if (trayPane != null && !trayPane.isDisposed()) {
                trayPane.closeTray();
            }
        }

        @Override
        public void setCanvasMessages(Collection<EJMessage> messages) {
            this.msgs = messages;
            if (trayPane != null && !trayPane.isDisposed()) {
                if (trayPane.getTray() != null) {
                    trayPane.closeTray();
                }
                {
                    MessageTray messageTray = new MessageTray(canvasProperties.getCloseableMessagePane()) {

                        @Override
                        void close() {
                            if (trayPane != null && !trayPane.isDisposed()) {
                                trayPane.closeTray();
                            }
                        }
                    };
                    messageTray.setMessages(msgs);
                    TrayLocation location = TrayLocation.RIGHT;
                    switch(canvasProperties.getMessagePosition()) {
                        case BOTTOM:
                            location = TrayLocation.BOTTOM;
                            break;
                        case LEFT:
                            location = TrayLocation.LEFT;
                            break;
                        case RIGHT:
                            location = TrayLocation.RIGHT;
                            break;
                        case TOP:
                            location = TrayLocation.TOP;
                            break;
                        default:
                            break;
                    }
                    trayPane.openTray(location, messageTray, canvasProperties.getMessagePaneSize());
                }
            }
        }

        @Override
        public void add(EJInternalBlock block) {
        }

        @Override
        public EJCanvasType getType() {
            return EJCanvasType.TAB;
        }
    };
    _canvases.put(canvasProperties.getName(), canvasHandler);
    if (!canvasProperties.getCloseableMessagePane()) {
        canvasHandler.setCanvasMessages(Collections.<EJMessage>emptyList());
    }
    _drawerFolders.put(name, folder);
    folder.getFolder().setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));
    Collection<EJDrawerPageProperties> allTabPageProperties = canvasProperties.getDrawerPageContainer().getAllDrawerPageProperties();
    int index = 0;
    for (EJDrawerPageProperties page : allTabPageProperties) {
        DrawerTab tab = folder.newTab(page);
        if (page.isVisible()) {
            tab.create(index == 0);
        }
        tab.setIndex(index);
        index++;
        folder.put(page.getName(), tab);
    }
    if (_drawerFoldersCache.containsKey(name)) {
        folder.showPage(_drawerFoldersCache.get(name));
        _drawerFoldersCache.remove(name);
    }
    _canvasesIds.add(name);
}
Also used : DrawerTab(org.entirej.applicationframework.rwt.renderers.form.EJDrawerFolder.DrawerTab) EJInternalBlock(org.entirej.framework.core.internal.EJInternalBlock) Point(org.eclipse.swt.graphics.Point) TrayLocation(org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayDialog.TrayLocation) GridData(org.eclipse.swt.layout.GridData) Collection(java.util.Collection) EJRWTTrayPane(org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayPane) EJDrawerPageProperties(org.entirej.framework.core.properties.interfaces.EJDrawerPageProperties)

Aggregations

Collection (java.util.Collection)6 TrayLocation (org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayDialog.TrayLocation)6 EJRWTTrayPane (org.entirej.applicationframework.rwt.application.form.containers.EJRWTTrayPane)6 EJInternalBlock (org.entirej.framework.core.internal.EJInternalBlock)6 EJCanvasProperties (org.entirej.framework.core.properties.interfaces.EJCanvasProperties)3 ScrolledComposite (org.eclipse.swt.custom.ScrolledComposite)2 Point (org.eclipse.swt.graphics.Point)2 FillLayout (org.eclipse.swt.layout.FillLayout)2 GridData (org.eclipse.swt.layout.GridData)2 EJRWTEntireJGridPane (org.entirej.applicationframework.rwt.layout.EJRWTEntireJGridPane)2 EJRWTScrolledComposite (org.entirej.applicationframework.rwt.layout.EJRWTScrolledComposite)2 ArrayList (java.util.ArrayList)1 CTabFolder (org.eclipse.swt.custom.CTabFolder)1 SashForm (org.eclipse.swt.custom.SashForm)1 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 Composite (org.eclipse.swt.widgets.Composite)1 Control (org.eclipse.swt.widgets.Control)1 Group (org.eclipse.swt.widgets.Group)1 EJRWTEntireJStackedPane (org.entirej.applicationframework.rwt.layout.EJRWTEntireJStackedPane)1