Package com.smartgwt.client.widgets.tab

Examples of com.smartgwt.client.widgets.tab.Tab


    public TwoLevelTab[] getTabs() {
        Tab[] tabs = super.getTabs();
        TwoLevelTab[] twoLevelTabs = new TwoLevelTab[tabs.length];
        for (int i = 0, tabsLength = tabs.length; i < tabsLength; i++) {
            Tab tab = tabs[i];
            if (!(tab instanceof TwoLevelTab)) {
                throw new IllegalStateException("TwoLevelTabSet contains a Tab that is not a TwoLevelTab.");
            }
            twoLevelTabs[i] = (TwoLevelTab) tab;
        }
View Full Code Here


        if (isIgnoreSelectEvents()) {
            return;
        }

        tabSelectedEvent.setTabNum(getSelectedTabNumber());
        Tab tab = getSelectedTab();
        tabSelectedEvent.setId(this.getTabByTitle(tab.getTitle()).getName());
        m.fireEvent(tabSelectedEvent);
    }
View Full Code Here

    }

    private TabSet getDetailsTabSet(ListGridRecord record) {
        TabSet tabset = new NamedTabSet();

        Tab generalTab = new NamedTab(new ViewName("general", MSG.common_title_generalProp()));
        generalTab.setPane(getDetailsTableForAlert(record));

        Tab conditionsTab = new NamedTab(new ViewName("conditions", MSG.view_alert_common_tab_conditions()));
        conditionsTab.setPane(getConditionsForAlert(record));

        Tab notificationsTab = new NamedTab(new ViewName("notifications", MSG.view_alert_common_tab_notifications()));
        notificationsTab.setPane(getNotificationsForAlert(record));

        tabset.addTab(generalTab);
        tabset.addTab(conditionsTab);
        tabset.addTab(notificationsTab);
View Full Code Here

        tagEditor.setExtraSpace(10);
        return tagEditor;
    }

    private Tab createRecipeTab() {
        Tab tab = new Tab(MSG.view_bundle_recipe());
        DynamicForm form = new DynamicForm();

        TextAreaItem recipeCanvas = new TextAreaItem("recipe", MSG.view_bundle_recipe());
        recipeCanvas.setShowTitle(false);
        recipeCanvas.setColSpan(2);
        recipeCanvas.setWidth("100%");
        recipeCanvas.setHeight("100%");
        recipeCanvas.setValue(version.getRecipe());
        recipeCanvas.addChangeHandler(new ChangeHandler() {
            @Override
            public void onChange(ChangeEvent event) {
                // makes this read-only; however, since its not disabled, user can still select/copy the text
                event.cancel();
            }
        });

        form.setHeight100();
        form.setWidth100();
        form.setItems(recipeCanvas);
        tab.setPane(form);
        return tab;
    }
View Full Code Here

        tab.setPane(form);
        return tab;
    }

    private Tab createLiveDeploymentsTab() {
        Tab tab = new Tab(MSG.view_bundle_deployments());
        Criteria criteria = new Criteria();
        criteria.setAttribute("bundleVersionId", version.getId());
        tab.setPane(new BundleDeploymentListView(criteria, this.canDeploy));
        return tab;
    }
View Full Code Here

        tab.setPane(new BundleDeploymentListView(criteria, this.canDeploy));
        return tab;
    }

    private Tab createFilesTab() {
        Tab tab = new Tab(MSG.view_bundle_files());
        FileListView filesView = new FileListView(version.getId());
        tab.setPane(filesView);
        return tab;
    }
View Full Code Here

        this.alertDefView = alertDefView;

        tabSet = new TabSet();
        tabSet.setHeight100();

        generalPropertiesTab = new Tab(MSG.common_title_generalProp());
        generalProperties = new GeneralPropertiesAlertDefinitionForm(alertDefinition);
        generalPropertiesTab.setPane(generalProperties);
        generalPropertiesTab.addTabDeselectedHandler(new TabDeselectedHandler() {

            @Override
            public void onTabDeselected(TabDeselectedEvent event) {
                if (!generalProperties.validate()) {
                    event.cancel();
                }
            }
        });

        Tab conditionsTab = new Tab(MSG.view_alert_common_tab_conditions());
        conditions = new ConditionsAlertDefinitionForm(alertDefView.getResourceType(), alertDefinition);
        conditionsTab.setPane(conditions);

        Tab notificationsTab = new Tab(MSG.view_alert_common_tab_notifications());
        notifications = new NotificationsAlertDefinitionForm(alertDefinition);
        notificationsTab.setPane(notifications);

        Tab recoveryTab = new Tab(MSG.view_alert_common_tab_recovery());
        recovery = new RecoveryAlertDefinitionForm(alertDefView.getAlertDefinitionDataSource(), alertDefinition);
        recoveryTab.setPane(recovery);

        Tab dampeningTab = new Tab(MSG.view_alert_common_tab_dampening());
        dampening = new DampeningAlertDefinitionForm(alertDefinition);
        dampeningTab.setPane(dampening);

        tabSet.setTabs(generalPropertiesTab, conditionsTab, notificationsTab, recoveryTab, dampeningTab);

        final HLayout buttons = new HLayout();
        buttons.setMembersMargin(20);
View Full Code Here

    protected boolean isFormReadOnly() {
        return !canManage;
    }

    private Tab buildBundlesTab(TabSet tabSet) {
        Tab tab = new Tab(MSG.common_title_bundles(), ImageManager.getBundleIcon());
        // NOTE: We will set the tab content to the bundle selector later, once the Bundle Group has been fetched.

        return tab;
    }
View Full Code Here

        HeaderLabel headerLabel = new HeaderLabel(IconEnum.BUNDLE.getIcon24x24Path(), StringUtility.escapeHtml(bundle
            .getName()));
        tabs = new TabSet();
        versionsTab = createVersionsTab();
        destinationsTab = createDestinationsTab();
        Tab bundleGroupsTab = createBundleGroupsTab();
        tabs.addTab(versionsTab);
        tabs.addTab(destinationsTab);
        tabs.addTab(bundleGroupsTab);

        addMember(backButton);
View Full Code Here

        tagEditor.setExtraSpace(10);
        return tagEditor;
    }

    private Tab createDestinationsTab() {
        Tab destinationsTab = new Tab(MSG.view_bundle_destinations());
        Criteria criteria = new Criteria();
        criteria.addCriteria("bundleId", bundle.getId());
        destinationsTab.setPane(new BundleDestinationListView(criteria));
        return destinationsTab;
    }
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.tab.Tab

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.