Example usage for com.google.gwt.user.client.ui HorizontalSplitPanel HorizontalSplitPanel

List of usage examples for com.google.gwt.user.client.ui HorizontalSplitPanel HorizontalSplitPanel

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui HorizontalSplitPanel HorizontalSplitPanel.

Prototype

public HorizontalSplitPanel() 

Source Link

Usage

From source file:com.controlj.addon.gwttree.client.MainPage.java

License:Open Source License

private void setupUI() {
    // Add horizontal split
    HorizontalSplitPanel split = new HorizontalSplitPanel();
    split.setLeftWidget(createLeftPanel());
    split.setRightWidget(graphManager.createPanel());
    split.setSplitPosition("20%");

    RootPanel.get("main").add(split);
}

From source file:com.google.gwt.sample.showcase.client.content.panels.CwHorizontalSplitPanel.java

License:Apache License

/**
 * Initialize this example.//from w w w . jav a2 s.c  o  m
 */
@ShowcaseSource
@Override
public Widget onInitialize() {
    // Create a Horizontal Split Panel
    HorizontalSplitPanel hSplit = new HorizontalSplitPanel();
    hSplit.ensureDebugId("cwHorizontalSplitPanel");
    hSplit.setSize("500px", "350px");
    hSplit.setSplitPosition("30%");

    // Add some content
    String randomText = constants.cwHorizontalSplitPanelText();
    for (int i = 0; i < 2; i++) {
        randomText += randomText;
    }
    hSplit.setRightWidget(new HTML(randomText));
    hSplit.setLeftWidget(new HTML(randomText));

    // Wrap the split panel in a decorator panel
    DecoratorPanel decPanel = new DecoratorPanel();
    decPanel.setWidget(hSplit);

    // Return the content
    return decPanel;
}

From source file:com.hazelcast.monitor.client.HazelcastMonitor.java

License:Open Source License

/**
 * This is the entry point method.//from ww  w  . ja v a2 s . c  om
 */
public void onModuleLoad() {
    mainPanel = new HorizontalSplitPanel();
    mainPanel.setSplitPosition(LEFT_PANEL_SIZE);
    VerticalPanel leftPanel = new VerticalPanel();
    Image image = new Image("images/logo_3.png");
    leftPanel.add(image);
    clusterAddPanel = createClusterAddPanel();
    leftPanel.add(clusterAddPanel);
    dsPanel = new DecoratedStackPanel();
    dsPanel.setWidth(LEFT_PANEL_SIZE);
    leftPanel.add(dsPanel);
    mainPanel.setLeftWidget(leftPanel);
    VerticalPanel rightPanel = new VerticalPanel();
    mainPanel.setRightWidget(rightPanel);
    VerticalSplitPanel topPanel = new VerticalSplitPanel();
    topPanel.setSize("100%", "100%");
    topPanel.setSplitPosition("100%");
    topPanel.setTopWidget(mainPanel);
    topPanel.setBottomWidget(logBox);
    logBox.setWidth("100%");
    logBox.setHeight("100%");
    RootPanel.get().add(topPanel);
    //        RootPanel.get().add(mainPanel);
    History.addValueChangeHandler(this);
    loadActiveClusterViews();
    ServicesFactory servicesFactory = new ServicesFactory();
    onValueChangeHandler = new OnValueChangeHandler(servicesFactory, this);
}

From source file:com.ikon.frontend.client.panel.center.HorizontalSplitPanelExtended.java

License:Open Source License

/**
 * HorizontalSplitPanelExtendend//w w w . ja v a 2 s .c  o m
 * 
 * @param handler
 */
public HorizontalSplitPanelExtended() {
    super();
    horizontalSplitPanel = new HorizontalSplitPanel();

    horizontalSplitPanel.setStyleName("okm-HorizontalSplitPanel");
    initWidget(horizontalSplitPanel);
}

From source file:com.ikon.frontend.client.widget.dashboard.keymap.KeyMapDashboard.java

License:Open Source License

/**
 * KeyMapDashboard/* w  ww.j  a  v  a  2  s  .  c  o m*/
 */
public KeyMapDashboard() {
    horizontalSplitPanel = new HorizontalSplitPanel();
    keyAllTable = new KeywordWidget(Main.i18n("dashboard.keyword.all"));
    keyTopTable = new KeywordWidget(Main.i18n("dashboard.keyword.top"));
    keyRelatedTable = new KeywordWidget(Main.i18n("dashboard.keyword.related"));

    allKeywordList = new ArrayList<GWTKeyword>();
    relatedKeywordList = new ArrayList<GWTKeyword>();
    rateMap = new HashMap<String, String>();
    HTML space = new HTML("&nbsp;");
    flowPanelDivisor = new HTML("&nbsp;");

    tagCloud = new TagCloud();
    table = new KeyMapTable();
    VerticalPanel contentPanel = new VerticalPanel();
    contentPanel.add(tagCloud);
    contentPanel.add(space);
    contentPanel.add(flowPanelDivisor);
    contentPanel.add(table);
    contentPanel.setWidth("100%");
    tagCloud.setWidth("100%");
    space.setWidth("100%");
    space.setHeight("10");
    flowPanelDivisor.setWidth("100%");
    flowPanelDivisor.setHeight("5");
    scrollTable = new ScrollPanel(contentPanel);

    tagCloud.setStylePrimaryName("okm-cloudWrap");
    flowPanelDivisor.setStyleName("okm-cloudSeparator");
    table.addStyleName("okm-DisableSelect");

    vPanel = new VerticalPanel();
    controlPanel = new HorizontalPanel();
    paginationPanel = new HorizontalPanel();
    selectedKeyMap = new HashMap<String, Widget>();
    multiWordSuggestKey = new MultiWordSuggestOracle();
    keywordList = new ArrayList<String>();
    suggestKey = new SuggestBox(multiWordSuggestKey);
    suggestKey.setHeight("20");
    suggestKey.setText(Main.i18n("dashboard.keyword.suggest"));
    suggestKey.addKeyUpHandler(new KeyUpHandler() {
        @Override
        public void onKeyUp(KeyUpEvent event) {
            if ((char) KeyCodes.KEY_ENTER == event.getNativeKeyCode()) {
                selectKey(suggestKey.getText());
                suggestKey.setText("");
            }
        }
    });
    suggestKey.getTextBox().addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            if (suggestKey.getText().equals(Main.i18n("dashboard.keyword.suggest"))) {
                suggestKey.setText("");
            }
        }
    });

    vPanel.add(controlPanel);
    vPanel.add(scrollTable);
    vPanel.add(paginationPanel);

    // Image control
    HorizontalPanel imageControlPanel = new HorizontalPanel();
    HTML space1 = new HTML();
    HTML space2 = new HTML();
    small = new Image("img/icon/actions/description_small_disabled.gif");
    small.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            if (table.getActualDetail() != KeyMapTable.VISIBLE_SMALL) {
                disableAllDetailIcons();
                table.changeVisibilityDetail(KeyMapTable.VISIBLE_SMALL);
                small.setUrl("img/icon/actions/description_small.gif");
            }
        }
    });
    medium = new Image("img/icon/actions/description_medium.gif"); // It's enabled view by default
    medium.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            if (table.getActualDetail() != KeyMapTable.VISIBLE_MEDIUM) {
                disableAllDetailIcons();
                table.changeVisibilityDetail(KeyMapTable.VISIBLE_MEDIUM);
                medium.setUrl("img/icon/actions/description_medium.gif");
            }
        }
    });
    big = new Image("img/icon/actions/description_big_disabled.gif");
    big.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            if (table.getActualDetail() != KeyMapTable.VISIBLE_BIG) {
                disableAllDetailIcons();
                table.changeVisibilityDetail(KeyMapTable.VISIBLE_BIG);
                big.setUrl("img/icon/actions/description_big.gif");
            }
        }
    });
    imageControlPanel.add(space1);
    imageControlPanel.add(small);
    imageControlPanel.add(medium);
    imageControlPanel.add(big);
    imageControlPanel.add(space2);
    imageControlPanel.setCellWidth(space1, "8");
    imageControlPanel.setCellWidth(small, "21");
    imageControlPanel.setCellWidth(medium, "21");
    imageControlPanel.setCellWidth(big, "21");
    imageControlPanel.setCellHeight(small, "20");
    imageControlPanel.setCellHeight(medium, "20");
    imageControlPanel.setCellHeight(big, "20");
    imageControlPanel.setCellWidth(space2, "8");
    imageControlPanel.setCellHorizontalAlignment(small, HasAlignment.ALIGN_CENTER);
    imageControlPanel.setCellHorizontalAlignment(medium, HasAlignment.ALIGN_CENTER);
    imageControlPanel.setCellHorizontalAlignment(big, HasAlignment.ALIGN_CENTER);
    imageControlPanel.setCellVerticalAlignment(small, HasAlignment.ALIGN_MIDDLE);
    imageControlPanel.setCellVerticalAlignment(medium, HasAlignment.ALIGN_MIDDLE);
    imageControlPanel.setCellVerticalAlignment(big, HasAlignment.ALIGN_MIDDLE);

    // KeyWords text
    keywordsTXT = new HTML();
    keywordsTXT.setHTML("<b>" + Main.i18n("dashboard.keyword") + "</b>");
    HTML space3 = new HTML();
    HorizontalPanel hPanel = new HorizontalPanel();
    hPanel.add(keywordsTXT);
    hPanel.add(space3);
    hPanel.setCellWidth(space3, "8");
    hPanel.setCellVerticalAlignment(keywordsTXT, HasAlignment.ALIGN_MIDDLE);

    selectedKeyPanel = new HorizontalPanel();
    suggestKeyPanel = new HorizontalPanel();
    HTML space4 = new HTML();
    clean = new Image("img/icon/actions/clean_disabled.gif");
    clean.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            if (selectedKeyMap.keySet().size() > 0) {
                // Resets keywordPanel
                for (String key : selectedKeyMap.keySet()) {
                    selectedKeyPanel.remove((Widget) selectedKeyMap.get(key));
                }
                selectedKeyMap = new HashMap<String, Widget>();
                keyAllTable.unselectAllRows();
                keyTopTable.unselectAllRows();
                keyRelatedTable.unselectAllRows();
                keyRelatedTable.setVisible(false);
                table.reset();
                context.setSelectedIndex(posAllContext);
                controlSearchIn.refreshControl(0);

                getKeywordMap(); // Gets related keyMap
                refreshClean();
            }
        }
    });
    clean.setTitle(Main.i18n("dashboard.keyword.clean.keywords"));
    suggestKeyPanel.add(suggestKey); // Always must be the last
    suggestKeyPanel.add(space4);
    suggestKeyPanel.add(clean);
    suggestKeyPanel.setCellWidth(space4, "8");
    suggestKeyPanel.setCellWidth(clean, "21");
    suggestKeyPanel.setCellHorizontalAlignment(space4, HasAlignment.ALIGN_RIGHT);
    suggestKeyPanel.setCellVerticalAlignment(suggestKey, HasAlignment.ALIGN_MIDDLE);
    suggestKeyPanel.setCellVerticalAlignment(clean, HasAlignment.ALIGN_MIDDLE);

    selectedKeyPanel.add(hPanel);
    selectedKeyPanel.add(suggestKeyPanel); // Always must be the last
    selectedKeyPanel.setCellVerticalAlignment(hPanel, HasAlignment.ALIGN_MIDDLE);
    selectedKeyPanel.setCellVerticalAlignment(suggestKeyPanel, HasAlignment.ALIGN_MIDDLE);

    controlPanel.add(imageControlPanel);
    controlPanel.add(selectedKeyPanel);

    controlPanel.setCellWidth(imageControlPanel, "80");
    controlPanel.setCellVerticalAlignment(imageControlPanel, HasAlignment.ALIGN_MIDDLE);
    controlPanel.setCellVerticalAlignment(selectedKeyPanel, HasAlignment.ALIGN_MIDDLE);

    // Pagination
    HorizontalPanel internalPaginationPanel = new HorizontalPanel();
    context = new ListBox();
    context.setStyleName("okm-Select");
    int count = 0;
    posTaxonomy = count++;
    context.addItem(Main.i18n("leftpanel.label.taxonomy"), "");
    if (templatesVisible) {
        posTemplates = count++;
        context.addItem(Main.i18n("leftpanel.label.templates"), "");
    }
    if (personalVisible) {
        posPersonal = count++;
        context.addItem(Main.i18n("leftpanel.label.my.documents"), "");
    }
    if (mailVisible) {
        posMail = count++;
        context.addItem(Main.i18n("leftpanel.label.mail"), "");
    }
    if (trashVisible) {
        posTrash = count++;
        context.addItem(Main.i18n("leftpanel.label.trash"), "");
    }
    posAllContext = count++;
    context.addItem(Main.i18n("leftpanel.label.all.repository"), "");
    context.setSelectedIndex(posAllContext);

    context.addChangeHandler(new ChangeHandler() {
        @Override
        public void onChange(ChangeEvent event) {
            controlSearchIn.executeSearch(limit);
        }
    });

    resultPage = new ListBox();
    resultPage.addItem("10", "10");
    resultPage.addItem("20", "20");
    resultPage.addItem("30", "30");

    resultPage.addChangeHandler(new ChangeHandler() {
        @Override
        public void onChange(ChangeEvent event) {
            limit = Integer.valueOf(resultPage.getValue(resultPage.getSelectedIndex()));
            controlSearchIn.executeSearch(limit);
        }
    });

    HTML space5 = new HTML();
    HTML space6 = new HTML();
    HTML space7 = new HTML();
    resultPageTXT = new HTML(Main.i18n("search.page.results"));
    controlSearchIn = new ControlSearchIn();
    controlSearchIn.refreshControl(0);
    internalPaginationPanel.add(space5);
    internalPaginationPanel.add(context);
    internalPaginationPanel.add(space6);
    internalPaginationPanel.add(resultPageTXT);
    internalPaginationPanel.add(space7);
    internalPaginationPanel.add(resultPage);

    internalPaginationPanel.setCellWidth(space5, "8");
    internalPaginationPanel.setCellWidth(space6, "8");
    internalPaginationPanel.setCellWidth(space7, "8");
    internalPaginationPanel.setCellHorizontalAlignment(context, HasAlignment.ALIGN_LEFT);
    internalPaginationPanel.setCellVerticalAlignment(context, HasAlignment.ALIGN_MIDDLE);
    internalPaginationPanel.setCellVerticalAlignment(resultPageTXT, HasAlignment.ALIGN_MIDDLE);
    internalPaginationPanel.setCellVerticalAlignment(resultPage, HasAlignment.ALIGN_MIDDLE);

    HTML space8 = new HTML();
    HTML space9 = new HTML();
    paginationPanel.add(internalPaginationPanel);
    paginationPanel.add(space8);
    paginationPanel.add(controlSearchIn);
    paginationPanel.add(space9);
    paginationPanel.setCellWidth(space8, "8");
    paginationPanel.setCellWidth(space9, "8");
    paginationPanel.setCellHorizontalAlignment(internalPaginationPanel, HasAlignment.ALIGN_LEFT);
    paginationPanel.setCellVerticalAlignment(internalPaginationPanel, HasAlignment.ALIGN_MIDDLE);
    paginationPanel.setCellVerticalAlignment(controlSearchIn, HasAlignment.ALIGN_MIDDLE);
    paginationPanel.setCellHorizontalAlignment(controlSearchIn, HasAlignment.ALIGN_RIGHT);

    suggestKey.setStyleName("okm-KeyMap-Suggest");
    suggestKey.addStyleName("okm-Input");
    controlPanel.setStyleName("okm-KeyMapControl");
    controlPanel.addStyleName("okm-NoWrap");
    imageControlPanel.addStyleName("okm-NoWrap");
    selectedKeyPanel.addStyleName("okm-NoWrap");
    paginationPanel.setStyleName("okm-PaginationControl");
    paginationPanel.addStyleName("okm-NoWrap");
    internalPaginationPanel.addStyleName("okm-NoWrap");
    keywordsTXT.addStyleName("okm-NoWrap");
    resultPage.setStyleName("okm-Input");
    resultPageTXT.addStyleName("okm-NoWrap");
    hPanel.addStyleName("okm-NoWrap");
    clean.setStyleName("okm-KeyMap-ImageHover");
    small.setStyleName("okm-KeyMap-ImageHover");
    medium.setStyleName("okm-KeyMap-ImageHover");
    big.setStyleName("okm-KeyMap-ImageHover");
    tagCloud.setStylePrimaryName("okm-cloudWrap");

    VerticalPanel vKeyPanel = new VerticalPanel();
    vKeyPanel.setWidth("100%");

    vKeyPanel.add(keyRelatedTable);
    vKeyPanel.add(keyTopTable);
    vKeyPanel.add(keyAllTable);

    keyRelatedTable.setVisible(false); // By default related table is only visible when has some content

    horizontalSplitPanel.setRightWidget(vKeyPanel);
    horizontalSplitPanel.setLeftWidget(vPanel);

    initWidget(horizontalSplitPanel);
}

From source file:com.qualogy.qafe.gwt.client.ui.renderer.SplitPanelRenderer.java

License:Apache License

public UIObject render(ComponentGVO component, String uuid, String parent, String context) {
    Panel uiObject = null;/*from   ww w  . j a  va2s  .co  m*/
    if (component != null) {
        if (component instanceof SplitPanelGVO) {
            SplitPanelGVO gvo = (SplitPanelGVO) component;
            if (gvo.getHorizontalOrientation() != null) {
                if (gvo.getHorizontalOrientation().booleanValue()) {
                    uiObject = new HorizontalSplitPanel();
                } else {
                    uiObject = new VerticalSplitPanel();
                }

            } else {
                uiObject = new HorizontalSplitPanel();
            }

            RendererHelper.fillIn(component, uiObject, uuid, parent, context);
            //            RendererHelper.addId(component, uiObject,uuid,parent);
            //            RendererHelper.addUUID(component, uiObject, uuid);
            //            RendererHelper.addDisabledInfo(component, uiObject);   
            //            
            //            //addStyle(vo, ui);
            //            RendererHelper.addEvents(component, uiObject,uuid);
            //            RendererHelper.addVisibleInfo(component,uiObject);
            //         
            //            
            Widget left = (Widget) renderChildComponent(gvo.getFirst(), uuid, parent, context);
            RendererHelper.fillIn(gvo.getFirst(), left, uuid, parent, context);
            Widget right = (Widget) renderChildComponent(gvo.getSecond(), uuid, parent, context);
            RendererHelper.fillIn(gvo.getSecond(), right, uuid, parent, context);

            if (uiObject instanceof VerticalSplitPanel) {
                VerticalSplitPanel vsp = (VerticalSplitPanel) uiObject;
                vsp.setSplitPosition(gvo.getPosition());
                if (left != null) {
                    vsp.setTopWidget(left);
                }
                if (right != null) {
                    vsp.setBottomWidget(right);
                }
                //vsp.setSize("auto", "50px");

            }

            if (uiObject instanceof HorizontalSplitPanel) {
                HorizontalSplitPanel vsp = (HorizontalSplitPanel) uiObject;
                vsp.setSplitPosition(gvo.getPosition());
                if (left != null) {
                    vsp.setLeftWidget(left);
                }
                if (right != null) {
                    vsp.setRightWidget(right);
                }
                //vsp.setSize("100%", "auto");
            }
            DecoratorPanel simplePanel = new DecoratorPanel();
            simplePanel.add(uiObject);
            uiObject = simplePanel;
        }
    }

    return uiObject;
}

From source file:com.qualogy.qafe.mgwt.client.ui.renderer.SplitPanelRenderer.java

License:Apache License

public UIObject render(ComponentGVO component, String owner, String uuid, String parent, String context,
        AbstractActivity activity) {//from  w  w w .j a  v  a2  s  .  c o m
    Panel uiObject = null;
    if (component != null) {
        if (component instanceof SplitPanelGVO) {
            SplitPanelGVO gvo = (SplitPanelGVO) component;
            if (gvo.getHorizontalOrientation() != null) {
                if (gvo.getHorizontalOrientation().booleanValue()) {
                    uiObject = new HorizontalSplitPanel();
                } else {
                    uiObject = new VerticalSplitPanel();
                }

            } else {
                uiObject = new HorizontalSplitPanel();
            }

            RendererHelper.fillIn(component, uiObject, uuid, parent, context);
            //            RendererHelper.addId(component, uiObject,uuid,parent);
            //            RendererHelper.addUUID(component, uiObject, uuid);
            //            RendererHelper.addDisabledInfo(component, uiObject);   
            //            
            //            //addStyle(vo, ui);
            //            RendererHelper.addEvents(component, uiObject,uuid);
            //            RendererHelper.addVisibleInfo(component,uiObject);
            //         
            //            
            Widget left = (Widget) renderChildComponent(gvo.getFirst(), owner, uuid, parent, context, activity);
            RendererHelper.fillIn(gvo.getFirst(), left, uuid, parent, context);
            Widget right = (Widget) renderChildComponent(gvo.getSecond(), owner, uuid, parent, context,
                    activity);
            RendererHelper.fillIn(gvo.getSecond(), right, uuid, parent, context);

            if (uiObject instanceof VerticalSplitPanel) {
                VerticalSplitPanel vsp = (VerticalSplitPanel) uiObject;
                vsp.setSplitPosition(gvo.getPosition());
                if (left != null) {
                    vsp.setTopWidget(left);
                }
                if (right != null) {
                    vsp.setBottomWidget(right);
                }
                //vsp.setSize("auto", "50px");

            }

            if (uiObject instanceof HorizontalSplitPanel) {
                HorizontalSplitPanel vsp = (HorizontalSplitPanel) uiObject;
                vsp.setSplitPosition(gvo.getPosition());
                if (left != null) {
                    vsp.setLeftWidget(left);
                }
                if (right != null) {
                    vsp.setRightWidget(right);
                }
                //vsp.setSize("100%", "auto");
            }
            DecoratorPanel simplePanel = new DecoratorPanel();
            simplePanel.add(uiObject);
            uiObject = simplePanel;
        }
    }

    return uiObject;
}

From source file:edu.caltech.ipac.firefly.ui.panels.LinksPanel.java

public LinksPanel() {
    HorizontalSplitPanel mainPanel = new HorizontalSplitPanel();
    initWidget(mainPanel);// w w  w  .j a va  2  s  . c om
    //lst.setStyleName("link-list");
    lst.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent ev) {
            selectLink(lst.getLastClicked());
        }

    });

    //linkPanel.add(lst);
    deckPanel.setStyleName("content-panel");

    //mainPanel.add(linkPanel);
    mainPanel.add(lst);
    mainPanel.setSplitPosition("25%");
    mainPanel.add(deckPanel);
    //        mainPanel.setStyleName("links-panel");
}

From source file:gov.nist.appvet.gwt.client.gui.AppVetPanel.java

License:Open Source License

public AppVetPanel(Unit unit, final ConfigInfoGwt configInfo, List<AppInfoGwt> initialApps) {
    super(Unit.PX);

    Window.addResizeHandler(new ResizeHandler() {
        Timer resizeTimer = new Timer() {

            @Override// w  w w.  jav  a2s  . co  m
            public void run() {
                resizeComponents();
            }

        };

        @Override
        public void onResize(ResizeEvent event) {
            resizeTimer.cancel();
            resizeTimer.schedule(250);
        }

    });

    userInfo = configInfo.getUserInfo();
    userName = userInfo.getUserName();
    allApps = initialApps;

    sinkEvents(Event.ONCLICK);
    sessionId = configInfo.getSessionId();
    sessionExpirationLong = configInfo.getSessionExpirationLong();
    MAX_SESSION_IDLE_DURATION = configInfo.getMaxIdleTime();
    POLLING_INTERVAL = configInfo.getUpdatesDelay();

    setSize("100%", "");
    setStyleName("mainDockPanel");
    SERVLET_URL = configInfo.getAppVetServletUrl();
    HOST_URL = configInfo.getAppVetHostUrl();
    appSelectionModel = new SingleSelectionModel<AppInfoGwt>();
    appSelectionModel.addSelectionChangeHandler(new AppListHandler(this, configInfo));
    if (configInfo.getAvailableToolNames() == null) {
        log.severe("Available tools is null");
    }
    availableToolNames = configInfo.getAvailableToolNames();
    availableToolIDs = configInfo.getAvailableToolIDs();
    availableToolTypes = configInfo.getAvailableToolTypes();

    final VerticalPanel northAppVetPanel = new VerticalPanel();
    northAppVetPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    northAppVetPanel.setStyleName("northAppVetPanel");
    northAppVetPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    addNorth(northAppVetPanel, 125.0);
    northAppVetPanel.setSize("100%", "");

    final HorizontalPanel horizontalPanel_5 = new HorizontalPanel();
    horizontalPanel_5.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalPanel_5.setStyleName("appVetHeaderPanel");
    northAppVetPanel.add(horizontalPanel_5);
    northAppVetPanel.setCellVerticalAlignment(horizontalPanel_5, HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalPanel_5.setWidth("100%");
    northAppVetPanel.setCellWidth(horizontalPanel_5, "100%");

    final InlineHTML nlnhtmlNewInlinehtml_1 = new InlineHTML(
            "<img border=\"0\" width=\"192px\" src=\"images/appvet_logo.png\" alt=\"appvet\" />");
    nlnhtmlNewInlinehtml_1.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    nlnhtmlNewInlinehtml_1.setStyleName("");
    horizontalPanel_5.add(nlnhtmlNewInlinehtml_1);
    horizontalPanel_5.setCellWidth(nlnhtmlNewInlinehtml_1, "33%");
    horizontalPanel_5.setCellVerticalAlignment(nlnhtmlNewInlinehtml_1, HasVerticalAlignment.ALIGN_MIDDLE);

    final HorizontalPanel horizontalPanel_6 = new HorizontalPanel();
    horizontalPanel_6.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalPanel_6.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    horizontalPanel_5.add(horizontalPanel_6);
    horizontalPanel_6.setWidth("");
    horizontalPanel_5.setCellWidth(horizontalPanel_6, "34%");
    horizontalPanel_5.setCellHorizontalAlignment(horizontalPanel_6, HasHorizontalAlignment.ALIGN_CENTER);
    horizontalPanel_5.setCellVerticalAlignment(horizontalPanel_6, HasVerticalAlignment.ALIGN_MIDDLE);

    searchTextBox = new TextBox();
    searchTextBox.setText("Search");
    searchTextBox.setStyleName("searchTextBox");
    searchTextBox.setTitle("Search by app ID, name, release kit, etc.");
    searchTextBox.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            searchTextBox.setText("");
        }

    });

    searchTextBox.addKeyPressHandler(new KeyPressHandler() {

        @Override
        public void onKeyPress(KeyPressEvent event_) {
            final boolean enterPressed = KeyCodes.KEY_ENTER == event_.getNativeEvent().getKeyCode();
            final String searchString = searchTextBox.getText();

            if (enterPressed) {
                final int numFound = search();
                if (numFound > 0) {
                    appsLabel.setText("Search Results for \"" + searchString + "\"");
                }
            }
        }

    });

    searchTextBox.setSize("300px", "22px");

    horizontalPanel_6.add(searchTextBox);
    horizontalPanel_6.setCellVerticalAlignment(searchTextBox, HasVerticalAlignment.ALIGN_MIDDLE);

    final PushButton searchButton = new PushButton("Search");
    searchButton.setTitle("Search by app ID, name, release kit, etc.");
    searchButton.getUpFace().setHTML("");
    searchButton.setSize("18px", "18px");
    searchButton.setHTML("<img width=\"18px\" src=\"images/icon-search.png\" alt=\"search\" />");
    searchButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            final String searchString = searchTextBox.getText();
            final int numFound = search();
            if (numFound > 0) {
                appsLabel.setText("Search Results for \"" + searchString + "\"");
            }
        }

    });

    horizontalPanel_6.add(searchButton);
    horizontalPanel_6.setCellHorizontalAlignment(searchButton, HasHorizontalAlignment.ALIGN_CENTER);
    horizontalPanel_6.setCellVerticalAlignment(searchButton, HasVerticalAlignment.ALIGN_MIDDLE);

    Image image = new Image("images/nist-gray.png");
    horizontalPanel_5.add(image);
    horizontalPanel_5.setCellHorizontalAlignment(image, HasHorizontalAlignment.ALIGN_RIGHT);
    horizontalPanel_5.setCellWidth(image, "33%");

    final HorizontalPanel horizontalPanel_3 = new HorizontalPanel();
    northAppVetPanel.add(horizontalPanel_3);
    northAppVetPanel.setCellHorizontalAlignment(horizontalPanel_3, HasHorizontalAlignment.ALIGN_CENTER);
    horizontalPanel_3.setWidth("100%");
    northAppVetPanel.setCellWidth(horizontalPanel_3, "100%");
    final MenuBar appVetMenuBar = new MenuBar(false);
    horizontalPanel_3.add(appVetMenuBar);

    appVetMenuBar.setStyleName("appVetMenuBar");
    appVetMenuBar.setAutoOpen(true);
    appVetMenuBar.setWidth("250px");
    appVetMenuBar.setAnimationEnabled(false);
    final MenuBar userMenuBar = new MenuBar(true);
    accountMenuItem = new MenuItem(userInfo.getNameWithLastNameInitial(), true, userMenuBar);
    accountMenuItem.setStyleName("AccountMenuItem");

    final MenuItem accountSettingsMenuItem = new MenuItem("Account Settings", false, new Command() {
        @Override
        public void execute() {
            updateUserInfo();
        }
    });

    userMenuBar.addItem(accountSettingsMenuItem);

    final MenuItem myAppsMenuItem = new MenuItem("My Apps", false, new Command() {

        @Override
        public void execute() {
            searchTextBox.setText(userInfo.getUserName());
            final int numFound = search();
            if (numFound > 0) {
                appsLabel.setText("My Apps");
            }
        }

    });
    userMenuBar.addItem(myAppsMenuItem);

    final MenuItemSeparator separator = new MenuItemSeparator();
    userMenuBar.addSeparator(separator);
    final MenuItem logoutMenuItem = new MenuItem("Logout", false, new Command() {

        @Override
        public void execute() {
            appVetServiceAsync.removeSession(sessionId, new AsyncCallback<Boolean>() {

                @Override
                public void onFailure(Throwable caught) {
                    AppVetPanel.showMessageDialog("AppVet Error", "App list retrieval error", true);
                    errorDialogBox.closeButton.setFocus(true);
                    errorDialogBox.closeButton.addClickHandler(new ClickHandler() {

                        @Override
                        public void onClick(ClickEvent event) {
                            killDialogBox(errorDialogBox);
                        }

                    });
                }

                @Override
                public void onSuccess(Boolean result) {
                    if (result == false) {
                        AppVetPanel.showMessageDialog("AppVet Error", "Could not remove session", true);
                        errorDialogBox.closeButton.setFocus(true);
                        errorDialogBox.closeButton.addClickHandler(new ClickHandler() {

                            @Override
                            public void onClick(ClickEvent event) {
                                killDialogBox(errorDialogBox);
                            }

                        });
                    } else {
                        pollingTimer.cancel();
                        final LoginPanel loginPanel = new LoginPanel(Unit.PX);
                        final RootLayoutPanel rootLayoutPanel = RootLayoutPanel.get();
                        rootLayoutPanel.clear();
                        rootLayoutPanel.add(loginPanel);

                        System.gc();
                    }
                }

            });
        }

    });

    userMenuBar.addItem(logoutMenuItem);
    appVetMenuBar.addItem(accountMenuItem);

    final MenuBar helpMenuBar = new MenuBar(true);
    final MenuItem helpMenuItem = new MenuItem("Help", true, helpMenuBar);
    final MenuItem aboutMenuItem = new MenuItem("About", false, new Command() {

        @Override
        public void execute() {
            aboutDialogBox = new AboutDialogBox(configInfo.getAppVetVersion());
            aboutDialogBox.setText("About");
            aboutDialogBox.center();
            aboutDialogBox.closeButton.setFocus(true);
            aboutDialogBox.closeButton.addClickHandler(new ClickHandler() {

                @Override
                public void onClick(ClickEvent event) {
                    killDialogBox(aboutDialogBox);
                }

            });
        }

    });

    final MenuItem documentationMenuItem = new MenuItem("Documentation", false, new Command() {

        @Override
        public void execute() {
            Window.open("http://csrc.nist.gov/projects/appvet/", "_blank", null);
        }

    });
    helpMenuBar.addItem(documentationMenuItem);

    appVetMenuBar.addItem(helpMenuItem);
    helpMenuBar.addItem(aboutMenuItem);

    horizontalPanel_3.add(statusMessageLabel);
    horizontalPanel_3.setCellVerticalAlignment(statusMessageLabel, HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalPanel_3.setCellHorizontalAlignment(statusMessageLabel, HasHorizontalAlignment.ALIGN_RIGHT);
    horizontalPanel_3.setCellWidth(statusMessageLabel, "100%");

    statusMessageLabel.setStyleName("devModeIndicator");
    statusMessageLabel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    statusMessageLabel.setSize("420px", "18");

    final MenuBar adminMenuBar = new MenuBar(true);
    final MenuItem adminMenuItem = new MenuItem("Admin", true, adminMenuBar);

    final MenuItem mntmAppVetLog = new MenuItem("AppVet Log", false, new Command() {

        @Override
        public void execute() {
            final String dateString = "?nocache" + new Date().getTime();
            final String url = SERVLET_URL + dateString + "&command=GET_APPVET_LOG&sessionid=" + sessionId;
            Window.open(url, "_blank", "");
        }

    });

    adminMenuBar.addItem(mntmAppVetLog);

    final MenuItem usersMenuItem = new MenuItem("Users", false, new Command() {

        @Override
        public void execute() {
            usersDialogBox = new UsersDialogBox();
            usersDialogBox.setText("Users");
            usersDialogBox.center();
            usersDialogBox.doneButton.setFocus(true);
            usersDialogBox.doneButton.addClickHandler(new ClickHandler() {

                @Override
                public void onClick(ClickEvent event) {
                    killDialogBox(usersDialogBox);
                }

            });
        }

    });

    adminMenuBar.addItem(usersMenuItem);

    if (userInfo.getRole().equals("ADMIN")) {
        appVetMenuBar.addItem(adminMenuItem);
    }

    // Remove first element containing the lastUpdate timestamp
    AppInfoGwt timeStampObject = null;
    if (initialApps != null && initialApps.size() > 0) {
        timeStampObject = initialApps.remove(0);
        lastAppsListUpdate = timeStampObject.getLastAppUpdate();
    }

    final HorizontalPanel horizontalPanel_2 = new HorizontalPanel();
    horizontalPanel_2.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalPanel_2.setStyleName("footerPanel");
    addSouth(horizontalPanel_2, 35.0);
    horizontalPanel_2.setSize("100%", "");

    //      final Label lastUpdatedLabel = new Label("Last updated: "
    //            + configInfo.getLastUpdated());
    //      lastUpdatedLabel
    //      .setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    //      lastUpdatedLabel.setStyleName("lastUpdated");
    //      horizontalPanel_2.add(lastUpdatedLabel);
    //      lastUpdatedLabel.setWidth("200px");
    //      horizontalPanel_2.setCellWidth(lastUpdatedLabel, "100%");
    //      horizontalPanel_2.setCellVerticalAlignment(lastUpdatedLabel,
    //            HasVerticalAlignment.ALIGN_MIDDLE);

    final HorizontalSplitPanel centerAppVetSplitPanel = new HorizontalSplitPanel();
    centerAppVetSplitPanel.setSplitPosition("64%");
    centerAppVetSplitPanel.setSize("", "");

    final SimplePanel leftCenterPanel = new SimplePanel();
    centerAppVetSplitPanel.setLeftWidget(leftCenterPanel);
    leftCenterPanel.setSize("", "95%");

    final DockPanel dockPanel_1 = new DockPanel();
    dockPanel_1.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    leftCenterPanel.setWidget(dockPanel_1);
    dockPanel_1.setSize("100%", "");
    rightCenterPanel = new SimplePanel();
    centerAppVetSplitPanel.setRightWidget(rightCenterPanel);
    rightCenterPanel.setSize("", "630px");

    final VerticalPanel appInfoVerticalPanel = new VerticalPanel();
    appInfoVerticalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    rightCenterPanel.setWidget(appInfoVerticalPanel);
    appInfoVerticalPanel.setSize("99%", "");

    final HorizontalPanel horizontalPanel_1 = new HorizontalPanel();
    horizontalPanel_1.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalPanel_1.setStyleName("iconPanel");
    appInfoVerticalPanel.add(horizontalPanel_1);
    appInfoVerticalPanel.setCellWidth(horizontalPanel_1, "100%");
    horizontalPanel_1.setSize("", "");

    appInfoIcon = new Image("");
    appInfoIcon.setVisible(false);
    appInfoIcon.setAltText("");
    horizontalPanel_1.add(appInfoIcon);
    horizontalPanel_1.setCellVerticalAlignment(appInfoIcon, HasVerticalAlignment.ALIGN_MIDDLE);
    appInfoIcon.setSize("70px", "70px");

    final VerticalPanel verticalPanel = new VerticalPanel();
    horizontalPanel_1.add(verticalPanel);
    appInfoName = new HTML("", true);
    appInfoName.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    verticalPanel.add(appInfoName);
    appInfoName.setStyleName("appInfoName");
    appInfoName.setWidth("");
    horizontalPanel_1.setCellVerticalAlignment(appInfoName, HasVerticalAlignment.ALIGN_MIDDLE);
    appInfoVersion = new HTML("", true);
    appInfoVersion.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    appInfoVersion.setStyleName("appInfoVersion");
    verticalPanel.add(appInfoVersion);
    appsListButtonPanel = new HorizontalPanel();
    appsListButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    dockPanel_1.add(appsListButtonPanel, DockPanel.NORTH);
    dockPanel_1.setCellHorizontalAlignment(appsListButtonPanel, HasHorizontalAlignment.ALIGN_CENTER);
    dockPanel_1.setCellWidth(appsListButtonPanel, "100%");
    dockPanel_1.setCellVerticalAlignment(appsListButtonPanel, HasVerticalAlignment.ALIGN_MIDDLE);
    appsListButtonPanel.setStyleName("appListButtonPanel");
    appsListButtonPanel.setSize("100%", "");

    appsLabel = new InlineLabel("Apps");
    appsLabel.setStyleName("AppsLabel");
    appsListButtonPanel.add(appsLabel);
    appsListButtonPanel.setCellWidth(appsLabel, "50%");
    appsListButtonPanel.setCellVerticalAlignment(appsLabel, HasVerticalAlignment.ALIGN_MIDDLE);
    appsLabel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    appsLabel.setWidth("60px");

    final HorizontalPanel horizontalPanel = new HorizontalPanel();
    horizontalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    horizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalPanel.setStyleName("appFunctionButtonPanel");
    appsListButtonPanel.add(horizontalPanel);
    appsListButtonPanel.setCellWidth(horizontalPanel, "50%");
    appsListButtonPanel.setCellVerticalAlignment(horizontalPanel, HasVerticalAlignment.ALIGN_MIDDLE);
    appsListButtonPanel.setCellHorizontalAlignment(horizontalPanel, HasHorizontalAlignment.ALIGN_RIGHT);
    horizontalPanel.setWidth("");

    final PushButton submitButton = new PushButton("Submit");
    submitButton.setTitle("Submit App");
    submitButton.setHTML("<img width=\"18px\" src=\"images/icon-submit.png\" alt=\"Submit\" />");
    submitButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            appUploadDialogBox = new AppUploadDialogBox(sessionId, SERVLET_URL);
            appUploadDialogBox.setText("Submit App");
            appUploadDialogBox.center();
            appUploadDialogBox.cancelButton.setFocus(true);
            appUploadDialogBox.cancelButton.addClickHandler(new ClickHandler() {

                @Override
                public void onClick(ClickEvent event) {
                    killDialogBox(appUploadDialogBox);
                }

            });

            appUploadDialogBox.uploadAppForm.addFormHandler(new AppUploadFormHandler(appUploadDialogBox));
        }
    });

    final PushButton viewAllButton = new PushButton("View All");
    viewAllButton.setTitle("View All");
    viewAllButton.setHTML("<img width=\"18px\" src=\"images/icon-view-all.png\" alt=\"view-all\" />");
    viewAllButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            searchMode = false;
            setAllApps();
        }

    });

    horizontalPanel.add(viewAllButton);
    horizontalPanel.setCellHorizontalAlignment(viewAllButton, HasHorizontalAlignment.ALIGN_CENTER);
    horizontalPanel.setCellVerticalAlignment(viewAllButton, HasVerticalAlignment.ALIGN_MIDDLE);
    viewAllButton.setSize("18px", "18px");
    horizontalPanel.add(submitButton);
    horizontalPanel.setCellVerticalAlignment(submitButton, HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalPanel.setCellHorizontalAlignment(submitButton, HasHorizontalAlignment.ALIGN_CENTER);
    submitButton.setSize("18px", "18px");
    downloadButton = new PushButton("Download");
    downloadButton.setTitle("Download Reports");
    downloadButton.setHTML("<img width=\"18px\" src=\"images/icon-download.png\" alt=\"Download\" />");
    horizontalPanel.add(downloadButton);
    downloadButton.setEnabled(true);
    downloadButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            final AppInfoGwt selected = appSelectionModel.getSelectedObject();
            if (selected == null) {
                showMessageDialog("AppVet Error", "No app is selected", true);
            } else {

                final String appId = selected.appId;
                final String dateString = "?nocache" + new Date().getTime();
                final String url = SERVLET_URL + dateString + "&command=DOWNLOAD_REPORTS&appid=" + appId
                        + "&sessionid=" + sessionId;
                Window.open(url, "_self", "");

                //               downloadDialog = new DownloadDialogBox(sessionId, selected);
                //               downloadDialog.setText("Download reports");
                //               downloadDialog.center();
                //               downloadDialog.cancelButton.setFocus(true);
                //               downloadDialog.cancelButton
                //               .addClickHandler(new ClickHandler() {
                //                  @Override
                //                  public void onClick(ClickEvent event) {
                //                     killDialogBox(downloadDialog);
                //                  }
                //               });
                //               downloadDialog.downloadButton
                //               .addClickHandler(new ClickHandler() {
                //                  @Override
                //                  public void onClick(ClickEvent event) {
                //                     if (downloadDialog.selected_apk_radio_button
                //                           .isChecked()) {
                //                        final AppInfoGwt selected = appSelectionModel
                //                              .getSelectedObject();
                //                        final String appId = selected.appId;
                //                        final String apk = selected.appName;
                //                        final String dateString = "?nocache"
                //                              + new Date().getTime();
                //                        final String url = SERVLET_URL
                //                              + dateString
                //                              + "&command=DOWNLOAD_APP&appid="
                //                              + appId + "&sessionid="
                //                              + sessionId + "&appname=" + apk
                //                              + ".apk";
                //                        Window.open(url, "_self", "");
                //                        killDialogBox(downloadDialog);
                //                     } else if (downloadDialog.selected_report_radio_button
                //                           .isChecked()) {
                //                        final AppInfoGwt selected = appSelectionModel
                //                              .getSelectedObject();
                //                        final String appId = selected.appId;
                //                        final String dateString = "?nocache"
                //                              + new Date().getTime();
                //                        final String url = SERVLET_URL
                //                              + dateString
                //                              + "&command=DOWNLOAD_REPORTS&appid="
                //                              + appId + "&sessionid="
                //                              + sessionId;
                //                        Window.open(url, "_self", "");
                //                        killDialogBox(downloadDialog);
                //                     }
                //                  }
                //               });
            }
        }
    });

    horizontalPanel.setCellHorizontalAlignment(downloadButton, HasHorizontalAlignment.ALIGN_CENTER);
    horizontalPanel.setCellVerticalAlignment(downloadButton, HasVerticalAlignment.ALIGN_MIDDLE);
    appsListButtonPanel.setCellHorizontalAlignment(downloadButton, HasHorizontalAlignment.ALIGN_CENTER);
    downloadButton.setSize("18px", "18px");
    addReportButton = new PushButton("Add Report");
    horizontalPanel.add(addReportButton);
    horizontalPanel.setCellVerticalAlignment(addReportButton, HasVerticalAlignment.ALIGN_MIDDLE);
    addReportButton.setTitle("Override Report");
    addReportButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            final AppInfoGwt selected = appSelectionModel.getSelectedObject();
            if (selected == null) {
                showMessageDialog("AppVet Error", "No app is selected", true);
            } else {
                reportUploadDialogBox = new ReportUploadDialogBox(userName, sessionId, selected.appId,
                        SERVLET_URL, availableToolNames, availableToolIDs);
                reportUploadDialogBox.setText("Override Report");
                reportUploadDialogBox.center();
                reportUploadDialogBox.cancelButton.setFocus(true);
                reportUploadDialogBox.cancelButton.addClickHandler(new ClickHandler() {

                    @Override
                    public void onClick(ClickEvent event) {
                        killDialogBox(reportUploadDialogBox);
                    }

                });
                reportUploadDialogBox.uploadReportForm.addFormHandler(
                        new ReportUploadFormHandler(reportUploadDialogBox, userName, selected.appId));
            }
        }
    });

    addReportButton.setSize("18px", "18px");
    addReportButton.setHTML("<img width=\"18px\" src=\"images/icon-submit-report.png\" alt=\"Add Report\" />");
    deleteButton = new PushButton("Delete");
    horizontalPanel.add(deleteButton);
    horizontalPanel.setCellVerticalAlignment(deleteButton, HasVerticalAlignment.ALIGN_MIDDLE);
    deleteButton.setHTML("<img width=\"18px\" src=\"images/icon-delete.png\" alt=\"delete\" />");
    deleteButton.setTitle("Delete App");
    deleteButton.setVisible(true);
    deleteButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            final AppInfoGwt selected = appSelectionModel.getSelectedObject();
            deleteConfirmDialogBox = new DeleteAppConfirmDialogBox(selected.appId, selected.appName);
            deleteConfirmDialogBox.setText("Confirm Delete");
            deleteConfirmDialogBox.center();
            deleteConfirmDialogBox.cancelButton.setFocus(true);
            deleteConfirmDialogBox.cancelButton.addClickHandler(new ClickHandler() {

                @Override
                public void onClick(ClickEvent event) {
                    killDialogBox(deleteConfirmDialogBox);
                    return;
                }

            });
            deleteConfirmDialogBox.okButton.addClickHandler(new ClickHandler() {

                @Override
                public void onClick(ClickEvent event) {
                    killDialogBox(deleteConfirmDialogBox);
                    if (selected != null) {
                        deleteApp(selected.appId, userName);
                    }
                }

            });
        }
    });
    deleteButton.setSize("18px", "18px");
    logButton = new PushButton("Log");
    horizontalPanel.add(logButton);
    horizontalPanel.setCellVerticalAlignment(logButton, HasVerticalAlignment.ALIGN_MIDDLE);
    logButton.setTitle("View Log");
    logButton.setHTML("<img width=\"18px\" src=\"images/icon-log.png\" alt=\"log\" />");
    logButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            final AppInfoGwt selected = appSelectionModel.getSelectedObject();
            if (selected != null) {
                final String appId = selected.appId;
                final String dateString = "?nocache" + new Date().getTime();
                final String url = SERVLET_URL + dateString + "&command=GET_APP_LOG&appid=" + appId
                        + "&sessionid=" + sessionId;
                Window.open(url, "_blank", "");
            }
        }

    });
    logButton.setSize("18px", "18px");

    appsListTable = new AppsListPagingDataGrid<AppInfoGwt>();
    appsListTable.dataGrid.setStyleName("dataGrid");
    dockPanel_1.add(appsListTable, DockPanel.CENTER);
    dockPanel_1.setCellHorizontalAlignment(appsListTable, HasHorizontalAlignment.ALIGN_CENTER);
    dockPanel_1.setCellVerticalAlignment(appsListTable, HasVerticalAlignment.ALIGN_MIDDLE);
    appsListTable.setAppVetHostUrl(HOST_URL);
    appsListTable.dataGrid.setSize("99%", "");
    appsListTable.setDataList(initialApps);
    appsListTable.setSize("", "");
    appsListTable.dataGrid.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
    appsListTable.dataGrid.setSelectionModel(appSelectionModel);
    addReportButton.setVisible(true);
    logButton.setVisible(true);

    //      final Label lblNewLabel_1 = new Label("*See log for system errors");
    //      lblNewLabel_1.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    //      appInfoVerticalPanel.add(lblNewLabel_1);
    //      lblNewLabel_1.setWidth("200px");
    //      appInfoVerticalPanel.setCellWidth(lblNewLabel_1, "100%");
    toolResultsHtml = new HTML("", true);
    appInfoVerticalPanel.add(toolResultsHtml);
    appInfoVerticalPanel.setCellWidth(toolResultsHtml, "100%");
    toolResultsHtml.setWidth("100%");
    toolResultsHtml.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    toolResultsHtml.setStyleName("toolResultsHtml");

    add(centerAppVetSplitPanel);

    /*
    // Add logo in bottom-right corner 
    final InlineHTML nlnhtmlNewInlinehtml = new InlineHTML(
    "<a href=\"http://www.example.com\"><img border=\"0\" width=\"75px\"  src=\"exampleImage.png\" alt=\"example\" /></a>"
    ); nlnhtmlNewInlinehtml
    .setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    nlnhtmlNewInlinehtml.setStyleName("mainTaLogo");
    horizontalPanel_2.add(nlnhtmlNewInlinehtml);
    nlnhtmlNewInlinehtml.setWidth("");
    horizontalPanel_2.setCellHorizontalAlignment(nlnhtmlNewInlinehtml,
    HasHorizontalAlignment.ALIGN_RIGHT);
    horizontalPanel_2.setCellVerticalAlignment(nlnhtmlNewInlinehtml,
    HasVerticalAlignment.ALIGN_MIDDLE);
     */
    if ((initialApps != null) && (initialApps.size() > 0)) {
        appSelectionModel.setSelected(initialApps.get(0), true);
    } else {
        logButton.setEnabled(false);
        addReportButton.setEnabled(false);
        deleteButton.setEnabled(false);
        downloadButton.setEnabled(false);
    }
    pollServer(userName);
    scheduleResize();
}

From source file:gwt.g3d.test.client.MainDemo.java

License:Apache License

/**
 * This is the entry point method.//from www  .j a  v a  2  s.co m
 */
public void onModuleLoad() {
    WebGLContextAttributes contextAttribs = new WebGLContextAttributes();
    contextAttribs.setStencilEnable(true);
    surface = new Surface3D(500, 500, contextAttribs);

    HorizontalSplitPanel mainPanel = new HorizontalSplitPanel();
    mainPanel.setSplitPosition((20 + surface.getWidth()) + "px");
    RootPanel.get().add(mainPanel);
    mainPanel.setLeftWidget(createLeftWidget());
    mainPanel.setRightWidget(createRightWidget());

    final GL2 gl = surface.getGL();
    if (gl == null) {
        Window.alert("No WebGL context found. Exiting.");
        return;
    }

    gl.clearColor(0.0f, 0f, 0f, 1f);
    gl.clearDepth(1);
    gl.viewport(0, 0, surface.getWidth(), surface.getHeight());

    gl.enable(EnableCap.DEPTH_TEST);
    gl.depthFunc(DepthFunction.LEQUAL);
    gl.clear(ClearBufferMask.COLOR_BUFFER_BIT, ClearBufferMask.DEPTH_BUFFER_BIT);

    runDemo(gl);
}