如何检查一个小部件是否在SplitLayoutPanel中得到setWidget Hidden == true?

时间:2013-10-18 13:47:56

标签: gwt gwtp

Google为setWidgetHidden(Widget)提供了SplitLayoutPanel方法,但我没有看到任何方法来检查小部件setWidgetHidden == true中是否有SplitLayoutPanel

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

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

那么,如何在setWidgetHidden == true中检查小部件是否得到SplitLayoutPanel

1 个答案:

答案 0 :(得分:0)

您需要像这样继承SplitLayoutPanel

SplitLayoutPanel slp = new SplitLayoutPanel() {
    public boolean isHidden(int i) {
        return ((DockLayoutPanel.LayoutData)getWidget(i).getLayoutData()).hidden;
    }
};