java - GWT: Dynamically convert HorizontalPanel to VerticalPAnel -


how can programatically convert horizontalpanel verticalpanel? possible?

from:

<g:horizontalpanel ui:field="panel">  </g:horizontalpanel> 

to:

<g:verticalpanel ui:field="panel">  </g:verticalpanel> 

would snippet below work? (dont have gwt environment setup test it):

public someclass extends composite {  @uifield cellpanel panel;      public someclass() {             panel = new verticalpanel;     } } 

or better why dont use in ui.xml

<g:cellpanel ui:field="panel">  </g:cellpanel > 

and want in java code (since horizontalpanel , verticalpanel subclasses of cellpanel)?


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -