Package com.smartgwt.client.widgets.layout

Examples of com.smartgwt.client.widgets.layout.SectionStackSection


        return toolStrip;
    }

    public SectionStackSection buildGroupSection(PropertyGroupDefinition group) {
        SectionStackSection section;
        if (group == null) {
            section = new SectionStackSection(MSG.common_title_generalProp());
            section.setExpanded(true);
        } else {
            String title = "<div style=\"float:left; font-weight: bold;\">"
                + group.getDisplayName()
                + "</div>"
                + (group.getDescription() != null ? ("<div style='border 1px solid red;padding-left: 10px; font-weight: normal; font-size: smaller; float: left;'>"
                    + " - " + group.getDescription() + "</div>")
                    : "");
            section = new SectionStackSection(title);
            section.setName(group.getName());
            section.setExpanded(!group.isDefaultHidden());
        }

        List<PropertyDefinition> propertyDefinitions = new ArrayList<PropertyDefinition>(
            ((group == null) ? configurationDefinition.getNonGroupedProperties()
                : configurationDefinition.getPropertiesInGroup(group.getName())));

        DynamicForm form = buildPropertiesForm(propertyDefinitions, configuration);

        // If the group contains any invalid properties, expand the section so the user can see the error icons next to
        // the invalid properties.
        if (!form.validate()) {
            section.setExpanded(true);
        }

        section.addItem(form);
        return section;
    }
View Full Code Here


    private SectionStack buildAvailableItemsStack() {
        SectionStack availableSectionStack = new SectionStack();
        availableSectionStack.setWidth("*");
        availableSectionStack.setHeight100();

        SectionStackSection availableSection = new SectionStackSection(getAvailableItemsGridTitle());
        availableSection.setCanCollapse(false);
        availableSection.setExpanded(true);

        // Drag'n'Drop Settings
        this.availableGrid.setCanReorderRecords(true);
        this.availableGrid.setCanDragRecordsOut(true);
        this.availableGrid.setDragDataAction(DragDataAction.MOVE);
        if (getItemIcon() != null) {
            this.availableGrid.setDragTrackerMode(DragTrackerMode.ICON);
            this.availableGrid.setTrackerImage(new ImgProperties(getItemIcon(), 16, 16));
        }
        this.availableGrid.setCanAcceptDroppedRecords(true);

        this.availableGrid.setLoadingMessage(MSG.common_msg_loading());
        this.availableGrid.setEmptyMessage(MSG.common_msg_noItemsToShow());

        List<ListGridField> availableFields = new ArrayList<ListGridField>();
        String itemIcon = getItemIcon();
        if (itemIcon != null) {
            ListGridField iconField = new ListGridField("icon", 25);
            iconField.setType(ListGridFieldType.ICON);
            iconField.setCellIcon(itemIcon);
            iconField.setShowDefaultContextMenu(false);
            availableFields.add(iconField);
        }
        ListGridField nameField = new ListGridField(getNameField(), MSG.common_title_name());
        if (supportsNameHoverCustomizer()) {
            nameField.setShowHover(true);
            nameField.setHoverCustomizer(getNameHoverCustomizer());
        }
        availableFields.add(nameField);
        this.availableGrid.setFields(availableFields.toArray(new ListGridField[availableFields.size()]));

        availableSection.setItems(this.availableGrid);
        availableSectionStack.addSection(availableSection);

        this.datasource = getDataSource();
        this.datasource.setDataPageSize(getMaxAvailableRecords());
        // Load data.
View Full Code Here

        SectionStack assignedSectionStack = new SectionStack();
        assignedSectionStack.setWidth("*");
        assignedSectionStack.setHeight100();
        assignedSectionStack.setAlign(Alignment.LEFT);

        SectionStackSection assignedSection = new SectionStackSection(getAssignedItemsGridTitle());
        assignedSection.setCanCollapse(false);
        assignedSection.setExpanded(true);

        // Drag'n'Drop Settings
        this.assignedGrid.setCanReorderRecords(true);
        this.assignedGrid.setCanDragRecordsOut(true);
        this.assignedGrid.setDragDataAction(DragDataAction.MOVE);
        if (getItemIcon() != null) {
            this.assignedGrid.setDragTrackerMode(DragTrackerMode.ICON);
            this.assignedGrid.setTrackerImage(new ImgProperties(getItemIcon(), 16, 16));
        }
        this.assignedGrid.setCanAcceptDroppedRecords(true);

        this.assignedGrid.setLoadingMessage(MSG.common_msg_loading());
        this.assignedGrid.setEmptyMessage(MSG.common_msg_noItemsToShow());

        List<ListGridField> assignedFields = new ArrayList<ListGridField>();
        String itemIcon = getItemIcon();
        if (itemIcon != null) {
            ListGridField iconField = new ListGridField("icon", 25);
            iconField.setType(ListGridFieldType.ICON);
            iconField.setCellIcon(itemIcon);
            iconField.setShowDefaultContextMenu(false);
            assignedFields.add(iconField);
        }
        ListGridField nameField = new ListGridField(getNameField(), MSG.common_title_name());
        if (supportsNameHoverCustomizer()) {
            nameField.setShowHover(true);
            nameField.setHoverCustomizer(getNameHoverCustomizer());
        }

        assignedFields.add(nameField);
        this.assignedGrid.setFields(assignedFields.toArray(new ListGridField[assignedFields.size()]));

        assignedSection.setItems(this.assignedGrid);
        assignedSectionStack.addSection(assignedSection);

        // Load data.
        if (this.initialSelection != null) {
            this.assignedGrid.setData(this.initialSelection);
View Full Code Here

                    sectionStack.setShowResizeBar(true);
                    sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
                    sectionStack.setWidth(250);
                    sectionStack.setHeight100();

                    SectionStackSection bundlesSection = new SectionStackSection(MSG.common_title_bundles());
                    bundleTreeView = new BundleTreeView();
                    bundlesSection.addItem(bundleTreeView);
                    sectionStack.addSection(bundlesSection);

                    addMember(sectionStack);

                    contentCanvas = new VLayout();
View Full Code Here

            }
        }.run(); // fire the timer immediately
    }

    private void prepareAgentSection(SectionStack stack) {
        SectionStackSection section = new SectionStackSection(MSG.view_adminTopology_affinityGroups_agetnMembers());
        section.setExpanded(true);
        AgentTableView agentsTable = new AgentTableView(affinityGroupId, true);
        section.setItems(agentsTable);

        agentSection = section;
        initSectionCount++;
        return;
    }
View Full Code Here

        initSectionCount++;
        return;
    }

    private void prepareServerSection(SectionStack stack) {
        SectionStackSection section = new SectionStackSection(MSG.view_adminTopology_affinityGroups_serverMembers());
        section.setExpanded(true);
        ServerTableView serverTable = new ServerTableView(affinityGroupId, true);
        section.setItems(serverTable);

        serverSection = section;
        initSectionCount++;
        return;
    }
View Full Code Here

                });
            }
        });
        footer.addMember(saveButton);
        form.setItems(nameItem);
        SectionStackSection section = new SectionStackSection(MSG.common_title_details());
        section.setExpanded(false);
        section.setItems(form, footer);

        detailsSection = section;
        initSectionCount++;
    }
View Full Code Here

            }
        }.run(); // fire the timer immediately
    }

    private void prepareAssignmentsSection(SectionStack stack, PageList<PartitionEventDetails> eventDetails) {
        SectionStackSection section = new SectionStackSection(
            MSG.view_adminTopology_partitionEventsDetail_agentAssignments());
        section.setExpanded(true);
        if (eventDetails == null || eventDetails.size() == 0) {
            Label nothing = new Label(MSG.view_adminTopology_partitionEventsDetail_agentAssignments_nothing());
            nothing.setMargin(10);
            section.setItems(nothing);
        } else {
            // there is no need for datasource, it is a simple table with two columns
            ListGrid assignments = new ListGrid();
            ListGridField agentName = new ListGridField("agentName", MSG.view_adminTopology_agent_agentName());
            ListGridField serverName = new ListGridField("serverName",
                MSG.view_admin_systemSettings_serverDetails_serverName());
            assignments.setFields(agentName, serverName);
            ListGridRecord[] records = new ListGridRecord[eventDetails.size()];
            for (int i = 0; i < eventDetails.size(); i++) {
                records[i] = new ListGridRecord();
                records[i].setAttribute("agentName", eventDetails.get(i).getAgentName());
                records[i].setAttribute("serverName", eventDetails.get(i).getServerName());
            }
            assignments.setData(records);
            section.setItems(assignments);
        }

        agentSection = section;
        initSectionCount++;
    }
View Full Code Here

            FIELD_EXECUTION_STATUS.title());
        execStatusItem.setValue(partitionEvent.getExecutionStatus());

        form.setItems(ctimeItem, addressItem, eventDetailItem, subjectPortItem, execStatusItem);

        SectionStackSection section = new SectionStackSection(MSG.view_adminTopology_partitionEvents_details());
        section.setExpanded(true);
        section.setItems(form);

        detailsSection = section;
        initSectionCount++;
    }
View Full Code Here

        sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        sectionStack.setWidth100();
        sectionStack.setHeight100();
        sectionStack.setOverflow(Overflow.AUTO);

        agentSection = new SectionStackSection(MSG.view_admin_downloads_agentDownload());
        cliSection = new SectionStackSection(MSG.view_admin_downloads_cliDownload());
        bundleSection = new SectionStackSection(MSG.view_admin_downloads_bundleDownload());
        connectorsSection = new SectionStackSection(MSG.view_admin_downloads_connectorsDownload());
        cliAlertScriptsSection = new SectionStackSection(MSG.view_admin_downloads_cliAlertScriptsDownload());
        scriptModulesSection = new SectionStackSection(MSG.view_admin_downloads_scriptModulesDownload());

        agentSection.setExpanded(false);
        cliSection.setExpanded(false);
        bundleSection.setExpanded(false);
        connectorsSection.setExpanded(false);
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.layout.SectionStackSection

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.