Package com.extjs.gxt.ui.client.widget

Examples of com.extjs.gxt.ui.client.widget.LayoutContainer


            }
        });
        VBoxLayout l = new VBoxLayout();
        l.setVBoxLayoutAlign(VBoxLayout.VBoxLayoutAlign.STRETCH);
        tab.setLayout(l);
        contentContainer = new LayoutContainer();
        contentContainer.setBorders(true);
        contentContainer.setScrollMode(Style.Scroll.AUTO);
        contentContainer.setLayout(new FitLayout());
        contentStore = new ListStore<GWTJahiaNode>();


        List<ColumnConfig> displayColumns = new ArrayList<ColumnConfig>();

        ColumnConfig col = new ColumnConfig("icon", "", 40);
        col.setAlignment(Style.HorizontalAlignment.CENTER);
        col.setRenderer(new GridCellRenderer<GWTJahiaNode>() {
            public String render(GWTJahiaNode modelData, String s, ColumnData columnData, int i, int i1,
                                 ListStore<GWTJahiaNode> listStore, Grid<GWTJahiaNode> g) {
                return ContentModelIconProvider.getInstance().getIcon(modelData).getHTML();
            }
        });
        displayColumns.add(col);
        displayColumns.add(new ColumnConfig("displayName", Messages.get("label.name"), 170));
        ColumnConfig columnConfig = new ColumnConfig("jcr:lastModified", Messages.get("label.lastModif"),
                                                     100);
        columnConfig.setDateTimeFormat(DateTimeFormat.getShortDateTimeFormat());
        displayColumns.add(columnConfig);
        final Grid<GWTJahiaNode> grid = new Grid<GWTJahiaNode>(contentStore, new ColumnModel(displayColumns));

        contentContainer.add(grid);

        grid.setContextMenu(createContextMenu(config.getTableContextMenu(), grid.getSelectionModel()));
        grid.getStore().setMonitorChanges(true);
        grid.setAutoExpandColumn("displayName");
        final LayoutContainer previewLayoutContainer = new LayoutContainer();
        previewLayoutContainer.setLayout(new FitLayout());
        previewLayoutContainer.addStyleName(cssWrapper);
        grid.getSelectionModel().addSelectionChangedListener(new SelectionChangedListener<GWTJahiaNode>() {
            @Override
            public void selectionChanged(SelectionChangedEvent<GWTJahiaNode> gwtJahiaNodeSelectionChangedEvent) {
                JahiaContentManagementService.App.getInstance().getRenderedContent(
                        gwtJahiaNodeSelectionChangedEvent.getSelectedItem().getPath(), null, editLinker.getLocale(),
                        "default", "preview", null, true, config.getName(),
                        new BaseAsyncCallback<GWTRenderResult>() {

                            public void onSuccess(GWTRenderResult gwtRenderResult) {
                                previewLayoutContainer.removeAll();
                                previewLayoutContainer.add(new HTML(gwtRenderResult.getResult()));
                                previewLayoutContainer.layout(true);
                            }
                        });
            }
        });
View Full Code Here


        if (path.endsWith("*")) {
            setBorders(false);
        } else {
            setBorders(true);
        }
        panel = new LayoutContainer();
        //panel.setHorizontalAlign(Style.HorizontalAlignment.CENTER);
        panel.addStyleName("x-small-editor");
        panel.addStyleName("x-panel-header");
        panel.addStyleName("x-panel-placeholder");

View Full Code Here

        this.mainModule = m;
        m.getContainer().addScrollListener(new ScrollListener() {
            @Override
            public void widgetScrolled(ComponentEvent ce) {
                for (Map.Entry<Module, Box> boxEntry : boxes.entrySet()) {
                    LayoutContainer ctn = boxEntry.getKey().getContainer();
                    boxEntry.getValue().setPosition(ctn.getAbsoluteLeft(), ctn.getAbsoluteTop(),ctn.getWidth(), ctn.getHeight());
                    super.widgetScrolled(ce);
                }
            }
        });
View Full Code Here

    public void addHover(Module module) {
        if (boxes.containsKey(module)) {
            return;
        }

        LayoutContainer c = module.getContainer();
        Box b = new Box(c);
//        if (module instanceof ListModule) {
//
//            String name = module.getPath();
//            if (name.contains("/")) {
View Full Code Here

//        private boolean inside = false;

        Box(LayoutContainer ctn) {
            this.ctn = ctn;

            top = new LayoutContainer();
            bottom = new LayoutContainer();
            left = new LayoutContainer();
            right = new LayoutContainer();

            top.setStyleAttribute("z-index", "990");
            bottom.setStyleAttribute("z-index", "990");
            left.setStyleAttribute("z-index", "990");
            right.setStyleAttribute("z-index", "990");
View Full Code Here

    protected transient ImageDragSource dragSource;

    public TabItem create(GWTSidePanelTab config) {
        super.create(config);

        contentContainer = new LayoutContainer();
        contentContainer.setId("images-view");
        contentContainer.setBorders(true);
        contentContainer.setScrollMode(Style.Scroll.AUTOY);

        // data proxy
View Full Code Here

        data.setSplit(true);
        data.setFloatable(true);

        add(list, data);

        cardsContainer = new LayoutContainer(new CardLayout());
        add(cardsContainer, new BorderLayoutData(Style.LayoutRegion.CENTER));

        this.linker = linker;
        this.mainContainer = mainContainer;
        this.bar = new ButtonBar();
View Full Code Here

        addInfoLayer(module, text,textColor,bgcolor,new ArrayList<AbstractImagePrototype>(), removeListener, headerOnly, opacity);
    }

    private void addInfoLayer(Module module, String text, String textColor, String bgcolor, final List<AbstractImagePrototype> images,
                                Listener<ComponentEvent> listener, boolean headerOnly, final String opacity) {
        LayoutContainer layoutContainer = new LayoutContainer();
        RootPanel.get().add(layoutContainer);
        layoutContainer.el().makePositionable(true);
        layoutContainer.setZIndex(1001);
        LayoutContainer container = module.getContainer();
        El el = container.el();
        final boolean header = headerOnly && module instanceof MainModule;
        int totalWidth = 0;
        if (header) {
            for (Component component : module.getHeader().getTools()) {
                totalWidth += component.el().getSize().width;
View Full Code Here

    protected transient DisplayGridDragSource displayGridSource;

    public TabItem create(final GWTSidePanelTab config) {
        super.create(config);

        contentContainer = new LayoutContainer();
        contentContainer.setBorders(true);
        contentContainer.setScrollMode(Style.Scroll.AUTO);
        contentContainer.setLayout(new FitLayout());

        // data proxy
View Full Code Here

        if (container != null) {
            container.removeFromParent();
            container.removeAll();
        }
        if (container == null) {
            container = new LayoutContainer(new BorderLayout());
        }
        tab.add(container);

        tab.setProcessed(true);

        final LayoutContainer layoutContainer = new LayoutContainer(new BorderLayout());
        container.add(layoutContainer, new BorderLayoutData(Style.LayoutRegion.NORTH, 150));

        WorkflowHistoryPanel next = getPanel(locale, engine);
        if (activePanel != null) {
            if (activePanel != next) {
                activePanel.removeFromParent();
            }
        }
        container.add(next, new BorderLayoutData(Style.LayoutRegion.CENTER));

        activePanel = next;

        JahiaContentManagementService.App.getInstance().getWorkflowRules(engine.getNode().getPath(),
                new BaseAsyncCallback<Map<GWTJahiaWorkflowType,List<GWTJahiaWorkflowDefinition>>>() {
                    public void onSuccess(final Map<GWTJahiaWorkflowType,List<GWTJahiaWorkflowDefinition>> result) {
                        workflowRules = result;
                        for (List<GWTJahiaWorkflowDefinition> list : workflowRules.values()) {
                            for (GWTJahiaWorkflowDefinition definition : list) {
                                if (Boolean.TRUE.equals(definition.get("active")) && engine.getNode().getPath().equals(definition.get("definitionPath"))) {
                                    definition.set("set", Boolean.TRUE);
                                }
                            }
                        }

                        final ListStore<GWTJahiaWorkflowType> types = new ListStore<GWTJahiaWorkflowType>();
                        types.add(new ArrayList<GWTJahiaWorkflowType>(workflowRules.keySet()));
                        types.sort("displayName", Style.SortDir.ASC);

                        ColumnModel header = new ColumnModel(Arrays.asList(new ColumnConfig("displayName", "displayName", 300)));

                        final Grid<GWTJahiaWorkflowType> grid = new Grid<GWTJahiaWorkflowType>(types, header);
                        grid.setWidth(250);
                        grid.setHideHeaders(true);
                        grid.setHeight(150);
                        grid.setAutoExpandColumn("displayName");
                        grid.setAutoExpandMax(1200);
                        BorderLayoutData data = new BorderLayoutData(Style.LayoutRegion.WEST, 250);
                        layoutContainer.add(grid, data);

                        FormPanel form = new FormPanel();
                        form.setHeaderVisible(false);
                        form.setLabelWidth(200);
                        form.setFieldWidth(300);
                        final CheckBox box = new CheckBox();
                        box.setFieldLabel(Messages.get("label.workflow.inherited","Same workflow as parent"));
                        form.add(box);

                        final ListStore<GWTJahiaWorkflowDefinition> states = new ListStore<GWTJahiaWorkflowDefinition>();
                        final ComboBox<GWTJahiaWorkflowDefinition> combo = new ComboBox<GWTJahiaWorkflowDefinition>();
                        combo.setFieldLabel(Messages.get("label.workflow","Workflow"));
                        combo.setForceSelection(true);
                        combo.setDisplayField("displayName");
                        combo.setWidth(400);
                        combo.setStore(states);
                        combo.setTypeAhead(true);
                        combo.setTriggerAction(ComboBox.TriggerAction.ALL);
                        form.add(combo);

                        data = new BorderLayoutData(Style.LayoutRegion.CENTER);
                        layoutContainer.add(form, data);


                        grid.getSelectionModel().addSelectionChangedListener(new SelectionChangedListener<GWTJahiaWorkflowType>() {
                            @Override
                            public void selectionChanged(SelectionChangedEvent<GWTJahiaWorkflowType> se) {
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.widget.LayoutContainer

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.