@Override
public Widget asWidget() {
if (widget == null) {
final BorderLayoutContainer rootContainer = new BorderLayoutContainer();
BorderLayoutData westLayout = new BorderLayoutData();
westLayout.setMargins(new Margins(3));
westLayout.setSplit(true);
westLayout.setSize(200);
westLayout.setCollapsible(true);
westLayout.setCollapseMini(true);
final ContentPanel fileManagerPanel = new ContentPanel();
fileManagerPanel.setHeaderVisible(false);
fileManagerPanel.setCollapsible(true);
fileManagerPanel.setHeadingText("文件管理");
// TODO 动画效果
fileManagerPanel.setAnimCollapse(true);
fileManagerPanel.setAnimationDuration(1000);
final BorderLayoutContainer centerContainer = new BorderLayoutContainer();
SimpleContainer wordContainer = new SimpleContainer();
final ContentPanel tabContainer = new ContentPanel() {
// @Override
// protected void onAfterFirstAttach() {
// super.onAfterFirstAttach();
// centerContainer.hide(LayoutRegion.EAST);
// }
};
tabContainer.setHeaderVisible(false);
BorderLayoutData tabLayout = new BorderLayoutData();
tabLayout.setSplit(true);
tabLayout.setSize(300);
tabLayout.setCollapsible(true);
tabLayout.setCollapseMini(true);
tabLayout.setMinSize(100);
tabLayout.setMargins(new Margins(3, 3, 3, 5));
centerContainer.setEastWidget(tabContainer, tabLayout);
centerContainer.setCenterWidget(wordContainer, new MarginData(3));
rootContainer.setWestWidget(fileManagerPanel, westLayout);
rootContainer.setCenterWidget(centerContainer, new MarginData(3));
presenter.getFileManagerPresenter().go(fileManagerPanel);