Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java @ 224:a4a68b4ee2a3
Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
flys-client/trunk@1669 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 12 Apr 2011 10:54:59 +0000 |
parents | e02f50a3ad59 |
children | 924da6695800 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java Tue Apr 12 10:51:39 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java Tue Apr 12 10:54:59 2011 +0000 @@ -91,10 +91,37 @@ oldItems = new VLayout(); currentItems = new VLayout(); + addParameterChangeHandler(this); + init(); } + public ParameterList( + FLYS flys, + CollectionView cView, + String title, + Artifact artifact) + { + super(title); + + this.cView = cView; + this.flys = flys; + this.artifact = artifact; + + parameterHandlers = new ArrayList<ParameterChangeHandler>(); + old = new ArrayList<DataList>(); + oldItems = new VLayout(); + currentItems = new VLayout(); + + init(); + + addParameterChangeHandler(this); + + setArtifact(artifact); + } + + protected void init() { HLayout rootLayout = new HLayout(); rootLayout.setMembersMargin(20); @@ -120,9 +147,11 @@ rootLayout.addMember(left); rootLayout.addMember(helperPanel); - Canvas moduleSelection = renderNew(); - moduleSelection.setLayoutAlign(VerticalAlignment.TOP); - currentItems.addMember(moduleSelection); + if (artifact == null) { + Canvas moduleSelection = renderNew(); + moduleSelection.setLayoutAlign(VerticalAlignment.TOP); + currentItems.addMember(moduleSelection); + } setPane(rootLayout); }