Java Code Examples for com.google.gwt.user.client.ui.VerticalPanel#setStyleName()

The following examples show how to use com.google.gwt.user.client.ui.VerticalPanel#setStyleName() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
public Widget asWidget() {


        VerticalPanel panel = new VerticalPanel();
        panel.setStyleName("fill-layout-width");


        ToolStrip tools = new ToolStrip();
        tools.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_reset(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                log.flush();
            }
        }));

        panel.add(tools);
        panel.add(tree);

        // update
        updateTreee();

        return panel;
    }
 
Example 2
public Widget build() {

        if(null==form)
            throw new IllegalStateException("form not set");

        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("fill-layout-width");
        layout.getElement().setAttribute("style", "margin-top:15px;");

        if(tools!=null)layout.add(tools.asWidget());
        if(help!=null)layout.add(help.asWidget());
        layout.add(form.asWidget());

        return layout;
    }
 
Example 3
Source Project: EasyML   File: StdPanel.java    License: Apache License 2.0 5 votes vote down vote up
protected void init(String msg, String title) {
	this.setTitle("stdErr");
	this.setGlassEnabled(true);

	HTML closeButton = new HTML("X");
	closeButton.setSize("10px", "10px");
	closeButton.setStyleName("closebtn");
	closeButton.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			StdPanel.this.hide();
		}
	});

	ScrollPanel scvp = new ScrollPanel();
	VerticalPanel verticalPanel = new VerticalPanel();

	verticalPanel.add(closeButton);
	verticalPanel.setCellHeight(closeButton, "30px");
	verticalPanel.setStyleName("vpanel");
	HTML desc = new HTML(title);
	desc.setStyleName("popupTitle");
	verticalPanel.add(desc);
	verticalPanel.setCellHeight(desc, "30px");

	TextArea label = new TextArea();
	label.setText(msg);
	label.setReadOnly(true);
	label.setSize("650px", "400px");
	verticalPanel.add(label);
	scvp.add(verticalPanel);
	this.add(scvp);
	this.setStyleName("loading_container");
	this.center();
	this.show();
}
 
Example 4
public Widget asWidget() {
    VerticalPanel layout = new VerticalPanel();
    layout.setStyleName("window-content");

    Form<ActivemqAddressingPattern> form = new Form<>(ActivemqAddressingPattern.class,
            "{selected.profile}/subsystem=messaging-activemq/server=*/address-setting=*");

    TextBoxItem pattern = new TextBoxItem("pattern", "Pattern");
    TextBoxItem dlQ = new TextBoxItem("deadLetterQueue", "Dead Letter Address");
    TextBoxItem expQ = new TextBoxItem("expiryQueue", "Expiry Address");
    NumberBoxItem redelivery = new NumberBoxItem("redeliveryDelay", "Redelivery Delay");
    NumberBoxItem maxAttempts = new NumberBoxItem("maxDelivery", "Max Delivery Attempts", -1, Integer.MAX_VALUE);
    form.setFields(pattern, dlQ, expQ, redelivery, maxAttempts);

    // TODO: defaults
    dlQ.setValue("jms.queue.DLQ");
    expQ.setValue("jms.queue.ExpiryQueue");
    redelivery.setValue(0);
    maxAttempts.setValue(10);

    layout.add(form.asWidget());
    DialogueOptions options = new DialogueOptions(
            //submit
            event -> {
                FormValidation validation = form.validate();
                if (!validation.hasErrors()) {
                    presenter.onCreateAddressPattern(form.getUpdatedEntity());
                }
            },
            // cancel
            event -> presenter.closeDialogue()
    );

    return new WindowContentBuilder(layout, options).build();
}
 
Example 5
protected Widget buildFormPanel(final ResourceDescription definition, SecurityContext securityContext) {
    final ModelNodeFormBuilder.FormAssets formAssets = new ModelNodeFormBuilder()
            .setConfigOnly()
            .setResourceDescription(definition)
            .setSecurityContext(securityContext).build();
    formAssets.getForm().setToolsCallback(new FormCallback() {
        @Override
        public void onSave(Map changeSet) {
            IOPanel.this.onModify(selectionModel.getSelectedObject().getName(),
                    formAssets.getForm().getChangedValues());
        }

        @Override
        public void onCancel(Object entity) {
            formAssets.getForm().cancel();
        }
    });

    selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
        @Override
        public void onSelectionChange(SelectionChangeEvent event) {
            Property worker = selectionModel.getSelectedObject();
            if (worker != null) {
                formAssets.getForm().edit(worker.getValue());
            } else {
                formAssets.getForm().clearValues();
            }
        }
    });

    VerticalPanel formPanel = new VerticalPanel();
    formPanel.setStyleName("fill-layout-width");
    formPanel.add(formAssets.getHelp().asWidget());
    formPanel.add(formAssets.getForm().asWidget());

    return formPanel;
}
 
Example 6
@Override
public Widget asWidget() {
    formAssets = new ModelNodeFormBuilder()
            .setConfigOnly()
            .setResourceDescription(resourceDescription)
            .setSecurityContext(securityContext).build();
    formAssets.getForm().setToolsCallback(new FormCallback() {
        @Override
        @SuppressWarnings("unchecked")
        public void onSave(Map changeSet) {
            if (connectorName != null) {
                SaslSingletonEditor.this.onSave(connectorName, changeSet);
            }
        }

        @Override
        public void onCancel(Object entity) {
            formAssets.getForm().cancel();
        }
    });

    VerticalPanel formPanel = new VerticalPanel();
    formPanel.setStyleName("fill-layout-width");
    formPanel.add(formAssets.getHelp().asWidget());
    formPanel.add(formAssets.getForm().asWidget());

    return formPanel;
}
 
Example 7
/**
 * FilePath
 */
public FilePath() {
	panel = new VerticalPanel();
	path = new HTML(Main.i18n("filebrowser.path") + ": ", false);
	panel.setStyleName("okm-FilePath-Title");
	panel.setSize("100%", "22px");
	panel.add(path);
	panel.setCellVerticalAlignment(path, VerticalPanel.ALIGN_MIDDLE);
	initWidget(panel);

	// Only executes first time when object is created to initalize values
	getRootPath();
}
 
Example 8
@Override
public Widget renderPlain(RenderMetaData metaData, String groupName, PlainFormView plainView) {
    VerticalPanel panel = new VerticalPanel();
    panel.setStyleName("fill-layout-width");
    Label label = new Label(groupName);
    label.setStyleName("form-group-label");
    panel.add(label);
    panel.add(delegate.renderPlain(metaData, groupName, plainView));
    return panel;
}
 
Example 9
@Override
public Widget createWidget() {
    VerticalPanel layout = new VerticalPanel();
    layout.setStyleName("rhs-content-panel");
    layout.add(new ContentHeaderLabel(Console.CONSTANTS.unauthorized()));
    layout.add(new ContentDescription(Console.CONSTANTS.unauthorized_desc()));
    return layout;
}
 
Example 10
Widget asWidget() {
    VerticalPanel layout = new VerticalPanel();
    layout.setStyleName("fill-layout-width");

    formContainer = new VerticalPanel();
    formContainer.setStyleName("fill-layout-width");

    layout.add(formContainer);

    return layout;
}
 
Example 11
Widget asWidget() {
    VerticalPanel layout = new VerticalPanel();
    layout.setStyleName("window-content");
    Form<ActivemqJMSTopic> form = new Form<>(ActivemqJMSTopic.class);

    TextBoxItem name = new TextBoxItem("name", "Name");
    ListItem jndiName = new JndiNamesItem("entries", "JNDI Names");
    form.setFields(name, jndiName);

    FormHelpPanel helpPanel = new FormHelpPanel(() -> {
        ModelNode address = Baseadress.get();
        address.add("subsystem", "messaging-activemq");
        address.add("server", presenter.getCurrentServer());
        address.add("jms-topic", "*");
        return address;
    }, form);

    layout.add(helpPanel.asWidget());
    layout.add(form.asWidget());

    DialogueOptions options = new DialogueOptions(
            event -> {
                FormValidation validation = form.validate();
                if (!validation.hasErrors()) { presenter.onCreateTopic(form.getUpdatedEntity()); }
            },
            event -> presenter.closeDialogue()
    );

    return new WindowContentBuilder(layout, options).build();
}
 
Example 12
Source Project: core   File: Wizard.java    License: GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public Widget asWidget() {
    assertSteps();
    state = initialState();

    VerticalPanel root = new VerticalPanel();
    root.setStyleName("window-content");

    header = new HTML();
    errorMessages = new HTML();
    errorMessages.setVisible(false);
    errorMessages.setStyleName("error-panel");
    body = new StateDeckPanel();
    footer = new Footer();

    int index = 0;
    for (Map.Entry<S, WizardStep<C, S>> entry : steps.entrySet()) {
        stateIndex.put(entry.getKey(), index);
        body.add(entry.getValue().asWidget(context));
        index++;
    }

    root.add(header);
    root.add(errorMessages);
    root.add(body);
    pushState(state);

    return new TrappedFocusPanel(new WindowContentBuilder(root, footer.asWidget()).build());
}
 
Example 13
void launchAddFederationDialog() {
    ResourceDescription resourceDescription = StaticResourceDescription
            .from(PICKET_LINK_RESOURCES.newFederationDescription());
    ComboBoxItem securityDomains = new ComboBoxItem("security-domain", "Security Domain");
    securityDomains.setRequired(false);
    securityDomains.setValueMap(this.securityDomains);

    DefaultWindow dialog = new DefaultWindow(Console.MESSAGES.newTitle("Federation"));
    ModelNodeFormBuilder.FormAssets assets = new ModelNodeFormBuilder()
            .setResourceDescription(resourceDescription)
            .addFactory("security-domain", attributeDescription -> securityDomains)
            .setSecurityContext(securityContext)
            .unsorted()
            .build();
    assets.getForm().setEnabled(true);
    assets.getForm().addFormValidator(new IdentityProviderEditor.IdentityProviderFormValidator());

    DialogueOptions options = new DialogueOptions(
            event -> {
                FormValidation validation = assets.getForm().validate();
                if (!validation.hasErrors()) {
                    dialog.hide();

                    ModelNode payload = assets.getForm().getUpdatedEntity();
                    String name = payload.get(NAME).asString();
                    String ip = payload.get("identity-provider").asString();

                    Operation addFederation = new Operation.Builder(ADD,
                            FEDERATION_TEMPLATE.resolve(statementContext, name)).build();
                    Operation addIdentityProvider = new Operation.Builder(ADD,
                            IDENTITY_PROVIDER_TEMPLATE.resolve(statementContext, name, ip))
                            .param("security-domain", payload.get("security-domain").asString())
                            .param("external", payload.get("external").asBoolean())
                            .param("url", payload.get("url").asString())
                            .build();
                    dispatcher.execute(new DMRAction(new Composite(addFederation, addIdentityProvider)),
                            new SimpleCallback<DMRResponse>() {
                                @Override
                                public void onFailure(final Throwable caught) {
                                    super.onFailure(caught);
                                    readFederations();
                                }

                                @Override
                                public void onSuccess(final DMRResponse dmrResponse) {
                                    Console.info(Console.MESSAGES.successfullyAdded((name)));
                                    readFederations();
                                }
                            });
                }
            },
            event -> dialog.hide()
    );

    VerticalPanel layout = new VerticalPanel();
    layout.setStyleName("fill-layout-width window-content");
    ContentDescription text = new ContentDescription(resourceDescription.get(DESCRIPTION).asString());
    layout.add(text);
    layout.add(assets.getHelp().asWidget());
    layout.add(assets.getForm().asWidget());

    ScrollPanel scroll = new ScrollPanel(layout);
    LayoutPanel content = new LayoutPanel();
    content.addStyleName("fill-layout");
    content.add(scroll);
    content.add(options);
    content.getElement().setAttribute("style", "margin-bottom:10px");
    content.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 92, Style.Unit.PCT);
    content.setWidgetBottomHeight(options, 0, Style.Unit.PX, 35, Style.Unit.PX);

    dialog.setWidth(640);
    dialog.setHeight(480);
    dialog.setWidget(new TrappedFocusPanel(content));
    dialog.setGlassEnabled(true);
    dialog.center();
}
 
Example 14
@Override
@SuppressWarnings("unchecked")
public Widget asWidget() {
    ProvidesKey<Principal> keyProvider = Principal::getId;

    AbstractCell<Principal> roleCell = new AbstractCell<Principal>() {
        @Override
        public void render(final Context context, final Principal value, final SafeHtmlBuilder sb) {
            sb.append(Templates.memberItem("navigation-column-item", value));
        }
    };
    DefaultCellList<Principal> list = new DefaultCellList<>(roleCell, keyProvider);
    list.setPageSize(30);
    list.setKeyboardPagingPolicy(INCREASE_RANGE);
    list.setKeyboardSelectionPolicy(BOUND_TO_SELECTION);

    ListDataProvider<Principal> dataProvider = new ListDataProvider<>(keyProvider);
    dataProvider.setList(Principals.orderedByType()
            .compound(Principals.orderedByName())
            .immutableSortedCopy(unassignedPrincipals));
    dataProvider.addDataDisplay(list);

    SingleSelectionModel<Principal> selectionModel = new SingleSelectionModel<>(keyProvider);
    list.setSelectionModel(selectionModel);
    selectionModel.setSelected(dataProvider.getList().get(0), true);
    Scheduler.get().scheduleDeferred(() -> list.setFocus(true));

    Label errorMessage = new Label();
    errorMessage.setVisible(false);
    errorMessage.getElement().getStyle().setColor("#c82e2e");
    errorMessage.getElement().getStyle().setPadding(7, PX);

    VerticalPanel layout = new VerticalPanel();
    layout.setStyleName("window-content");
    layout.add(errorMessage);
    layout.add(list);

    DialogueOptions options = new DialogueOptions(
            event -> {
                if (selectionModel.getSelectedObject() == null) {
                    errorMessage.setText(Console.CONSTANTS.pleaseSelectPrincipal());
                    errorMessage.setVisible(true);
                } else {
                    Assignment assignment = new Assignment(selectionModel.getSelectedObject(), role,
                            include);
                    circuit.dispatch(new AddAssignment(assignment, ROLE_TO_PRINCIPAL));
                    presenter.closeWindow();
                }
            },
            event -> presenter.closeWindow()
    );

    return new WindowContentBuilder(layout, options).build();
}
 
Example 15
public Widget asWidget() {
    TextBoxItem name = new TextBoxItem("name", "Name", true);
    TextBoxItem realm = new TextBoxItem("realm", "Realm", false);
    ComboBoxItem role = new ComboBoxItem("role", "Role");
    role.setValueMap(roles.keySet());
    role.setDefaultToFirstOption(true);

    Form<PrincipalBean> form = new Form<>(PrincipalBean.class);
    form.setFields(name, realm, role);
    form.addFormValidator((formItems, outcome) -> {
        if (accessControlStore.getPrincipals().contains(beanToModel(form.getUpdatedEntity()))) {
            outcome.addError("name");
            name.setErrMessage(type == Principal.Type.USER ? Console.CONSTANTS
                    .userAlreadyExists() : Console.CONSTANTS.groupAlreadyExists());
            name.setErroneous(true);
        }
    });
    form.addFormValidator((formItems, outcome) -> {
        if (!roles.containsKey(role.getValue())) {
            outcome.addError("role");
            role.setErrMessage(Console.CONSTANTS.pleaseSelectRole());
            role.setErroneous(true);
        }
    });

    VerticalPanel layout = new VerticalPanel();
    layout.setStyleName("window-content");
    layout.add(new HelpPanel().asWidget());
    layout.add(form.asWidget());

    DialogueOptions options = new DialogueOptions(event -> {
        FormValidation validation = form.validate();
        if (!validation.hasErrors()) {
            Principal principal = beanToModel(form.getUpdatedEntity());
            Role matchingRole = roles.get(role.getValue());
            circuit.dispatch(new AddPrincipal(principal, matchingRole));
            presenter.closeWindow();
        }
    }, event -> presenter.closeWindow());

    return new WindowContentBuilder(layout, options).build();
}
 
Example 16
Widget asWidget() {
    layout = new VerticalPanel();
    layout.setStyleName("fill-layout-width");

    return layout;
}
 
Example 17
public Widget asWidget()
{
    layout = new VerticalPanel();
    layout.setStyleName("fill-layout-width");

    stack = new VerticalPanel();
    stack.setStyleName("fill-layout-width");
    stack.getElement().getStyle().setBackgroundColor("#ffffff");

    // ----------------------------------------------------


    serverTree = new LHSNavTree("server-runtime");
    serverTree.getElement().setAttribute("aria-label", "Runtime Tasks");

    // ----------------------------------------------------

    LHSNavTreeItem server = new LHSNavTreeItem("Overview", NameTokens.StandaloneServerPresenter);
    serverTree.addItem(server);


    // -------------

    LHSNavTreeItem datasources = new LHSNavTreeItem("Datasources", NameTokens.DataSourceMetricPresenter);
    LHSNavTreeItem jmsQueues = new LHSNavTreeItem("JMS Destinations", NameTokens.JmsMetricPresenter);
    LHSNavTreeItem activemq = new LHSNavTreeItem("Queues/Topics", NameTokens.ActivemqMetricPresenter);
    LHSNavTreeItem web = new LHSNavTreeItem("Web", NameTokens.WebMetricPresenter);
    LHSNavTreeItem jpa = new LHSNavTreeItem("JPA", NameTokens.JPAMetricPresenter);
    LHSNavTreeItem ws = new LHSNavTreeItem("Webservices", NameTokens.WebServiceRuntimePresenter);
    LHSNavTreeItem naming = new LHSNavTreeItem("JNDI View", NameTokens.JndiPresenter);

    metricPredicates.add(new Predicate("datasources", datasources));
    metricPredicates.add(new Predicate("messaging", jmsQueues));
    metricPredicates.add(new Predicate("messaging-activemq", activemq));
    metricPredicates.add(new Predicate("web", web));
    metricPredicates.add(new Predicate("jpa", jpa));
    metricPredicates.add(new Predicate("webservices", ws));
    metricPredicates.add(new Predicate("naming", naming));


    // Extension based additions
    RuntimeExtensionRegistry registry = Console.getRuntimeLHSItemExtensionRegistry();
    List<RuntimeExtensionMetaData> menuExtensions = registry.getExtensions();
    for (RuntimeExtensionMetaData ext : menuExtensions) {

        if(RuntimeGroup.METRICS.equals(ext.getGroup()))
        {
            metricPredicates.add(
                    new Predicate(
                            ext.getKey(), new LHSNavTreeItem(ext.getName(), ext.getToken())
                    )
            );
        }
        else if(RuntimeGroup.OPERATiONS.equals(ext.getGroup()))
        {
            runtimePredicates.add(
                    new Predicate(
                            ext.getKey(), new LHSNavTreeItem(ext.getName(), ext.getToken())
                    )
            );
        }
        else
        {
            Log.warn("Invalid runtime group for extension: "+ext.getGroup());
        }
    }

    // ---

    runtimeTree = new LHSNavTree("subsystem-runtime");

    serverTree.expandTopLevel();

    HTML serverTitle = new HTML("Server");
    serverTitle.setStyleName("server-picker-section-header");

    stack.add(serverTitle);
    stack.add(serverTree);

    HTML statusTitle = new HTML("System Status");
    statusTitle.setStyleName("server-picker-section-header");

    stack.add(statusTitle);
    stack.add(runtimeTree);

    layout.add(stack);

    scroll = new ScrollPanel(layout);

    return scroll;
}
 
Example 18
public Widget asWidget() {

        ToolStrip tools = new ToolStrip();
        tools.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_add(), event -> onAdd()));
        tools.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_delete(), event -> {
            if (selectionModel.getSelectedObject() != null) {
                onRemove(selectionModel.getSelectedObject().getName());
            }
        }));

        TextColumn<Property> nameColumn = new TextColumn<Property>() {
            @Override
            public String getValue(Property node) {
                return node.getName();
            }
        };
        table.addColumn(nameColumn, Console.CONSTANTS.common_label_name());

        formAssets = new ModelNodeFormBuilder()
            .setConfigOnly()
            .setResourceDescription(resourceDescription)
            .setSecurityContext(securityContext).build();

        formAssets.getForm().setToolsCallback(new FormCallback() {
            @Override
            public void onSave(Map changeSet) {
                HandlerEditor.this.onModify(selectionModel.getSelectedObject().getName(), formAssets.getForm().getChangedValues());
            }

            @Override
            public void onCancel(Object entity) {
                formAssets.getForm().cancel();
            }
        });

        selectionModel.addSelectionChangeHandler(event -> {
            Property property = selectionModel.getSelectedObject();
            if (property != null) {
                updateHandlerList();
            } else {
                clearDetail();
            }
        });

        ResourceDescription handlerDescription = resourceDescription.getChildDescription("handler");
        handlerClassEditor = new HandlerClassEditor(addressTemplate.append("handler=*"), circuit, securityContext, handlerDescription);

        VerticalPanel formPanel = new VerticalPanel();
        formPanel.setStyleName("fill-layout-width");
        formPanel.add(formAssets.getHelp().asWidget());
        formPanel.add(formAssets.getForm().asWidget());

        MultipleToOneLayout layoutBuilder = new MultipleToOneLayout()
        .setPlain(true)
        .setHeadlineWidget(headlineWidget)
        .setDescription(SafeHtmlUtils.fromString(resourceDescription.get(DESCRIPTION).asString()))
        .setMasterTools(tools)
        .setMaster(Console.MESSAGES.available(null), table)
        .addDetail(Console.CONSTANTS.common_label_attributes(), formPanel)
        .addDetail("Handler classes", handlerClassEditor.asWidget());

        return layoutBuilder.build();
    }
 
Example 19
public LHSStandaloneNavigation() {
    super();

    layout = new VerticalPanel();
    layout.setStyleName("fill-layout-width");

    stack = new VerticalPanel();
    stack.setStyleName("fill-layout-width");
    stack.getElement().getStyle().setBackgroundColor("#ffffff");

    // ----------------------------------------------------

    subsystemTree = new LHSNavTree("profiles");
    subsystemTree.getElement().setAttribute("style", "padding: 5px;");
    subsystemTree.getElement().setAttribute("aria-label", "Profile Tasks");

    // ----------------------------------------------------

    LHSNavTree commonTree = new LHSNavTree(Console.CONSTANTS.common_label_generalConfig());

    LHSNavTreeItem[] commonItems = new LHSNavTreeItem[] {
            /*new LHSNavTreeItem("Server", NameTokens.StandaloneServerPresenter),*/
            new LHSNavTreeItem(Console.CONSTANTS.common_label_interfaces(), NameTokens.InterfacePresenter),
            new LHSNavTreeItem(Console.CONSTANTS.common_label_socketBinding(), NameTokens.SocketBindingPresenter),
            new LHSNavTreeItem(Console.CONSTANTS.common_label_paths(), NameTokens.PathManagementPresenter),
            new LHSNavTreeItem(Console.CONSTANTS.common_label_systemProperties(), NameTokens.PropertiesPresenter),
    };

    for(LHSNavTreeItem item : commonItems)
    {
        commonTree.addItem(item);
    }


    subsystemTree.expandTopLevel();

    HTML title = new HTML("Subsystems");
    title.setStyleName("server-picker-section-header");

    stack.add(title);
    stack.add(subsystemTree);

    layout.add(stack);


    HTML commonTitle = new HTML("General Configuration");
    commonTitle.setStyleName("server-picker-section-header");
    stack.add(commonTitle);

    stack.add(commonTree);

    scroll = new ScrollPanel(layout);

}
 
Example 20
public LHSHostsNavigation() {


        layout = new VerticalPanel();
        layout.setStyleName("fill-layout-width");

        stack = new VerticalPanel();
        stack.setStyleName("fill-layout-width");
        stack.getElement().getStyle().setBackgroundColor("#ffffff");

        domainNav = new LHSNavTree("hosts");
        domainNav.getElement().setAttribute("aria-label", "Domain Tasks");
        domainNav.getElement().setAttribute("style", "padding-top:10px; padding-bottom:10px");

        hostNav = new LHSNavTree("hosts");
        hostNav.getElement().setAttribute("aria-label", "Host Tasks");
        hostNav.getElement().setAttribute("style", "padding-top:10px; padding-bottom:10px");

        // --------

        HTML title = new HTML("Domain");
        title.setStyleName("server-picker-section-header");

        domainNav.addItem(new LHSNavTreeItem("Overview", NameTokens.Topology));
        domainNav.addItem(new LHSNavTreeItem("Server Groups", NameTokens.ServerGroupPresenter));

        hostSelector = new HostSelector();


        // --------


        LHSNavTreeItem serversItem = new LHSNavTreeItem(Console.CONSTANTS.common_label_serverConfigs(), NameTokens.ServerPresenter);
        hostNav.addItem(serversItem);

        // --------

        //LHSNavTreeItem paths = new LHSNavTreeItem(Console.CONSTANTS.common_label_paths(), "hosts/host-paths");
        LHSNavTreeItem jvms = new LHSNavTreeItem(Console.CONSTANTS.common_label_virtualMachines(), "host-jvms");
        LHSNavTreeItem interfaces = new LHSNavTreeItem(Console.CONSTANTS.common_label_interfaces(), "host-interfaces");
        LHSNavTreeItem properties = new LHSNavTreeItem("Host Properties", "host-properties");


        hostNav.addItem(jvms);
        hostNav.addItem(interfaces);
        hostNav.addItem(properties);


        // --------
        stack.add(title);
        stack.add(domainNav);

        HTML commonTitle = new HTML("Host Configuration");
        commonTitle.setStyleName("server-picker-section-header");
        stack.add(commonTitle);
        Widget hostSelectorWidget = hostSelector.asWidget();
        hostSelectorWidget.getElement().getStyle().setPadding(10, Style.Unit.PX);

        stack.add(hostSelectorWidget);
        stack.add(hostNav);

        domainNav.expandTopLevel();
        hostNav.expandTopLevel();

        // --------


        layout.add(stack);

        scroll = new ScrollPanel(layout);

    }