Java Code Examples for com.google.gwt.user.client.ui.SimplePanel

The following examples show how to use com.google.gwt.user.client.ui.SimplePanel. 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
Source Project: EasyML   Source File: SaveDatasetPanel.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void init(){
	grid = new DescribeGrid(labarr, "data");
	verticalPanel.add(grid);
	grid.addStyleName("bda-descgrid-savedata");
	savebtn.setStyleName("bda-descgrid-savedata-submitbtn");
	SimplePanel simPanel = new SimplePanel();
	simPanel.add( savebtn );
	simPanel.setStyleName("bda-descgrid-savedata-simpanel");
	verticalPanel.add(simPanel);
	savebtn.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			dbController.submitSaveDataset2DB(panel,SaveDatasetPanel.this, dataset,grid);
		}
	});
}
 
Example 2
public TemplateWidget(TemplateInfo info, String hostUrl) {
  setTemplate(info, hostUrl);

  panel = new VerticalPanel();
  panel.add(title);
  title.getElement().getStyle().setFontWeight(Style.FontWeight.BOLD);
  panel.add(subtitle);
  descriptionHtml.setHTML(info.description);
  panel.add(descriptionHtml);
  panel.add(image);
  SimplePanel wrapper = new SimplePanel();
  wrapper.getElement().getStyle().setOverflowY(Style.Overflow.SCROLL);
  wrapper.add(panel);
  initWidget(wrapper);
  setStylePrimaryName("ode-ContextMenu");
  setHeight("355px");
}
 
Example 3
Source Project: appinventor-extensions   Source File: MockBall.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new MockBall component.
 *
 * @param editor  editor of source file the component belongs to
 */
public MockBall(SimpleEditor editor) {
  super(editor, TYPE, images.ball());

  // Initialize mock ball UI
  ballWidget = new SimplePanel();
  ballWidget.setStylePrimaryName("ode-SimpleMockComponent");

  // Create an appropriately sized ball
  canvas = new GWTCanvas(diameter, diameter);
  canvas.setPixelSize(diameter, diameter);
  canvas.setBackgroundColor(GWTCanvas.TRANSPARENT);
  fillCircle();
  ballWidget.setWidget(canvas);

  initComponent(ballWidget);
}
 
Example 4
Source Project: gwt-traction   Source File: TractionDialogBox.java    License: Apache License 2.0 6 votes vote down vote up
public TractionDialogBox(boolean autoHide, boolean modal, boolean showCloseIcon) {
super(autoHide, modal, new TractionCaption());

container = new SimplePanel();
container.addStyleName("dialogContainer");

close = new Anchor();
close.setStyleName("x");
close.addClickHandler(new ClickHandler() {
           @Override
           public void onClick(ClickEvent event) {
               onCloseClick(event);
           }
});
setCloseIconVisible(showCloseIcon);

controls = new FlowPanel();
controls.setStyleName("dialogControls");
controls.add(close);

// add the controls to the end of the caption
TractionCaption caption = (TractionCaption) getCaption();
caption.add(controls);
   }
 
Example 5
Source Project: consulo   Source File: WidgetComboBox.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void onBlur(BlurEvent event) {
  if (!isFocus()) return;

  if (keyboardManagerRegistration != null) {
    keyboardManagerRegistration.removeHandler();
    keyboardManagerRegistration = null;
  }

  Object sender = event.getSource();
  getFocuses().remove(sender);

  SimplePanel value = getSelectedValue();
  if (sender == value && !false) value.removeStyleName("selected-row");

  if (!isFocus()) fireEvent(event);
}
 
Example 6
Source Project: consulo   Source File: WidgetComboBox.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void onFocus(FocusEvent event) {
  Object sender = event.getSource();
  getFocuses().add(sender);

  if (keyboardManagerRegistration == null) keyboardManagerRegistration = Event.addNativePreviewHandler(getKeyboardManager());

  SimplePanel value = getSelectedValue();
  if (sender == value) {
    value.addStyleName("selected-row");
    if (isChoiceButtonVisible()) getChoiceButton().setFocus(true);
  }
  else if (sender == null || sender == getListPanel()) { //on drop down list show
    Widget widget = getSelectedWidget();
    if (widget != null) getListPanel().ensureVisible(widget);
  }

  if (focuses.size() == 1) fireEvent(event);
}
 
Example 7
@Test
public void testPanels() throws Exception {
  invokeAllAccessibleMethods(new AbsolutePanel() {});
  invokeAllAccessibleMethods(new CellPanel() {});
  invokeAllAccessibleMethods(new ComplexPanel() {});
  invokeAllAccessibleMethods(new DeckLayoutPanel() {});
  invokeAllAccessibleMethods(new DeckPanel() {});
  invokeAllAccessibleMethods(new DecoratorPanel() {});
  invokeAllAccessibleMethods(new DockLayoutPanel(Unit.PX) {});
  invokeAllAccessibleMethods(new DockPanel() {});
  invokeAllAccessibleMethods(new FlowPanel() {});
  invokeAllAccessibleMethods(new FocusPanel() {});
  invokeAllAccessibleMethods(new HorizontalPanel() {});
  invokeAllAccessibleMethods(new HTMLPanel("") {});
  invokeAllAccessibleMethods(new LayoutPanel() {});
  invokeAllAccessibleMethods(new PopupPanel() {});
  invokeAllAccessibleMethods(new RenderablePanel("") {});
  invokeAllAccessibleMethods(new ResizeLayoutPanel() {});
  invokeAllAccessibleMethods(new SimpleLayoutPanel() {});
  invokeAllAccessibleMethods(new SimplePanel() {});
  invokeAllAccessibleMethods(new SplitLayoutPanel() {});
  invokeAllAccessibleMethods(new StackPanel() {});
  invokeAllAccessibleMethods(new VerticalPanel() {});
}
 
Example 8
Source Project: calendar-component   Source File: WeekGrid.java    License: Apache License 2.0 5 votes vote down vote up
public WeekGrid(VCalendar parent, boolean format24h) {
    setCalendar(parent);
    content = new HorizontalPanel();
    timebar = new Timebar(format24h);
    content.add(timebar);

    wrapper = new SimplePanel();
    wrapper.setStylePrimaryName("v-calendar-week-wrapper");
    wrapper.add(content);

    setWidget(wrapper);
}
 
Example 9
Source Project: calendar-component   Source File: WeekGrid.java    License: Apache License 2.0 5 votes vote down vote up
private void setVerticalScroll(boolean isVerticalScrollEnabled) {
    if (isVerticalScrollEnabled && !(isVerticalScrollable())) {
        verticalScrollEnabled = true;
        horizontalScrollEnabled = false;
        wrapper.remove(content);

        final ScrollPanel scrollPanel = new ScrollPanel();
        scrollPanel.setStylePrimaryName("v-calendar-week-wrapper");
        scrollPanel.setWidget(content);

        scrollPanel.addScrollHandler(event -> {
            if (calendar.getScrollListener() != null) {
                int vScrollPos = scrollPanel.getVerticalScrollPosition();
                calendar.getScrollListener().scroll(vScrollPos);

                if (vScrollPos > 1) {
                    content.addStyleName("scrolled");
                } else {
                    content.removeStyleName("scrolled");
                }
            }
        });

        setWidget(scrollPanel);
        wrapper = scrollPanel;

    } else if (!isVerticalScrollEnabled && (isVerticalScrollable())) {
        verticalScrollEnabled = false;
        horizontalScrollEnabled = false;
        wrapper.remove(content);

        SimplePanel simplePanel = new SimplePanel();
        simplePanel.setStylePrimaryName("v-calendar-week-wrapper");
        simplePanel.setWidget(content);

        setWidget(simplePanel);
        wrapper = simplePanel;
    }
}
 
Example 10
Source Project: appinventor-extensions   Source File: TopToolbar.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void execute() {
  final DialogBox db = new DialogBox(false, true);
  db.setText("About The Companion");
  db.setStyleName("ode-DialogBox");
  db.setHeight("200px");
  db.setWidth("400px");
  db.setGlassEnabled(true);
  db.setAnimationEnabled(true);
  db.center();

  String downloadinfo = "";
  if (!YaVersion.COMPANION_UPDATE_URL1.equals("")) {
    String url = "http://" + Window.Location.getHost() + YaVersion.COMPANION_UPDATE_URL1;
    downloadinfo = "<br/>\n<a href=" + url + ">Download URL: " + url + "</a><br/>\n";
    downloadinfo += BlocklyPanel.getQRCode(url);
  }

  VerticalPanel DialogBoxContents = new VerticalPanel();
  HTML message = new HTML(
      "Companion Version " + BlocklyPanel.getCompVersion() + downloadinfo
  );

  SimplePanel holder = new SimplePanel();
  Button ok = new Button("Close");
  ok.addClickListener(new ClickListener() {
    public void onClick(Widget sender) {
      db.hide();
    }
  });
  holder.add(ok);
  DialogBoxContents.add(message);
  DialogBoxContents.add(holder);
  db.setWidget(DialogBoxContents);
  db.show();
}
 
Example 11
Source Project: appinventor-extensions   Source File: MockVideoPlayer.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new MockVideoPlayer component.
 *
 * @param editor  editor of source file the component belongs to
 */
public MockVideoPlayer(SimpleEditor editor) {
  super(editor, TYPE, images.videoplayer());

  // Initialize mock video UI
  videoPlayerWidget = new SimplePanel();
  videoPlayerWidget.setStylePrimaryName("ode-SimpleMockComponent");
  videoPlayerWidget.setWidget(getIconImage());
  initComponent(videoPlayerWidget);
}
 
Example 12
Source Project: appinventor-extensions   Source File: MockWrapper.java    License: Apache License 2.0 5 votes vote down vote up
MockWrapper(SimpleEditor editor, String type, ImageResource icon) {
  super(editor, type, icon);

  // Initialize wrapper UI
  wrapper = new SimplePanel();
  wrapper.setStylePrimaryName("ode-SimpleMockComponent");
}
 
Example 13
Source Project: appinventor-extensions   Source File: MockListView.java    License: Apache License 2.0 5 votes vote down vote up
private void createLabelPanel() {
  panelForItem =new SimplePanel();
  panelForItem.setStylePrimaryName("listViewItemStyle");
  panelForItem.setSize(ComponentConstants.LISTVIEW_PREFERRED_WIDTH + "px",
      ComponentConstants.LISTVIEW_PREFERRED_HEIGHT + "px");
  panelForItem.add(labelInItem);
  listViewWidget.add(panelForItem);
}
 
Example 14
Source Project: appinventor-extensions   Source File: MockSlider.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new MockSlider component.
 *
 * @param editor editor of source file the component belongs to
 */
public MockSlider(SimpleEditor editor) {
  super(editor, TYPE, images.slider());

  // Initialize mock slider UI
  sliderWidget = new SimplePanel();
  sliderWidget.setStylePrimaryName("ode-SimpleMockComponent");

  sliderWidget.setWidget(getIconImage());

  initComponent(sliderWidget);
}
 
Example 15
public MockFeatureCollection(SimpleEditor editor) {
  super(editor, TYPE, images.featurecollection(), new MockFeatureCollectionLayout());

  SimplePanel panel = new SimplePanel();
  panel.setWidth("16px");
  panel.setHeight("16px");
  panel.setStylePrimaryName("ode-SimpleMockComponent");
  Image icon = new Image(images.featurecollection());
  panel.add(icon);

  initComponent(panel);
  initCollection();
  initialized = true;
}
 
Example 16
Source Project: appinventor-extensions   Source File: MockWebViewer.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new MockWebViewer component.
 *
 * @param editor  editor of source file the component belongs to
 */
public MockWebViewer(SimpleEditor editor) {
  super(editor, TYPE, images.webviewer());

  // Initialize mock WebViewer UI
  SimplePanel webViewerWidget = new SimplePanel();
  webViewerWidget.setStylePrimaryName("ode-SimpleMockContainer");
  // TODO(halabelson): Center vertically as well as horizontally
  webViewerWidget.addStyleDependentName("centerContents");
  webViewerWidget.setWidget(largeImage);
  initComponent(webViewerWidget);
}
 
Example 17
Source Project: appinventor-extensions   Source File: MockMapFeatureBase.java    License: Apache License 2.0 5 votes vote down vote up
MockMapFeatureBase(SimpleEditor editor, String type, ImageResource icon) {
  super(editor, type, icon);
  panel = new SimplePanel();
  panel.setStylePrimaryName("ode-SimpleMockComponent");
  initComponent(panel);
  this.unsinkEvents(Event.MOUSEEVENTS);
}
 
Example 18
public SearchResult() {
	sp = new SimplePanel();
	searchCompactResult = new SearchCompactResult();
	searchFullResult = new SearchFullResult();
	sp.add(searchFullResult);

	status = new Status();
	status.setStyleName("okm-StatusPopup");

	initWidget(sp);
}
 
Example 19
Source Project: djvu-html5   Source File: Djvu_html5.java    License: GNU General Public License v2.0 5 votes vote down vote up
private Widget prepareCanvas() {
	canvas = Canvas.createIfSupported();
	if (canvas == null) {
		// TODO
		throw new RuntimeException("Canvas not supported!");
	}
	canvas.setTabIndex(0);

	final SimplePanel panel = new SimplePanel(canvas);
	panel.setStyleName("content");

	Window.addResizeHandler(e -> resizeCanvas());
	Scheduler.get().scheduleFinally(() -> resizeCanvas());
	return panel;
}
 
Example 20
Source Project: swcv   Source File: WordCloudDetailApp.java    License: MIT License 5 votes vote down vote up
private void initializeContentPanel(WordCloud cloud)
{
    SimplePanel panel = createPanel(cloud.getSvg(), cloud.getWidth() + 20, cloud.getHeight() + 20);
    RootPanel rPanel = RootPanel.get("cloud-div");
    rPanel.clear();
    rPanel.add(panel);
    rPanel.setPixelSize(cloud.getWidth() + 20, cloud.getHeight() + 20);
    rPanel.addStyleName("center");
}
 
Example 21
Source Project: swcv   Source File: WordCloudDetailApp.java    License: MIT License 5 votes vote down vote up
private SimplePanel createPanel(String svg, int width, int height)
{
    SimplePanel panel = new SimplePanel();
    panel.setPixelSize(width, height);
    panel.addStyleName("center");
    HTML html = new HTML(svg);
    html.setWidth("100%");
    html.setHeight("100%");
    panel.add(html);
    return panel;
}
 
Example 22
protected InputSlider(InputSlider<T> source) {
	super(new SimplePanel(), source);
	this.contentPanel = (SimplePanel) this.getWidget();
	this.endConstruct();
	this.labelRenderer = source.labelRenderer;
	this.items.addAll(source.items);
}
 
Example 23
Source Project: lumongo   Source File: LumongoUI.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public Main createBaseView() {

	Main main = new Main();
	main.setId("main-wrapper");
	main.setMarginTop(40);
	main.setMarginBottom(40);

	simplePanel = new SimplePanel();
	main.add(simplePanel);

	Highcharts.setExportUrl("");

	return main;
}
 
Example 24
Source Project: requestor   Source File: Showcase.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void onModuleLoad() {
    populateMenu();

    // Create view container
    final SimplePanel container = new SimplePanel();
    container.setStyleName("container requestor-showcase-container");
    RootPanel.get().add(container);

    // Main Factory (Dependency Injector)
    ShowcaseClientFactory clientFactory = CLIENT_FACTORY;
    EventBus eventBus = clientFactory.getEventBus();
    PlaceController placeController = clientFactory.getPlaceController();

    // Activity-Place binding
    ActivityMapper activityMapper = new ShowcaseActivityMapper();
    ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);
    activityManager.setDisplay(container);

    // Place-History binding
    PlaceHistoryMapper historyMapper = new ShowcasePlaceHistoryMapper();
    PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
    historyHandler.register(placeController, eventBus, defaultPlace);

    // Add Loading widget
    RootPanel.get().add(new Loading(eventBus));

    // Goes to place represented on URL or default place
    historyHandler.handleCurrentHistory();
}
 
Example 25
Source Project: consulo   Source File: GwtDockLayoutImplConnector.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) {
  GwtDockLayoutImpl dockLayout = getWidget();
  dockLayout.clear();

  boolean noCenterElement = true;
  List<ComponentConnector> childComponents = getChildComponents();
  for (int i = 0; i < childComponents.size(); i++) {
    ComponentConnector connector = childComponents.get(i);
    DockLayoutState.Constraint constraint = getState().myConstraints.get(i);

    Widget widget = GwtUIUtil.fillAndReturn(connector.getWidget());
    switch (constraint) {
      case TOP:
        dockLayout.add(widget, GwtDockLayoutImpl.NORTH);
        break;
      case BOTTOM:
        dockLayout.add(widget, GwtDockLayoutImpl.SOUTH);
        break;
      case LEFT:
        dockLayout.add(widget, GwtDockLayoutImpl.WEST);
        break;
      case RIGHT:
        dockLayout.add(widget, GwtDockLayoutImpl.EAST);
        break;
      case CENTER:
        setCenterWidget(dockLayout, widget);
        noCenterElement = false;
        break;
    }
  }

  if (noCenterElement) {
    setCenterWidget(dockLayout, new SimplePanel());
  }
}
 
Example 26
Source Project: consulo   Source File: WidgetComboBox.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Highlights the visual item in the drop down list if it's selected in the model.
 *
 * @param event is an event that contains data about selected item.
 */
protected void select(ListModelEvent event) {
  if (isListPanelOpened()) {
    getListPanel().setHighlightRow(event.getItemIndex());
  }

  final Widget widget = getListItemFactory().createWidget(model.getSelected());
  final SimplePanel selectedValue = getSelectedValue();
  selectedValue.setWidget(widget);
}
 
Example 27
Source Project: consulo   Source File: GwtImageBoxImplConnector.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void onStateChanged(StateChangeEvent stateChangeEvent) {
  super.onStateChanged(stateChangeEvent);

  SimplePanel widget = getWidget();
  MultiImageState state = getState().myImageState;
  widget.setHeight(state.myHeight + "px");
  widget.setWidth(state.myWidth + "px");

  widget.setWidget(ImageConverter.create(state));
}
 
Example 28
Source Project: core   Source File: DebugPanelWidget.java    License: GNU Lesser General Public License v2.1 5 votes vote down vote up
public DebugPanelWidget(DebugPanelListener listener, final boolean showReset, Component... components) {
  this.listener = listener;
  this.components = components;

  initWidget(panel = new SimplePanel());
  panel.setStyleName(Utils.style() + "-panel");
  showLink = new CommandLink("Show Debug Panel", new Command() {
    //@Override
    public void execute() {
      show(showReset);
    }
  });
  showLink.setStyleName(Utils.style() + "-link");
  panel.add(showLink);
}
 
Example 29
Source Project: EasyML   Source File: MonitorView.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public Widget createMainLayout() {
	SplitLayoutPanel splitLayout = new SplitLayoutPanel();


	StackLayoutPanel stack = new StackLayoutPanel(Unit.EM);
	stack.setStyleName("sp");
	ScrollPanel leftcrp = new ScrollPanel();
	leftcrp.setSize("100%", "100%");
	VerticalPanel vPanel = new VerticalPanel();
	vPanel.setWidth("100%");

	programTree = ProgramTreeLoader.load(AppController.email);
	datasetTree = DatasetTreeLoader.load(AppController.email);
	jobTree = JobTreeLoader.load(AppController.email);
	resultTree = new SearchTree();
	initTabPanel();
	DisclosurePanel distackleft = new DisclosureStackPanel("Search")
	.asWidget();
	searchGrid = new SearchGrid(programTree,datasetTree,jobTree,resultTree);
	distackleft.setContent(searchGrid);
	SimplePanel tabSimPanel = new SimplePanel();
	tabSimPanel.add(tabPanel);

	vPanel.add(tabSimPanel);
	vPanel.add(distackleft);
	leftcrp.add(vPanel);
	stack.add(leftcrp, "", 0);

	StackLayoutPanel stackright = new StackLayoutPanel(Unit.EM);
	stackright.setStyleName("sp");
	DisclosurePanel distackright1 = new DisclosureStackPanel(Constants.studioUIMsg.jobPanelTitle())
	.asWidget();
	DisclosurePanel distackright2 = new DisclosureStackPanel(Constants.studioUIMsg.modulePanelTitle())
	.asWidget();
	ScrollPanel scvp = new ScrollPanel();
	VerticalPanel verticalPanel = new VerticalPanel();
	verticalPanel.setWidth("100%");

	HorizontalPanel btnPanel = new HorizontalPanel();
	historyBtn.removeStyleName("gwt-Button");
	historyBtn.addStyleName("history-button-style");
	submitBtn.setEnabled( false );
	submitBtn.removeStyleName("gwt-Button");
	submitBtn.addStyleName("button-style");
	clearBtn.removeStyleName("gwt-Button");
	clearBtn.addStyleName("button-style");
	cloneBtn.removeStyleName("gwt-Button");
	cloneBtn.addStyleName("button-style");
	refreshBtn.removeStyleName("gwt-Button");
	refreshBtn.addStyleName("button-style");
	stopBtn.removeStyleName("gwt-Button");
	stopBtn.addStyleName("button-style");

	btnPanel.add(historyBtn);
	btnPanel.add(new HTML("&nbsp;&nbsp;"));
	btnPanel.add(submitBtn);
	btnPanel.add(new HTML("&nbsp;&nbsp;"));
	btnPanel.add(clearBtn);
	btnPanel.add(new HTML("&nbsp;&nbsp;"));
	btnPanel.add(cloneBtn);
	btnPanel.add(new HTML("&nbsp;&nbsp;"));
	btnPanel.add(stopBtn);
	btnPanel.add(new HTML("&nbsp;&nbsp;"));
	btnPanel.add(refreshBtn);


	btnPanel2.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	btnPanel2.add(btnPanel);
	btnPanel2.addStyleName("btnPanel");

	splitLayout.addWest(stack, 200);

	jobDescGrid = new MonitorJobDescGrid();

	distackright1.setContent(jobDescGrid);
	distackright2.setContent(propPanel);
	verticalPanel.add(distackright1);
	verticalPanel.add(distackright2);
	scvp.add(verticalPanel);
	stackright.add(scvp, "", 0);
	splitLayout.addEast(stackright, 287);

	// Use different controllers in different classes
	setController(new MonitorController(Constants.CONTROLLER_WIDTH,
			Constants.CONTROLLER_HEIGHT));
	rebuiltLayoutPanel(getController());
	splitLayout.add(layoutPanel);

	return splitLayout;
}
 
Example 30
Source Project: appinventor-extensions   Source File: TopToolbar.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void execute() {
  final DialogBox db = new DialogBox(false, true);
  db.setText("About MIT App Inventor");
  db.setStyleName("ode-DialogBox");
  db.setHeight("200px");
  db.setWidth("400px");
  db.setGlassEnabled(true);
  db.setAnimationEnabled(true);
  db.center();

  VerticalPanel DialogBoxContents = new VerticalPanel();
  String html = MESSAGES.gitBuildId(GitBuildId.getDate(), GitBuildId.getVersion()) +
      "<BR/>" + MESSAGES.useCompanion(YaVersion.PREFERRED_COMPANION, YaVersion.PREFERRED_COMPANION + "u") +
      "<BR/>" + MESSAGES.targetSdkVersion(YaVersion.TARGET_SDK_VERSION, YaVersion.TARGET_ANDROID_VERSION);
  Config config = Ode.getInstance().getSystemConfig();
  String releaseNotesUrl = config.getReleaseNotesUrl();
  if (!Strings.isNullOrEmpty(releaseNotesUrl)) {
    html += "<BR/><BR/>Please see <a href=\"" + releaseNotesUrl +
        "\" target=\"_blank\">release notes</a>";
  }
  String tosUrl = config.getTosUrl();
  if (!Strings.isNullOrEmpty(tosUrl)) {
    html += "<BR/><BR/><a href=\"" + tosUrl +
        "\" target=\"_blank\">" + MESSAGES.privacyTermsLink() + "</a>";
  }
  HTML message = new HTML(html);

  SimplePanel holder = new SimplePanel();
  Button ok = new Button("Close");
  ok.addClickListener(new ClickListener() {
    public void onClick(Widget sender) {
      db.hide();
    }
  });
  holder.add(ok);
  DialogBoxContents.add(message);
  DialogBoxContents.add(holder);
  db.setWidget(DialogBoxContents);
  db.show();
}