GWT docklayoutpanel widget visibility

310 views Asked by At

How to know that a widget is hidden once you have call the

dock.setWidgetHidden(widget, true);

as it seems we do not have access to Layoutdata I do not know how to do this.

2

There are 2 answers

2
Olivier Tonglet On

Using inheritance, you can extend DockLayoutPanel class and write an accessor to LayoutData, or just write a boolean method which tells if widget x is hidden or not.

2
dongxu On

I think you can find something like this:

String visibility = myDockLayoutPanel.getWidgetContainerElement(childPanel).getStyle().getVisibility()

The visibility might be "visible | hidden | collapse | inherit"