0

我有一个使用 GWT 开发的工作 Web 应用程序。现在它必须在平板电脑或更小的屏幕上调整大小,我想到了使用 GWT Bootstrap。但是现有的应用程序在war文件夹下只有一个project.html和project.css文件。目前没有使用 UI 绑定器。有四个屏幕显示由 d3js 创建的不同图表。

我的问题是否仍然可以使用 gwt bootstrap 来调整大小?或者仅 Bootstrap 并使用没有任何 UI 活页夹的 css 文件呢?

哪种方法更好?我很困惑,花了几个小时搜索和阅读。

4

1 回答 1

0

如果您打算在您的GWT应用程序中与引导组件(即NavBar,Caoursel等)进行交互,那么我会选择使用,gwt-bootstrap因为您不必使用JSNI并且可以获得一些类型安全性。

如果您不需要与这些组件交互,或者您HTML在 GWT 应用程序中主要使用 pure,您也可以使用 plainbootstrap并添加相应的类。

编辑代码示例:

绑定器:

<b:NavPills>
  <b:AnchorListItem active="true">Item 1</b:AnchorListItem>
  <b:AnchorListItem>Item 2</b:AnchorListItem>
  <b:AnchorListItem>Item 3</b:AnchorListItem>
  <b:AnchorListItem enabled="false">Item 4</b:AnchorListItem>
  <b:AnchorListItem pull="RIGHT">Pulled right</b:AnchorListItem>
</b:NavPills>

代码:

NavPills pills = new NavPills();
AnchorListItem item1 = new AnchorListItem("Item 1");
item1.setActive(true);
pills.add(item1);
pills.add(new AnchorListItem("Item 2");
pills.add(new AnchorListItem("Item 3");
...
于 2014-08-16T08:03:30.587 回答