# HG changeset patch # User Ingo Weinzierl # Date 1350906349 -7200 # Node ID 1f212836998e7b70c8c8ba10e944bf295f4cd61d # Parent 02a2d4b5bd1430248e049995326ace7eae5ce77c flys/issue901: Changing the W/Q mode in WQSimpleArrayPanel (used in historical discharge calculation) will now switch the W/QD table in the helper panel, too. diff -r 02a2d4b5bd14 -r 1f212836998e flys-client/src/main/java/de/intevation/flys/client/client/ui/WQSimpleArrayPanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQSimpleArrayPanel.java Mon Oct 22 13:32:38 2012 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQSimpleArrayPanel.java Mon Oct 22 13:45:49 2012 +0200 @@ -71,6 +71,8 @@ protected Canvas valuesWrapper; + protected TabSet tabs; + protected DynamicForm modeForm; protected DoubleArrayPanel panelW; protected DoubleArrayPanel panelQ; @@ -200,7 +202,7 @@ protected void initializeHelperPanel() { - TabSet tabs = new TabSet(); + tabs = new TabSet(); tabs.setWidth100(); tabs.setHeight100(); @@ -398,9 +400,23 @@ if (newMode.equals("0")) { valuesWrapper.addChild(panelW); + showWTable(); } else if (newMode.equals("1")) { valuesWrapper.addChild(panelQ); + showQDTable(); + } + } + + public void showWTable() { + if (tabs != null) { + tabs.selectTab(0); + } + } + + public void showQDTable() { + if (tabs != null) { + tabs.selectTab(1); } }