# HG changeset patch # User Felix Wolfsteller # Date 1315392056 0 # Node ID 65204f30877b371287b0a299a4549a0fa04379be # Parent f5855350fc03a683e69b59b2f58572d8d9d58700 Display Action Widget only for cross_section theme/facet. flys-client/trunk@2663 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r f5855350fc03 -r 65204f30877b flys-client/ChangeLog --- a/flys-client/ChangeLog Tue Sep 06 17:35:43 2011 +0000 +++ b/flys-client/ChangeLog Wed Sep 07 10:40:56 2011 +0000 @@ -1,3 +1,11 @@ +2011-09-07 Felix Wolfsteller + + Display Action Widget only for cross_section theme/facet. + + * src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java: + Put action widget only for cross_section theme, resolving a TODO. + Adjust layout slightly. + 2011-09-06 Ingo Weinzierl * src/main/java/de/intevation/flys/client/client/ui/map/DrawControl.java: diff -r f5855350fc03 -r 65204f30877b flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java Tue Sep 06 17:35:43 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java Wed Sep 07 10:40:56 2011 +0000 @@ -55,21 +55,24 @@ ListGrid list = new ListGrid() { @Override protected Canvas createRecordComponent(final ListGridRecord record, Integer colNum) { + // Only cross_section Facets display an action widget. + final FacetRecord facetRecord = (FacetRecord) record; + if (!facetRecord.getTheme().getFacet().equals( + "cross_section")) { + return null; + } String fieldName = this.getFieldName(colNum); if (fieldName.equals("actions")) { - GWT.log("Gui: Put Actions"); HLayout recordCanvas = new HLayout(3); recordCanvas.setHeight(22); recordCanvas.setAlign(Alignment.CENTER); - // TODO decide on per case basis if to put an action - // widget or not. // TODO Refactor in createSpinner(data, artifact) SpinnerItem spinnerItem = new SpinnerItem(); spinnerItem.setShowTitle(false); spinnerItem.setTitle("Waterlevel-Spinner"); - spinnerItem.setWidth(50); + spinnerItem.setWidth(45); // TODO actually get the value from artifact // TODO actually get the range from artifact (or river?) spinnerItem.setDefaultValue(0); @@ -84,7 +87,6 @@ spinnerItem.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent ce) { - FacetRecord facetRecord = (FacetRecord) record; DefaultDataItem kmItem = new DefaultDataItem("cross_section.km", "cross_section.km", ce.getValue().toString()); DefaultData km = new DefaultData("cross_section.km", @@ -155,7 +157,7 @@ name.setType(ListGridFieldType.TEXT); ListGridField actions = new ListGridField(GRID_FIELD_ACTIONS, - GRID_FIELD_ACTIONS, 60); + GRID_FIELD_ACTIONS, 50); list.setFields(active, name, actions); }