RootLayoutPanel.get()にある大きなSimpleLayoutPanelが1つあり、これが制約です。GWTで固定位置パネルを使用する方法は?
私はいくつかの余分なパネルを配置したいと思うし、それは位置を持ってほしい:ブラウザの画面内で固定。出来ますか?
このスタイルはsetStyleName()/ CSSでもDOM.setStyleAttribute()でも設定することはできません。どちらの場合も、私のスタイルは、私は両方のルートパネルを使用し、同時に
public void onModuleLoad() {
SimpleLayoutPanel simpleLayoutPanel = new SimpleLayoutPanel();
simpleLayoutPanel.setStyleName("SimpleLayoutPanel");
DOM.setStyleAttribute(simpleLayoutPanel.getElement(), "backgroundColor", "blue");
RootLayoutPanel rootLayoutPanel = RootLayoutPanel.get();
rootLayoutPanel.add(simpleLayoutPanel);
LayoutPanel layoutPanel = new LayoutPanel();
layoutPanel.setStyleName("LayoutPanel");
DOM.setStyleAttribute(layoutPanel.getElement(), "position", "fixed");
DOM.setStyleAttribute(layoutPanel.getElement(), "bottom", "0px");
DOM.setStyleAttribute(layoutPanel.getElement(), "height", "100px");
DOM.setStyleAttribute(layoutPanel.getElement(), "width", "100px");
DOM.setStyleAttribute(layoutPanel.getElement(), "backgroundColor", "red");
RootPanel rootPanel = RootPanel.get();
rootPanel.add(layoutPanel);
}