java - GWT StackPanel limitation? -
is there component stackpanel or decoratedstackpanel has ability of showing more 1 panel in stack @ time? id have option of expanding or collapsing number of panels want.
ok, since got no answer, has worked me. google doesn't make real easy extend existing panels add or modify functionality, did downloaded source, copied stackpanel.java
, decoratorpanel.java
, decoratedstackpanel.java
package in gwt project.
the main change needed change behavior of showstack(int index)
in stackpanel.java
class
public void showstack(int index) { if ((index >= getwidgetcount()) || (index < 0) || (index == visiblestack)) { return; } if (visiblestack >= 0) { setstackvisible(visiblestack, false); } visiblestack = index; setstackvisible(visiblestack, true); }
to this:
public void showstack(int index) { if ((index >= getwidgetcount()) || index < 0) { return; } visiblestack = index; setstackvisible(visiblestack, !getwidget(visiblestack).isvisible()); }
i'm sure it's possible clean bit, did trick. reason other classes need copied on same package because stackpanel.java
references of methods have package visibility.
Comments
Post a Comment