• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java PanelCollapse类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.gwtbootstrap3.client.ui.PanelCollapse的典型用法代码示例。如果您正苦于以下问题:Java PanelCollapse类的具体用法?Java PanelCollapse怎么用?Java PanelCollapse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

PanelCollapse类属于org.gwtbootstrap3.client.ui包,在下文中一共展示了PanelCollapse类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createPanelHeader

点赞 3

import org.gwtbootstrap3.client.ui.PanelCollapse; //导入依赖的package包/类
static PanelHeader createPanelHeader(final PropertyEditorCategory category,
                                     final PanelGroup propertyMenu,
                                     PanelCollapse panelCollapse) {

    final Heading heading = new Heading(HeadingSize.H4);
    final Anchor anchor = GWT.create(Anchor.class);
    anchor.setText(category.getName());
    anchor.setDataToggle(Toggle.COLLAPSE);
    anchor.setDataParent(propertyMenu.getId());
    anchor.setDataTargetWidget(panelCollapse);
    anchor.addStyleName("collapsed");
    heading.add(anchor);

    final PanelHeader header = GWT.create(PanelHeader.class);
    header.add(heading);
    return header;
}
 

开发者ID:kiegroup,
项目名称:appformer,
代码行数:18,
代码来源:PropertyEditorHelper.java

示例2: createPanelCollapse

点赞 3

import org.gwtbootstrap3.client.ui.PanelCollapse; //导入依赖的package包/类
static PanelCollapse createPanelCollapse(final PropertyEditorWidget propertyEditorWidget,
                                         final PropertyEditorCategory category) {
    final PanelCollapse collapse = GWT.create(PanelCollapse.class);
    collapse.addShowHandler(showEvent -> propertyEditorWidget.addExpandedCategory(category.getName()));

    collapse.addHiddenHandler(hiddenEvent -> {
        hiddenEvent.stopPropagation();
        propertyEditorWidget.collapseCategory(category.getName());
    });

    if (propertyEditorWidget.getExpandedCategories().contains(category.getName())) {
        collapse.setIn(true);
    }

    return collapse;
}
 

开发者ID:kiegroup,
项目名称:appformer,
代码行数:17,
代码来源:PropertyEditorHelper.java

示例3: setDataTargetWidget

点赞 3

import org.gwtbootstrap3.client.ui.PanelCollapse; //导入依赖的package包/类
@Override
public void setDataTargetWidget(final Widget widget) {
    super.setDataTargetWidget(widget);
    if (widget instanceof PanelCollapse) {
        final PanelCollapse collapse = (PanelCollapse) widget;
        collapse.addShowHandler(new ShowHandler() {
            @Override
            public void onShow(ShowEvent showEvent) {
                caret.setType(IconType.CARET_UP);
            }
        });
        collapse.addHiddenHandler(new HiddenHandler() {
            @Override
            public void onHidden(HiddenEvent event) {
                caret.setType(IconType.CARET_DOWN);
            }
        });
    }
}
 

开发者ID:kiegroup,
项目名称:appformer,
代码行数:20,
代码来源:TriggerWidget.java

示例4: makePanelGroup

点赞 3

import org.gwtbootstrap3.client.ui.PanelCollapse; //导入依赖的package包/类
private PanelGroup makePanelGroup(final String className,
                                  final boolean isReadOnly) {
    return new PanelGroup() {{
        final PanelCollapse collapse = new PanelCollapse() {{
            add(new PanelBody() {{
                add(makeStencils(className,
                                 isReadOnly));
            }});
        }};
        add(new PanelHeader() {{
            setDataToggle(Toggle.COLLAPSE);
            setDataParent(getId());
            setDataTargetWidget(collapse);
            add(new Heading(HeadingSize.H4) {{
                setText(className);
            }});
        }});
        add(collapse);
    }};
}
 

开发者ID:kiegroup,
项目名称:drools-wb,
代码行数:21,
代码来源:GuidedDecisionTreePalette.java

示例5: makeTriggerWidget

点赞 3

import org.gwtbootstrap3.client.ui.PanelCollapse; //导入依赖的package包/类
private TriggerWidget makeTriggerWidget(final ClientResourceType resourceType,
                                        final PanelCollapse collapse) {
    final String description = getResourceTypeDescription(resourceType);
    if (resourceType.getIcon() != null) {
        return new TriggerWidget(resourceType.getIcon(),
                                 description,
                                 !collapse.isIn()) {{
            setDataToggle(Toggle.COLLAPSE);
            setDataParent(itemsContainer.getId());
            setDataTargetWidget(collapse);
        }};
    }
    return new TriggerWidget(description,
                             !collapse.isIn()) {{
        setDataToggle(Toggle.COLLAPSE);
        setDataParent(itemsContainer.getId());
        setDataTargetWidget(collapse);
    }};
}
 

开发者ID:kiegroup,
项目名称:kie-wb-common,
代码行数:20,
代码来源:BusinessViewWidget.java

示例6: createCategory

点赞 2

import org.gwtbootstrap3.client.ui.PanelCollapse; //导入依赖的package包/类
static void createCategory(final PropertyEditorWidget propertyEditorWidget,
                           final PanelGroup propertyMenu,
                           final PropertyEditorCategory category,
                           final String propertyNameFilter) {

    Panel panel = GWT.create(Panel.class);
    PanelCollapse panelCollapse = createPanelCollapse(propertyEditorWidget,
                                                      category);
    PanelHeader headerPanel = createPanelHeader(category,
                                                propertyMenu,
                                                panelCollapse);
    PanelBody panelBody = createPanelBody();
    Form form = createPanelContent(panelBody);

    boolean categoryHasActiveChilds = false;
    for (final PropertyEditorFieldInfo field : category.getFields()) {
        if (isAMatchOfFilter(propertyNameFilter,
                             field)) {
            categoryHasActiveChilds = true;
            form.add(createItemsWidget(field,
                                       category,
                                       form));
        }
    }
    if (categoryHasActiveChilds) {
        panelCollapse.add(panelBody);
        panel.add(headerPanel);
        panel.add(panelCollapse);
        propertyMenu.add(panel);
    }
}
 

开发者ID:kiegroup,
项目名称:appformer,
代码行数:32,
代码来源:PropertyEditorHelper.java

示例7: getMainPanel

点赞 2

import org.gwtbootstrap3.client.ui.PanelCollapse; //导入依赖的package包/类
private PanelCollapse getMainPanel() {
  PanelCollapse collapse = new PanelCollapse();
  collapse.setId(this.target);
  collapse.add(this.getContentPanel());;
  return collapse;
}
 

开发者ID:KnowledgeCaptureAndDiscovery,
项目名称:ontosoft,
代码行数:7,
代码来源:FacetSelector.java

示例8: renderItems

点赞 2

import org.gwtbootstrap3.client.ui.PanelCollapse; //导入依赖的package包/类
@Override
public void renderItems(FolderListing folderListing) {
    tagSelector.loadContent(presenter.getActiveContentTags(),
                            presenter.getCurrentTag());
    itemsContainer.clear();
    sortedFolderItems.clear();
    for (final FolderItem content : folderListing.getContent()) {
        if (!content.getType().equals(FolderItemType.FOLDER)) {
            sortedFolderItems.add(content);
        }
    }

    if (!sortedFolderItems.isEmpty()) {
        final Map<ClientResourceType, Collection<FolderItem>> resourceTypeGroups = classifier.group(sortedFolderItems);
        final TreeMap<ClientResourceType, Collection<FolderItem>> sortedResourceTypeGroups = new TreeMap<>(Sorters.RESOURCE_TYPE_GROUP_SORTER);
        sortedResourceTypeGroups.putAll(resourceTypeGroups);

        for (final Map.Entry<ClientResourceType, Collection<FolderItem>> entry : sortedResourceTypeGroups.entrySet()) {
            final LinkedGroup itemsNavList = new LinkedGroup();
            itemsNavList.getElement().getStyle().setMarginBottom(0,
                                                                 Style.Unit.PX);
            final PanelCollapse collapse = new PanelCollapse();
            final String collapseId = getCollapseId(entry.getKey());
            final PanelCollapse oldCollapse = collapses.get(collapseId);
            final boolean in = (oldCollapse != null) ? oldCollapse.isIn() : false;
            collapse.setId(collapseId);
            collapse.setIn(in);
            final PanelBody body = new PanelBody();
            body.getElement().getStyle().setPadding(0,
                                                    Style.Unit.PX);
            collapse.add(body);
            body.add(itemsNavList);

            for (FolderItem folderItem : entry.getValue()) {
                itemsNavList.add(makeItemNavLink(entry.getKey(),
                                                 folderItem));
            }

            itemsContainer.add(new Panel() {{
                add(makeTriggerWidget(entry.getKey(),
                                      collapse));
                add(collapse);
            }});

            collapses.put(collapseId,
                          collapse);
        }
    } else {
        itemsContainer.add(new Label(ProjectExplorerConstants.INSTANCE.noItemsExist()));
    }
}
 

开发者ID:kiegroup,
项目名称:kie-wb-common,
代码行数:52,
代码来源:BusinessViewWidget.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)