Java Code Examples for com.google.gwt.user.client.ui.DeckPanel#showWidget()

The following examples show how to use com.google.gwt.user.client.ui.DeckPanel#showWidget() . 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 check out the related API usage on the sidebar.
Example 1
Source File: NewStackWizard.java    From core with GNU Lesser General Public License v2.1 3 votes vote down vote up
Widget asWidget() {

        deck = new DeckPanel();

        deck.add(new StackStep1(this).asWidget());

        step2 = new StackStep2(this);
        deck.add(step2.asWidget());

        deck.showWidget(0);

        return deck;

    }
 
Example 2
Source File: ConnectorOverview.java    From core with GNU Lesser General Public License v2.1 2 votes vote down vote up
Widget asWidget() {

        LayoutPanel layout = new LayoutPanel();

        VerticalPanel panel = new VerticalPanel();
        panel.setStyleName("rhs-content-panel");

        ScrollPanel scroll = new ScrollPanel(panel);
        layout.add(scroll);

        layout.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 100, Style.Unit.PCT);

        serverName = new HTML("Replace me");
        serverName.setStyleName("content-header-label");

        HorizontalPanel header = new HorizontalPanel();
        header.setStyleName("fill-layout-width");
        header.add(serverName);

        final DeckPanel deck = new DeckPanel();
        deck.addStyleName("fill-layout");

        final ListBox selector = new ListBox();

        selector.addItem("Type: Remote");
        selector.addItem("Type: In-VM");
        selector.addItem("Type: Generic");

        selector.addChangeHandler(changeEvent -> deck.showWidget(selector.getSelectedIndex()));

        header.add(selector);
        selector.getElement().getParentElement().setAttribute("align", "right");

        panel.add(header);
        panel.add(new ContentDescription(Console.CONSTANTS.jmsConnectorDescription()));

        genericConnectors = new ConnectorList(presenter, ConnectorType.GENERIC);
        remoteConnectors = new ConnectorList(presenter, ConnectorType.REMOTE);
        invmConnectors = new ConnectorList(presenter, ConnectorType.INVM);

        deck.add(remoteConnectors.asWidget());
        deck.add(invmConnectors.asWidget());
        deck.add(genericConnectors.asWidget());

        deck.showWidget(0);

        panel.add(deck);

        return layout;
    }
 
Example 3
Source File: AcceptorOverview.java    From core with GNU Lesser General Public License v2.1 2 votes vote down vote up
Widget asWidget() {
    LayoutPanel layout = new LayoutPanel();

    VerticalPanel panel = new VerticalPanel();
    panel.setStyleName("rhs-content-panel");

    ScrollPanel scroll = new ScrollPanel(panel);
    layout.add(scroll);

    layout.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 100, Style.Unit.PCT);

    serverName = new HTML(Console.CONSTANTS.replace_me());
    serverName.setStyleName("content-header-label");

    HorizontalPanel header = new HorizontalPanel();
    header.setStyleName("fill-layout-width");
    header.add(serverName);

    final DeckPanel deck = new DeckPanel();
    deck.addStyleName("fill-layout");

    final ListBox selector = new ListBox();

    selector.addItem("Type: Remote");
    selector.addItem("Type: In-VM");
    selector.addItem("Type: Generic");

    selector.addChangeHandler(changeEvent -> deck.showWidget(selector.getSelectedIndex()));

    header.add(selector);
    selector.getElement().getParentElement().setAttribute("align", "right");

    panel.add(header);
    panel.add(new ContentDescription(Console.CONSTANTS.hornetq_acceptor_type_desc()));

    genericAcceptors = new AcceptorList(presenter, AcceptorType.GENERIC);
    remoteAcceptors = new AcceptorList(presenter, AcceptorType.REMOTE);
    invmAcceptors = new AcceptorList(presenter, AcceptorType.INVM);

    deck.add(remoteAcceptors.asWidget());
    deck.add(invmAcceptors.asWidget());
    deck.add(genericAcceptors.asWidget());

    deck.showWidget(0);

    panel.add(deck);

    return layout;
}
 
Example 4
Source File: ConnectorOverview.java    From core with GNU Lesser General Public License v2.1 2 votes vote down vote up
Widget asWidget() {

        LayoutPanel layout = new LayoutPanel();

        VerticalPanel panel = new VerticalPanel();
        panel.setStyleName("rhs-content-panel");

        ScrollPanel scroll = new ScrollPanel(panel);
        layout.add(scroll);

        layout.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 100, Style.Unit.PCT);

        // ---

        serverName = new HTML("Replace me");
        serverName.setStyleName("content-header-label");


        HorizontalPanel header = new HorizontalPanel();
        header.setStyleName("fill-layout-width");
        header.add(serverName);

        // ----

        final DeckPanel deck = new DeckPanel();
        deck.addStyleName("fill-layout");

        final ListBox selector = new ListBox();

        selector.addItem("Type: Remote");
        selector.addItem("Type: In-VM");
        selector.addItem("Type: Generic");

        selector.addChangeHandler(new ChangeHandler() {
            @Override
            public void onChange(ChangeEvent changeEvent) {
                deck.showWidget(selector.getSelectedIndex());
            }
        });

        header.add(selector);
        selector.getElement().getParentElement().setAttribute("align", "right");


        panel.add(header);
        panel.add(new ContentDescription(Console.CONSTANTS.jmsConnectorDescription()));

        genericConnectors = new ConnectorList(presenter, ConnectorType.GENERIC);
        remoteConnectors = new ConnectorList(presenter, ConnectorType.REMOTE);
        invmConnectors = new ConnectorList(presenter, ConnectorType.INVM);

        deck.add(remoteConnectors.asWidget());
        deck.add(invmConnectors.asWidget());
        deck.add(genericConnectors.asWidget());

        deck.showWidget(0);

        panel.add(deck);

        return layout;
    }
 
Example 5
Source File: AcceptorOverview.java    From core with GNU Lesser General Public License v2.1 2 votes vote down vote up
Widget asWidget() {

        LayoutPanel layout = new LayoutPanel();

        VerticalPanel panel = new VerticalPanel();
        panel.setStyleName("rhs-content-panel");

        ScrollPanel scroll = new ScrollPanel(panel);
        layout.add(scroll);

        layout.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 100, Style.Unit.PCT);

        // ---

        serverName = new HTML(Console.CONSTANTS.replace_me());
        serverName.setStyleName("content-header-label");


        HorizontalPanel header = new HorizontalPanel();
        header.setStyleName("fill-layout-width");
        header.add(serverName);

        // ----

        final DeckPanel deck = new DeckPanel();
        deck.addStyleName("fill-layout");

        final ListBox selector = new ListBox();

        selector.addItem("Type: Remote");
        selector.addItem("Type: In-VM");
        selector.addItem("Type: Generic");

        selector.addChangeHandler(new ChangeHandler() {
            @Override
            public void onChange(ChangeEvent changeEvent) {
                deck.showWidget(selector.getSelectedIndex());
            }
        });

        header.add(selector);
        selector.getElement().getParentElement().setAttribute("align", "right");


        panel.add(header);
        panel.add(new ContentDescription(Console.CONSTANTS.hornetq_acceptor_type_desc()));

        genericAcceptors = new AcceptorList(presenter, AcceptorType.GENERIC);
        remoteAcceptors = new AcceptorList(presenter, AcceptorType.REMOTE);
        invmAcceptors = new AcceptorList(presenter, AcceptorType.INVM);

        deck.add(remoteAcceptors.asWidget());
        deck.add(invmAcceptors.asWidget());
        deck.add(genericAcceptors.asWidget());

        deck.showWidget(0);

        panel.add(deck);

        return layout;
    }