Package org.brixcms.web.tab

Examples of org.brixcms.web.tab.CachingAbstractTab


        init();
    }

    private void init() {
        List<IBrixTab> tabs = new ArrayList<IBrixTab>();
        tabs.add(new CachingAbstractTab(new ResourceModel("reference")) {
            @Override
            public Panel newPanel(String panelId) {
                return new NodeUrlTab(panelId, getModel()) {
                    @Override
                    protected ReferenceEditorConfiguration getConfiguration() {
                        return configuration;
                    }
                };
            }

            @Override
            public boolean isVisible() {
                return configuration.isAllowNodePicker() || configuration.isAllowURLEdit();
            }
        });
        tabs.add(new CachingAbstractTab(new ResourceModel("queryParameters")) {
            @Override
            public Panel newPanel(String panelId) {
                return new QueryParametersTab(panelId) {
                    @Override
                    protected BrixPageParameters getPageParameters() {
                        return getReference().getParameters();
                    }

                    ;
                };
            }

            @Override
            public boolean isVisible() {
                return configuration.isAllowQueryParameters();
            }
        });
        tabs.add(new CachingAbstractTab(new ResourceModel("indexedParameters")) {
            @Override
            public Panel newPanel(String panelId) {
                return new IndexedParametersTab(panelId) {
                    @Override
                    protected BrixPageParameters getPageParameters() {
View Full Code Here


        List<String> types = Arrays.asList(new String[]{"image/jpeg", "image/gif", "image/png"});
        return mimeType != null && types.contains(mimeType.toLowerCase());
    }

    private static IBrixTab getViewTab(final IModel<BrixNode> nodeModel) {
        return new CachingAbstractTab(new ResourceModel("view", "View"), 100) {
            @Override
            public Panel newPanel(String panelId) {
                return new ViewImagePanel(panelId, nodeModel);
            }
        };
View Full Code Here

public class ManageResourceNodeTabFactory implements ManageNodeTabFactory {
    private static List<IBrixTab> getTabs(final IModel<BrixNode> nodeModel) {
        List<IBrixTab> tabs = new ArrayList<IBrixTab>();

        tabs.add(new CachingAbstractTab(new ResourceModel("properties", "Properties")) {
            @Override
            public Panel newPanel(String panelId) {
                return new ViewPropertiesTab(panelId, nodeModel);
            }
View Full Code Here

import java.util.ArrayList;
import java.util.List;

public class TextNodeTabFactory implements ManageNodeTabFactory {
    private static IBrixTab getViewTab(final IModel<BrixNode> nodeModel) {
        return new CachingAbstractTab(new ResourceModel("view", "View"), 100) {
            @Override
            public Panel newPanel(String panelId) {
                return new ViewTextPanel(panelId, nodeModel);
            }
        };
View Full Code Here

import java.util.Collection;
import java.util.List;

public class ConvertNodeTabFactory implements ManageNodeTabFactory {
    private static IBrixTab newTab(final IModel<BrixNode> nodeModel) {
        return new CachingAbstractTab(new ResourceModel("convert", "Convert"), -1) {
            @Override
            public Panel newPanel(String panelId) {
                return new ConvertTab(panelId, nodeModel);
            }
        };
View Full Code Here

        add(new ProtocolLabel("requiresSSL", new PropertyModel<Boolean>(model, "requiresSSL")));
        add(new Label("mimeType", new PropertyModel<String>(model, "mimeType")));
        // add(new Label("content", new PropertyModel(model, "dataAsString")));

        List<IBrixTab> tabs = new ArrayList<IBrixTab>();
        tabs.add(new CachingAbstractTab(new ResourceModel("textPreview")) {
            @Override
            public Panel newPanel(String panelId) {
                return new TextPreviewPanel(panelId);
            }
        });

        tabs.add(new CachingAbstractTab(new ResourceModel("pagePreview")) {
            @Override
            public Panel newPanel(String panelId) {
                return new IframePreviewPanel(panelId);
            }
        });
View Full Code Here

public class ManageTileNodeTabFactory implements ManageNodeTabFactory {
    private static List<IBrixTab> getTabs(final IModel<BrixNode> nodeModel) {
        List<IBrixTab> tabs = new ArrayList<IBrixTab>();

        tabs.add(new CachingAbstractTab(new ResourceModel("view", "View")) {
            @Override
            public Panel newPanel(String panelId) {
                return new ViewTab(panelId, nodeModel);
            }

            @Override
            public boolean isVisible() {
                return hasViewPermission(nodeModel);
            }
        });

        tabs.add(new CachingAbstractTab(new ResourceModel("tiles", "Tiles")) {
            @Override
            public Panel newPanel(String panelId) {
                return new TilesPanel(panelId, nodeModel);
            }

            @Override
            public boolean isVisible() {
                return hasEditPermission(nodeModel);
            }
        });

        tabs.add(new CachingAbstractTab(new ResourceModel("variables", "Variables")) {
            @Override
            public Panel newPanel(String panelId) {
                return new VariablesPanel(panelId, nodeModel);
            }
View Full Code Here

import java.util.List;

public class ManageFolderNodeTabFactory implements ManageNodeTabFactory {
    public static List<IBrixTab> getTabs(final IModel<BrixNode> folderModel) {
        List<IBrixTab> tabs = new ArrayList<IBrixTab>(2);
        tabs.add(new CachingAbstractTab(new ResourceModel("listing", "Listing"), 100) {
            @Override
            public Panel newPanel(String panelId) {
                return new ListFolderNodesTab(panelId, folderModel);
            }

            @Override
            public boolean isVisible() {
                return SitePlugin.get().canViewNodeChildren(folderModel.getObject(), Context.ADMINISTRATION);
            }
        });
        tabs.add(new CachingAbstractTab(new ResourceModel("properties", "Properties")) {
            @Override
            public Panel newPanel(String panelId) {
                return new PropertiesTab(panelId, folderModel);
            }
View Full Code Here

TOP

Related Classes of org.brixcms.web.tab.CachingAbstractTab

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.