Examples of EnhancedHLayout


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

        form.setLayoutAlign(VerticalAlignment.CENTER);

        final DashboardPortlet storedPortlet = portletWindow.getStoredPortlet();

        //horizontal display component
        EnhancedHLayout row = new EnhancedHLayout();

        //-------------combobox for number of platforms to display on the dashboard
        final SelectItem maximumPlatformsComboBox = new SelectItem(AUTODISCOVERY_PLATFORM_MAX);
        maximumPlatformsComboBox.setTitle(MSG.common_title_show());
        maximumPlatformsComboBox.setHint("<nobr><b> " + MSG.view_portlet_autodiscovery_setting_platforms()
            + "</b></nobr>");
        //spinder 9/3/10: the following is required workaround to disable editability of combobox.
        maximumPlatformsComboBox.setType("selection");
        //define acceptable values for display amount
        String[] displayValues = { "1", "2", "5", "10", unlimitedString };
        maximumPlatformsComboBox.setValueMap(displayValues);
        //set width of dropdown display region
        maximumPlatformsComboBox.setWidth(100);
        maximumPlatformsComboBox.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                String selectedItem = "" + event.getValue();
                //store in master form for retrieval
                form.setValue(AUTODISCOVERY_PLATFORM_MAX, selectedItem);
            }
        });

        DynamicForm item = new DynamicForm();
        item.setFields(maximumPlatformsComboBox);
        row.addMember(item);

        //default selected value to 'unlimited'(live lists) and check both combobox settings here.
        PropertySimple simpleProperty = null;
        String retrieved = unlimited;
View Full Code Here

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

            HLayout spacer = new HLayout();
            spacer.setWidth(12);
            buttonBar.addMember(spacer);

            EnhancedHLayout deleteControlsLayout = new EnhancedHLayout();
            deleteControlsLayout.setMargin(3);
            deleteControlsLayout.setMembersMargin(3);
            deleteControlsLayout.setWidth100();
            DynamicForm deleteForm = new DynamicForm();
            deleteForm.setWidth100();

            final SelectItem selectItem = new SortedSelectItem();
            selectItem.setMultiple(true);
            selectItem.setMultipleAppearance(MultipleAppearance.GRID);
            selectItem.setTitle(MSG.common_button_delete());
            selectItem.setValueMap(propertyDefinitionMap.getMap().keySet()
                .toArray(new String[propertyDefinitionMap.getMap().size()]));

            final EnhancedIButton okButton = new EnhancedIButton(MSG.common_button_ok(), ButtonColor.BLUE);
            okButton.setDisabled(true);
            okButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
                public void onClick(ClickEvent clickEvent) {
                    SC.confirm(MSG.view_configEdit_confirm_1(), new BooleanCallback() {
                        @Override
                        public void execute(Boolean confirmed) {
                            if (confirmed) {
                                Object value = selectItem.getValue();
                                if (value != null) {
                                    String stringValue = value.toString();
                                    String[] memberPropertyNames = stringValue.split(",");
                                    for (final String memberPropertyName : memberPropertyNames) {
                                        PropertySimple memberPropertySimple = propertyMap.getSimple(memberPropertyName);
                                        removePropertyFromDynamicMap(memberPropertySimple);
                                        firePropertyChangedEvent(propertyMap, propertyDefinitionMapFinal, true);
                                    }
                                }

                                reload();
                                CoreGUI.getMessageCenter().notify(
                                    new Message(MSG.view_configEdit_msg_2(), EnumSet.of(Message.Option.Transient)));
                            }
                        }
                    });
                }
            });

            selectItem.addChangedHandler(new ChangedHandler() {
                @Override
                public void onChanged(ChangedEvent changedEvent) {
                    Object value = changedEvent.getValue();
                    if (value != null) {
                        String stringValue = value.toString();
                        String[] memberPropertyNames = stringValue.split(",");
                        okButton.setDisabled(memberPropertyNames.length == 0);
                    }
                }
            });

            deleteForm.setFields(selectItem);
            deleteControlsLayout.addMember(deleteForm);
            deleteControlsLayout.addMember(okButton);

            buttonBar.addMember(deleteControlsLayout);
            layout.addMember(buttonBar);
        }
View Full Code Here

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

    private void buildUI() {

        dynamicForm = new DynamicForm();
        dynamicForm.setNumCols(3);

        operationArgumentsCanvasItem = new EnhancedHLayout();
        operationArgumentsCanvasItem.setOverflow(Overflow.VISIBLE);
        operationArgumentsCanvasItem.setHeight(400);
        operationArgumentsCanvasItem.setWidth(500);

        operationSelectItem = new SortedSelectItem("operationSelectItem",
View Full Code Here

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

        //vertical layout
        VStack column = new VStack();

        //horizontal layout
        EnhancedHLayout sheduledOperationsLayout = new EnhancedHLayout();

        final CheckboxItem enableScheduledOperationsGrouping = new CheckboxItem();
        enableScheduledOperationsGrouping.setName(OPERATIONS_RANGE_SCHEDULED_ENABLED);
        enableScheduledOperationsGrouping.setTitle(" " + MSG.view_portlet_operations_config_show_next() + " ");
        enableScheduledOperationsGrouping.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                String selectedItem = "" + event.getValue();
                //stuff into the master form for retrieval
                form.setValue(OPERATIONS_RANGE_SCHEDULED_ENABLED, selectedItem);
            }
        });

        //wrap field item in dynamicform for addition
        DynamicForm fieldWrapper = new DynamicForm();
        fieldWrapper.setFields(enableScheduledOperationsGrouping);
        sheduledOperationsLayout.addMember(fieldWrapper);

        //retrieve previous value otherwise initialize to true(live unlimited list)
        PropertySimple property = storedPortlet.getConfiguration().getSimple(OPERATIONS_RANGE_SCHEDULED_ENABLED);
        if (property != null) {
            enableScheduledOperationsGrouping.setValue(property.getBooleanValue());
        } else {
            enableScheduledOperationsGrouping.setValue(true);
        }

        //------------- Build second combobox for timeframe for problem resources search.
        final SelectItem maximumScheduledOperationsComboBox = new SelectItem(OPERATIONS_RANGE_SCHEDULED);
        maximumScheduledOperationsComboBox.setTitle("");
        maximumScheduledOperationsComboBox.setHint("<nobr><b> " + MSG.common_label_scheduled_operations()
            + ".</b></nobr>");
        maximumScheduledOperationsComboBox.setType("selection");
        //define acceptable values for display amount
        String[] acceptableDisplayValues = { "1", "5", "10", "15", unlimitedString };
        maximumScheduledOperationsComboBox.setValueMap(acceptableDisplayValues);
        maximumScheduledOperationsComboBox.setWidth(100);
        maximumScheduledOperationsComboBox.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                String selectedItem = "" + event.getValue();
                //stuff into the master form for retrieval
                form.setValue(OPERATIONS_RANGE_SCHEDULED, selectedItem);
            }
        });

        String retrieved = defaultValue;

        if ((property = storedPortlet.getConfiguration().getSimple(OPERATIONS_RANGE_SCHEDULED)) != null) {
            retrieved = property.getStringValue();
            // protect against legacy issue with non-numeric values
            try {
                Integer.parseInt(retrieved);
            } catch (NumberFormatException e) {
                retrieved = unlimited;
            }
        }

        //prepopulate the combobox with the previously stored selection
        String selectedValue = retrieved.equals(unlimited) ? unlimitedString : retrieved;

        //prepopulate the combobox with the previously stored selection
        maximumScheduledOperationsComboBox.setDefaultValue(selectedValue);
        DynamicForm fieldWrapper2 = new DynamicForm();
        fieldWrapper2.setFields(maximumScheduledOperationsComboBox);
        sheduledOperationsLayout.addMember(fieldWrapper2);
        column.addMember(sheduledOperationsLayout);
        form.addChild(column);

        //submit handler
        form.addSubmitValuesHandler(new SubmitValuesHandler() {
View Full Code Here

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

            loadLabel.addStyleName("formTitle");
            loadLabel.setHoverWidth(300);
            loadLayout.setMembers(spacer, loadLabel, info);

            if (detailsAndLoadLayout == null) {
                detailsAndLoadLayout = new EnhancedHLayout();
            }
            initSectionCount++;
        } else {
            GWTServiceLookup.getStorageService().findStorageNodeLoadDataForLast(storageNode, 8,
                MeasurementUtility.UNIT_HOURS, 60,
View Full Code Here

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

    private void prepareDetailsSection(final StorageNode storageNode) {
        detailsLayout = new EnhancedVLayout();
        detailsLayout.setWidth("35%");
        detailsLayout.addMember(buildDetailsForm(storageNode));
        if (detailsAndLoadLayout == null) {
            detailsAndLoadLayout = new EnhancedHLayout(0);
        }
        initSectionCount++;
    }
View Full Code Here

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

        loadLabel.setHoverWidth(300);
        loadLayout.setMembers(spacer, loadLabel, loadDataComponent);
        loadDataComponent.redraw();

        if (detailsAndLoadLayout == null) {
            detailsAndLoadLayout = new EnhancedHLayout();
        }
        initSectionCount++;
    }
View Full Code Here

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

        metricsTableView.setHeight100();

        availabilityGraph = AvailabilityD3GraphView.create( new AvailabilityOverUnderGraphType(resource.getId()));

        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

                    getInitialSearchBarSearchText());
                setFilterFormItems(searchFilter);
            }
        }

        carouselHolder = new EnhancedHLayout();
        carouselHolder.setOverflow(Overflow.AUTO);
        carouselHolder.setWidth100();
        contents.addMember(carouselHolder);
    }
View Full Code Here

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

            // Title
            this.titleCanvas = new HTMLFlow();
            setTitleString(this.titleString);

            if (showTitle) {
                titleLayout = new EnhancedHLayout();
                titleLayout.setAutoHeight();
                titleLayout.setAlign(VerticalAlignment.BOTTOM);
                titleLayout.setMembersMargin(4);
                contents.addMember(titleLayout, 0);
            }
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.