0

谷歌提供了setWidgetHidden(Widget)方法,SplitLayoutPanel但我没有看到任何方法来检查小部件是否setWidgetHidden == true进入SplitLayoutPanel.

说我设置myWestWidget hidden == true如下:mySplitLayoutPanel.setWidgetHidden(myWestWidget, true);

然后我尝试了这段代码if (mySplitLayoutPanel.getWidgetSize(myWestWidget)==0) then //do something,但它无法识别西部小部件是否被隐藏。

那么,如何检查小部件是否setWidgetHidden == true进入SplitLayoutPanel

4

1 回答 1

0

您将需要SplitLayoutPanel像这样子类化:

SplitLayoutPanel slp = new SplitLayoutPanel() {
    public boolean isHidden(int i) {
        return ((DockLayoutPanel.LayoutData)getWidget(i).getLayoutData()).hidden;
    }
};
于 2013-10-18T14:02:49.207 回答