Examples of EnhancedHLayout


Examples of org.rhq.coregui.client.util.enhanced.EnhancedHLayout

    private ArrayList<EnhancedHLayout> createTagLayouts() {
        ArrayList<EnhancedHLayout> tagLayouts = new ArrayList<EnhancedHLayout>(tags.size());

        for (final Tag tag : tags) {
            EnhancedHLayout tagLayout = new EnhancedHLayout();
            tagLayout.setHeight(20);

            HTMLFlow tagString = new HTMLFlow("<nobr><a href=\"" + LinkManager.getTagLink(tag.toString()) + "\">"
                + tag.toString() + "</a></nobr>");
            tagString.setAutoWidth();
            tagLayout.addMember(tagString);

            if (!readOnly) {
                final LayoutSpacer spacer = new LayoutSpacer();
                spacer.setHeight(16);
                spacer.setWidth(16);

                final Img remove = new Img("[skin]/images/actions/remove.png", 16, 16);
                remove.setTooltip(MSG.view_tags_tooltip_1());
                remove.addClickHandler(new ClickHandler() {
                    public void onClick(ClickEvent clickEvent) {
                        tags.remove(tag);
                        save();
                    }
                });

                tagLayout.addMember(remove);
                tagLayout.addMember(spacer);
                remove.hide();

                tagLayout.addMouseOverHandler(new MouseOverHandler() {
                    public void onMouseOver(MouseOverEvent mouseOverEvent) {
                        remove.show();
                        spacer.hide();
                    }
                });
                tagLayout.addMouseOutHandler(new MouseOutHandler() {
                    public void onMouseOut(MouseOutEvent mouseOutEvent) {
                        spacer.show();
                        remove.hide();
                    }
                });
View Full Code Here

Examples of org.rhq.coregui.client.util.enhanced.EnhancedHLayout

        EnhancedVLayout vLayout = new EnhancedVLayout();
        vLayout.setAlign(VerticalAlignment.CENTER);
        vLayout.setLayoutMargin(6);

        EnhancedHLayout hLayout = new EnhancedHLayout();
        vLayout.addMember(hLayout);

        this.label = new Label();
        this.label.setWidth("*");
        this.label.setIcon(icon);
        this.label.setIconWidth(24);
        this.label.setIconHeight(24);
        this.label.setAutoHeight();
        hLayout.addMember(this.label);

        setVisible(false);
        addMember(vLayout);

        setTitle(title);
View Full Code Here

Examples of org.rhq.coregui.client.util.enhanced.EnhancedHLayout

    @Override
    protected EnhancedVLayout buildContentPane() {
        EnhancedVLayout contentPane = super.buildContentPane();

        this.operationParametersConfigurationHolder = new EnhancedHLayout();
        this.operationParametersConfigurationHolder.setVisible(false);
        contentPane.addMember(this.operationParametersConfigurationHolder);

        HTMLFlow hr = new HTMLFlow("<hr/>");
        contentPane.addMember(hr);
View Full Code Here

Examples of org.rhq.coregui.client.util.enhanced.EnhancedHLayout

    public void update() {
        for (Canvas child : getChildren()) {
            child.destroy();
        }

        final EnhancedHLayout hlayout = new EnhancedHLayout();
        hlayout.setStyleName("resourceSummary");

        addMember(hlayout);

        this.title = new HTMLFlow();
        this.title.setWidth("*");

        this.explicitAvailabilityImage = new Img(ImageManager.getAvailabilityLargeIcon(null), 24, 24);
        this.explicitAvailabilityImage.setTooltip(MSG.view_group_detail_explicitAvail());
        this.implicitAvailabilityImage = new Img(ImageManager.getAvailabilityLargeIcon(null), 24, 24);
        this.implicitAvailabilityImage.setTooltip(MSG.view_group_detail_implicitAvail());

        if (this.supportsFavorite) {
            this.favoriteButton = new Img(NOT_FAV_ICON, 24, 24);

            this.favoriteButton.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent clickEvent) {
                    Set<Integer> favorites = toggleFavoriteLocally();
                    UserSessionManager.getUserPreferences().setFavoriteResourceGroups(favorites,
                        new UpdateFavoritesCallback());
                }
            });
        }

        expandCollapseArrow = new Img("[SKIN]/ListGrid/row_collapsed.png", 16, 16);
        expandCollapseArrow.setTooltip(COLLAPSED_TOOLTIP);
        expandCollapseArrow.setLayoutAlign(VerticalAlignment.CENTER);
        ResourceGroupCriteria criteria = new ResourceGroupCriteria();
        criteria.addFilterId(this.group.getId());
        // for autoclusters and autogroups we need to add more criteria
        if (isAutoCluster) {
            criteria.addFilterVisible(false);
        } else if (isAutoGroup) {
            criteria.addFilterVisible(false);
            criteria.addFilterPrivate(true);
        }

        GWTServiceLookup.getResourceGroupService().findResourceGroupCompositesByCriteria(criteria,
            new AsyncCallback<PageList<ResourceGroupComposite>>() {
                @Override
                public void onSuccess(PageList<ResourceGroupComposite> result) {
                    if (result == null || result.size() != 1) {
                        CoreGUI.getErrorHandler().handleError(
                            MSG.view_titleBar_group_failInfo(group.getName(),
                                String.valueOf(ResourceGroupTitleBar.this.group.getId())));
                        return;
                    }

                    ResourceGroupComposite resultComposite = result.get(0);
                    setGroupIcons(resultComposite);

                    // Localize the default group name for an AutoCluster with disparate members (see setGroup()).
                    if (isAutoCluster) {
                        resultComposite.getResourceGroup().setName(group.getName());
                    }

                    generalProperties = new GeneralProperties(resultComposite, ResourceGroupTitleBar.this,
                        (!(isAutoGroup || isAutoCluster)));
                    generalProperties.setVisible(false);

                    ResourceGroupTitleBar.this.addMember(generalProperties);
                    expandCollapseArrow.addClickHandler(new ClickHandler() {
                        private boolean collapsed = true;

                        @Override
                        public void onClick(ClickEvent event) {
                            collapsed = !collapsed;
                            if (collapsed) {
                                expandCollapseArrow.setSrc("[SKIN]/ListGrid/row_collapsed.png");
                                expandCollapseArrow.setTooltip(COLLAPSED_TOOLTIP);
                                generalProperties.hide();
                            } else {
                                expandCollapseArrow.setSrc("[SKIN]/ListGrid/row_expanded.png");
                                expandCollapseArrow.setTooltip(EXPANDED_TOOLTIP);
                                generalProperties.show();
                            }
                            ResourceGroupTitleBar.this.markForRedraw();
                        }
                    });
                }

                @Override
                public void onFailure(Throwable caught) {
                    CoreGUI.getErrorHandler().handleError(
                        MSG.view_titleBar_group_failInfo(group.getName(),
                            String.valueOf(ResourceGroupTitleBar.this.group.getId())), caught);
                }
            });

        badge = new Img(ImageManager.getGroupLargeIcon(GroupCategory.MIXED), 24, 24);
        badge.setLayoutAlign(VerticalAlignment.CENTER);


        TagEditorView tagEditorView = new TagEditorView(group.getTags(), false, new TagsChangedCallback() {
            public void tagsChanged(final HashSet<Tag> tags) {
                GWTServiceLookup.getTagService().updateResourceGroupTags(group.getId(), tags,
                    new AsyncCallback<Void>() {
                        public void onFailure(Throwable caught) {
                            CoreGUI.getErrorHandler().handleError(
                                MSG.view_titleBar_common_updateTagsFailure(group.getName()), caught);
                        }

                        public void onSuccess(Void result) {
                            CoreGUI.getMessageCenter().notify(
                                new Message(MSG.view_titleBar_common_updateTagsSuccessful(group.getName()),
                                    Message.Severity.Info));
                            // update what is essentially our local cache
                            group.setTags(tags);
                        }
                    });
            }
        });

        loadTags(tagEditorView);

        hlayout.addMember(expandCollapseArrow);
        hlayout.addMember(badge);
        hlayout.addMember(title);
        hlayout.addMember(explicitAvailabilityImage);
        hlayout.addMember(implicitAvailabilityImage);
        if (this.supportsFavorite) {
            hlayout.addMember(favoriteButton);
        }

        //conditionally add tags. Defaults to true, not available in JON builds.
        if (CoreGUI.isTagsEnabledForUI()) {
            addMember(tagEditorView);
View Full Code Here

Examples of org.rhq.coregui.client.util.enhanced.EnhancedHLayout

        boolean isEditable = (detailsView instanceof DetailsView && ((DetailsView) detailsView).isEditable());
        if (!isEditable) {
            // Only add the "Back to List" button if the details are definitely not editable, because if they are
            // editable, a Cancel button should already be provided by the details view.
            BackButton backButton = new BackButton(MSG.view_tableSection_backButton(), basePath);
            HLayout hlayout = new EnhancedHLayout();
            hlayout.addMember(backButton);
            if (header != null) {
                header.setWidth100();
                header.setAlign(com.smartgwt.client.types.Alignment.CENTER);
                hlayout.addMember(header);
            }
            detailsHolder.addMember(hlayout);
            LayoutSpacer verticalSpacer = new LayoutSpacer();
            verticalSpacer.setHeight(8);
            detailsHolder.addMember(verticalSpacer);
View Full Code Here

Examples of org.rhq.coregui.client.util.enhanced.EnhancedHLayout

        metricsTableView.setHeight100();

        availabilityGraph = AvailabilityD3GraphView.create(new AvailabilityOverUnderGraphType(entityContext
            .getGroupId()));

        expandCollapseHLayout = new EnhancedHLayout();
        //add expand/collapse icon
        final Img expandCollapseArrow = new Img(IconEnum.COLLAPSED_ICON.getIcon16x16Path(), 16, 16);
        expandCollapseArrow.setTooltip(COLLAPSED_TOOLTIP);
        expandCollapseArrow.setLayoutAlign(VerticalAlignment.BOTTOM);
        expandCollapseArrow.addClickHandler(new ClickHandler() {
View Full Code Here

Examples of org.rhq.coregui.client.util.enhanced.EnhancedHLayout

            removeMembers();
        }

        addMember(buttonBarDateTimeRangeEditor);

        titleHLayout = new EnhancedHLayout();

        if (definition != null) {
            titleHLayout.setAutoHeight();
            titleHLayout.setWidth100();
View Full Code Here

Examples of org.rhq.coregui.client.util.enhanced.EnhancedHLayout

            EnhancedVLayout vLayout = new EnhancedVLayout();
            vLayout.setAlign(VerticalAlignment.CENTER);
            vLayout.setLayoutMargin(4);

            EnhancedHLayout hLayout = new EnhancedHLayout();
            hLayout.setMembersMargin(10);
            vLayout.addMember(hLayout);

            saveButton = new EnhancedIButton(MSG.common_button_save(), ButtonColor.BLUE);
            saveButton.setDisabled(true);
            saveButton.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent clickEvent) {
                    save(new DSRequest());
                }
            });
            hLayout.addMember(saveButton);

            resetButton = new EnhancedIButton(MSG.common_button_reset());
            resetButton.setDisabled(true);
            resetButton.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent clickEvent) {
                    resetButton.disable();
                    saveButton.disable();
                    reset();
                }
            });
            hLayout.addMember(resetButton);

            cancelButton = new EnhancedIButton(MSG.common_button_cancel());
            cancelButton.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent clickEvent) {
                    CoreGUI.goToView(getListViewPath());
                }
            });
            hLayout.addMember(cancelButton);

            addMember(vLayout);
        }
View Full Code Here

Examples of org.rhq.coregui.client.util.enhanced.EnhancedHLayout

        super();

        this.platformTree = platformTree;

        //define two rows of content
        top = new EnhancedHLayout();
        details = new EnhancedHLayout();
        details.setWidth100();

        //modify VLayout settings
        setWidth100();
        setHeight(30);
View Full Code Here

Examples of org.rhq.coregui.client.util.enhanced.EnhancedHLayout

        //top.addMember(loading);
        top.addMember(availabilityImage);
        top.addMember(favoriteButton);
        top.setStyleName("resourceSummary");

        detailsForm = new EnhancedHLayout();
        detailsForm.setWidth100();
        detailsForm.setHeight(10);
        detailsForm.setAlign(Alignment.LEFT);

        detailsFormSummary = new OverviewForm(resourceComposite, this);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.