[Dive4elements-commits] [PATCH] flys-client: Cosmetics and warnings
Wald Commits
scm-commit at wald.intevation.org
Mon Nov 19 00:08:00 CET 2012
# HG changeset patch
# User Christian Lins <christian.lins at intevation.de>
# Date 1353280073 -3600
# Node ID bbd82bd8e5417952e6f162e4c3a11c830509b69f
# Parent 5e6e89f19a37a033b89d3ff60d814c1e7719a980
flys-client: Cosmetics and warnings.
diff -r 5e6e89f19a37 -r bbd82bd8e541 flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugeDischargeCurvePanel.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugeDischargeCurvePanel.java Sun Nov 18 01:19:07 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugeDischargeCurvePanel.java Mon Nov 19 00:07:53 2012 +0100
@@ -8,10 +8,10 @@
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
+import de.intevation.flys.client.client.FLYSConstants;
import de.intevation.flys.client.shared.model.Data;
import de.intevation.flys.client.shared.model.DataItem;
import de.intevation.flys.client.shared.model.DataList;
-import de.intevation.flys.client.client.FLYSConstants;
/**
@@ -22,6 +22,8 @@
public class GaugeDischargeCurvePanel
extends AbstractUIProvider
{
+ private static final long serialVersionUID = 7411866539525588336L;
+
/** The message class that provides i18n strings.*/
protected FLYSConstants messages = GWT.create(FLYSConstants.class);
diff -r 5e6e89f19a37 -r bbd82bd8e541 flys-client/src/main/java/de/intevation/flys/client/client/ui/MeasurementStationTree.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/MeasurementStationTree.java Sun Nov 18 01:19:07 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/MeasurementStationTree.java Mon Nov 19 00:07:53 2012 +0100
@@ -1,8 +1,7 @@
package de.intevation.flys.client.client.ui;
-import java.util.Date;
-
import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.DecoratorPanel;
@@ -18,6 +17,7 @@
import de.intevation.flys.client.shared.model.RiverInfo;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
/**
@@ -190,7 +190,8 @@
grid.setText(2, 1, gaugename);
}
- DateTimeFormat df = DateTimeFormat.getMediumDateFormat();
+ DateTimeFormat df = DateTimeFormat.getFormat(
+ PredefinedFormat.DATE_MEDIUM);
Date starttime = station.getStartTime();
if (starttime != null) {
diff -r 5e6e89f19a37 -r bbd82bd8e541 flys-client/src/main/java/de/intevation/flys/client/client/ui/WQAdaptedInputPanel.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQAdaptedInputPanel.java Sun Nov 18 01:19:07 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQAdaptedInputPanel.java Mon Nov 19 00:07:53 2012 +0100
@@ -1,12 +1,5 @@
package de.intevation.flys.client.client.ui;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
import com.google.gwt.core.client.GWT;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -18,15 +11,22 @@
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.RadioGroupItem;
+import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
import com.smartgwt.client.widgets.form.fields.events.BlurHandler;
-import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
+import com.smartgwt.client.widgets.form.fields.events.ChangeEvent;
import com.smartgwt.client.widgets.form.fields.events.ChangeHandler;
-import com.smartgwt.client.widgets.form.fields.events.ChangeEvent;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
+import com.smartgwt.client.widgets.tab.Tab;
import com.smartgwt.client.widgets.tab.TabSet;
-import com.smartgwt.client.widgets.tab.Tab;
+import de.intevation.flys.client.client.Config;
+import de.intevation.flys.client.client.FLYSConstants;
+import de.intevation.flys.client.client.services.WQInfoService;
+import de.intevation.flys.client.client.services.WQInfoServiceAsync;
+import de.intevation.flys.client.client.ui.wq.QDTable;
+import de.intevation.flys.client.client.ui.wq.WTable;
+import de.intevation.flys.client.shared.model.ArtifactDescription;
import de.intevation.flys.client.shared.model.Data;
import de.intevation.flys.client.shared.model.DataItem;
import de.intevation.flys.client.shared.model.DataList;
@@ -35,15 +35,13 @@
import de.intevation.flys.client.shared.model.WQDataItem;
import de.intevation.flys.client.shared.model.WQInfoObject;
import de.intevation.flys.client.shared.model.WQInfoRecord;
-import de.intevation.flys.client.shared.model.ArtifactDescription;
-
-import de.intevation.flys.client.client.FLYSConstants;
-import de.intevation.flys.client.client.Config;
-import de.intevation.flys.client.client.services.WQInfoService;
-import de.intevation.flys.client.client.services.WQInfoServiceAsync;
-import de.intevation.flys.client.client.ui.wq.WTable;
-import de.intevation.flys.client.client.ui.wq.QDTable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
/**
@@ -56,6 +54,8 @@
extends AbstractUIProvider
implements ChangeHandler, BlurHandler
{
+ private static final long serialVersionUID = -3218827566805476423L;
+
public static final String FIELD_WQ_MODE = "wq_isq";
public static final String FIELD_WQ_W = "W";
public static final String FIELD_WQ_Q = "Q";
@@ -111,6 +111,7 @@
}
+ @Override
public Canvas create(DataList data) {
initHelperPanel();
@@ -155,6 +156,7 @@
}
+ @Override
public Canvas createOld(DataList dataList) {
List<Data> all = dataList.getAll();
Data wqData = getData(all, "wq_values");
@@ -519,6 +521,7 @@
modes.setFields(wq);
modes.setWidth(200);
wq.addChangeHandler(new ChangeHandler() {
+ @Override
public void onChange(ChangeEvent e) {
DynamicForm form = e.getForm();
@@ -547,6 +550,7 @@
}
+ @Override
public Data[] getData() {
Data mode = getWQMode();
Data values = getWQValues();
@@ -621,11 +625,13 @@
}
+ @Override
public void onChange(ChangeEvent event) {
// TODO IMPLEMENT ME
}
+ @Override
public void onBlur(BlurEvent event) {
DoubleArrayPanel dap = (DoubleArrayPanel) event.getForm();
dap.validateForm(event.getItem());
@@ -644,11 +650,13 @@
wqInfoService.getWQInfo(locale, river, mm[0], mm[0],
new AsyncCallback<WQInfoObject[]>() {
+ @Override
public void onFailure(Throwable caught) {
GWT.log("Could not recieve wq informations.");
SC.warn(caught.getMessage());
}
+ @Override
public void onSuccess(WQInfoObject[] wqi) {
int num = wqi != null ? wqi.length :0;
GWT.log("Recieved " + num + " wq informations.");
diff -r 5e6e89f19a37 -r bbd82bd8e541 flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java Sun Nov 18 01:19:07 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java Mon Nov 19 00:07:53 2012 +0100
@@ -1,32 +1,34 @@
package de.intevation.flys.client.client.ui;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-
import com.google.gwt.core.client.GWT;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.Record;
-
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.FormItem;
import com.smartgwt.client.widgets.form.fields.RadioGroupItem;
+import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
import com.smartgwt.client.widgets.form.fields.events.BlurHandler;
-import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
+import com.smartgwt.client.widgets.form.fields.events.ChangeEvent;
import com.smartgwt.client.widgets.form.fields.events.ChangeHandler;
-import com.smartgwt.client.widgets.form.fields.events.ChangeEvent;
+import com.smartgwt.client.widgets.grid.events.CellClickEvent;
+import com.smartgwt.client.widgets.grid.events.CellClickHandler;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.grid.events.CellClickHandler;
-import com.smartgwt.client.widgets.grid.events.CellClickEvent;
+import com.smartgwt.client.widgets.tab.Tab;
import com.smartgwt.client.widgets.tab.TabSet;
-import com.smartgwt.client.widgets.tab.Tab;
+import de.intevation.flys.client.client.Config;
+import de.intevation.flys.client.client.FLYSConstants;
+import de.intevation.flys.client.client.services.WQInfoService;
+import de.intevation.flys.client.client.services.WQInfoServiceAsync;
+import de.intevation.flys.client.client.ui.wq.QDTable;
+import de.intevation.flys.client.client.ui.wq.WTable;
+import de.intevation.flys.client.shared.model.ArtifactDescription;
import de.intevation.flys.client.shared.model.Data;
import de.intevation.flys.client.shared.model.DataItem;
import de.intevation.flys.client.shared.model.DataList;
@@ -34,14 +36,10 @@
import de.intevation.flys.client.shared.model.DefaultDataItem;
import de.intevation.flys.client.shared.model.WQInfoObject;
import de.intevation.flys.client.shared.model.WQInfoRecord;
-import de.intevation.flys.client.shared.model.ArtifactDescription;
-import de.intevation.flys.client.client.FLYSConstants;
-import de.intevation.flys.client.client.Config;
-import de.intevation.flys.client.client.services.WQInfoService;
-import de.intevation.flys.client.client.services.WQInfoServiceAsync;
-import de.intevation.flys.client.client.ui.wq.WTable;
-import de.intevation.flys.client.client.ui.wq.QDTable;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
/**
@@ -53,6 +51,8 @@
extends AbstractUIProvider
implements ChangeHandler, BlurHandler
{
+ private static final long serialVersionUID = 4797387993390350341L;
+
/** The message class that provides i18n strings.*/
protected FLYSConstants MESSAGE = GWT.create(FLYSConstants.class);
@@ -212,6 +212,7 @@
*/
protected void initTableListeners() {
CellClickHandler handler = new CellClickHandler() {
+ @Override
public void onCellClick(CellClickEvent e) {
if (isWMode() || qdTable.isLocked()) {
return;
@@ -251,6 +252,7 @@
*
* @return the widget.
*/
+ @Override
public Canvas create(DataList data) {
initDefaults(data);
@@ -295,6 +297,7 @@
}
+ @Override
public Canvas createOld(DataList dataList) {
List<Data> items = dataList.getAll();
@@ -414,19 +417,15 @@
this.fromW = minW;
this.toW = maxW;
- this.stepW = stepW;
this.fromQ = minQ;
this.toQ = maxQ;
- this.stepQ = stepQ;
this.fromQFree = minQFree;
this.toQFree = maxQFree;
- this.stepQFree = stepQFree;
this.fromWFree = minWFree;
this.toWFree = maxWFree;
- this.stepWFree = stepWFree;
}
@@ -863,6 +862,7 @@
*
* @return the selected/inserted data.
*/
+ @Override
public Data[] getData() {
// XXX If we have entered a value and click right afterwards on the
// 'next' button, the BlurEvent is not fired, and the values are not
@@ -1266,6 +1266,7 @@
*
* @param event The ChangeEvent.
*/
+ @Override
public void onChange(ChangeEvent event) {
DynamicForm form = event.getForm();
FormItem item = event.getItem();
@@ -1419,6 +1420,7 @@
*
* @param event The BlurEvent.
*/
+ @Override
public void onBlur(BlurEvent event) {
DynamicForm form = event.getForm();
FormItem item = event.getItem();
@@ -1797,11 +1799,13 @@
wqInfoService.getWQInfo(locale, river, mm[0], mm[1],
new AsyncCallback<WQInfoObject[]>() {
+ @Override
public void onFailure(Throwable caught) {
GWT.log("Could not recieve wq informations.");
SC.warn(caught.getMessage());
}
+ @Override
public void onSuccess(WQInfoObject[] wqi) {
int num = wqi != null ? wqi.length :0;
GWT.log("Recieved " + num + " wq informations.");
diff -r 5e6e89f19a37 -r bbd82bd8e541 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 Sun Nov 18 01:19:07 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQSimpleArrayPanel.java Mon Nov 19 00:07:53 2012 +0100
@@ -1,12 +1,9 @@
package de.intevation.flys.client.client.ui;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-
import com.google.gwt.core.client.GWT;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.user.client.rpc.AsyncCallback;
+
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.form.DynamicForm;
@@ -42,6 +39,10 @@
import de.intevation.flys.client.shared.model.WQInfoObject;
import de.intevation.flys.client.shared.model.WQInfoRecord;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+
/**
* An UIProvider for inserting a mode for W or Q and an array of values for each
@@ -53,6 +54,8 @@
extends AbstractUIProvider
implements BlurHandler
{
+ private static final long serialVersionUID = 3223369196267895010L;
+
public static final String FIELD_MODE = "field_mode";
public static final String FIELD_VALUES = "field_values";
@@ -103,7 +106,6 @@
DoubleArrayData valuesData = findValuesData(dataList);
DataItem[] modeItems = modeData.getItems();
- DataItem[] valuesItems = valuesData.getItems();
HLayout layout = new HLayout();
VLayout valueContainer = new VLayout();
@@ -224,16 +226,17 @@
protected void fetchWQData() {
ArtifactDescription desc = artifact.getArtifactDescription();
- DataList[] data = desc.getOldData();
final String river = desc.getRiver();
final String refGauge = desc.getReferenceGauge();
gaugeService.getGaugeInfo(river, refGauge, new AsyncCallback<List<Gauge>>() {
+ @Override
public void onFailure(Throwable throwable) {
GWT.log("ERROR WHILE FETCHING GAUGES!");
}
+ @Override
public void onSuccess(List<Gauge> gauges) {
Gauge g = gauges.get(0);
updateWQData(river, g.getLower(), g.getUpper());
@@ -250,10 +253,12 @@
wqInfoService.getWQInfo(locale, river, lower, upper,
new AsyncCallback<WQInfoObject[]>() {
+ @Override
public void onFailure(Throwable caught) {
GWT.log("Could not recieve wq informations.");
}
+ @Override
public void onSuccess(WQInfoObject[] wqi) {
int num = wqi != null ? wqi.length :0;
GWT.log("Recieved " + num + " wq informations.");
@@ -314,8 +319,6 @@
protected DoubleArrayData findValuesData(DataList dataList) {
- DoubleArrayData data = null;
-
for (int i = 0, n = dataList.size(); i < n; i++) {
Data tmp = dataList.get(i);
@@ -329,8 +332,6 @@
protected IntegerOptionsData findOptionsData(DataList dataList) {
- IntegerOptionsData data = null;
-
for (int i = 0, n = dataList.size(); i < n; i++) {
Data tmp = dataList.get(i);
diff -r 5e6e89f19a37 -r bbd82bd8e541 flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java Sun Nov 18 01:19:07 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java Mon Nov 19 00:07:53 2012 +0100
@@ -1,55 +1,51 @@
package de.intevation.flys.client.client.ui.chart;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+import com.smartgwt.client.types.Alignment;
+import com.smartgwt.client.util.SC;
+import com.smartgwt.client.widgets.Button;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.Label;
+import com.smartgwt.client.widgets.Window;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.fields.CheckboxItem;
+import com.smartgwt.client.widgets.form.fields.FormItem;
+import com.smartgwt.client.widgets.form.fields.SelectItem;
+import com.smartgwt.client.widgets.form.fields.TextItem;
+import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
+import com.smartgwt.client.widgets.form.fields.events.BlurHandler;
+import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
+import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
+import com.smartgwt.client.widgets.layout.HLayout;
+import com.smartgwt.client.widgets.layout.VLayout;
+import com.smartgwt.client.widgets.tab.Tab;
+import com.smartgwt.client.widgets.tab.TabSet;
+
+import de.intevation.flys.client.client.Config;
+import de.intevation.flys.client.client.FLYSConstants;
+import de.intevation.flys.client.client.services.CollectionAttributeService;
+import de.intevation.flys.client.client.services.CollectionAttributeServiceAsync;
+import de.intevation.flys.client.client.utils.DoubleValidator;
+import de.intevation.flys.client.client.utils.IntegerValidator;
+import de.intevation.flys.client.shared.model.BooleanProperty;
+import de.intevation.flys.client.shared.model.Collection;
+import de.intevation.flys.client.shared.model.DoubleProperty;
+import de.intevation.flys.client.shared.model.IntegerProperty;
+import de.intevation.flys.client.shared.model.OutputSettings;
+import de.intevation.flys.client.shared.model.Property;
+import de.intevation.flys.client.shared.model.PropertyGroup;
+import de.intevation.flys.client.shared.model.PropertySetting;
+import de.intevation.flys.client.shared.model.Settings;
+import de.intevation.flys.client.shared.model.StringProperty;
+
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-import com.smartgwt.client.util.SC;
-import com.smartgwt.client.widgets.Window;
-import com.smartgwt.client.widgets.tab.TabSet;
-import com.smartgwt.client.widgets.tab.Tab;
-import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.layout.HLayout;
-import com.smartgwt.client.widgets.Button;
-import com.smartgwt.client.widgets.Label;
-import com.smartgwt.client.widgets.Canvas;
-
-import com.smartgwt.client.widgets.form.DynamicForm;
-import com.smartgwt.client.widgets.form.fields.FormItem;
-import com.smartgwt.client.widgets.form.fields.CheckboxItem;
-import com.smartgwt.client.widgets.form.fields.SelectItem;
-import com.smartgwt.client.widgets.form.fields.TextItem;
-
-import com.smartgwt.client.widgets.events.ClickEvent;
-import com.smartgwt.client.widgets.events.ClickHandler;
-import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
-import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
-import com.smartgwt.client.widgets.form.fields.events.BlurHandler;
-import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
-
-import com.smartgwt.client.types.Alignment;
-
-import de.intevation.flys.client.client.Config;
-import de.intevation.flys.client.client.FLYSConstants;
-import de.intevation.flys.client.shared.model.Property;
-import de.intevation.flys.client.shared.model.PropertyGroup;
-import de.intevation.flys.client.shared.model.PropertySetting;
-import de.intevation.flys.client.shared.model.BooleanProperty;
-import de.intevation.flys.client.shared.model.DoubleProperty;
-import de.intevation.flys.client.shared.model.IntegerProperty;
-import de.intevation.flys.client.shared.model.StringProperty;
-import de.intevation.flys.client.shared.model.Settings;
-import de.intevation.flys.client.shared.model.OutputSettings;
-import de.intevation.flys.client.shared.model.Collection;
-import de.intevation.flys.client.client.utils.IntegerValidator;
-import de.intevation.flys.client.client.utils.DoubleValidator;
-
-import de.intevation.flys.client.client.services.CollectionAttributeService;
-import de.intevation.flys.client.client.services.CollectionAttributeServiceAsync;
-
/**
* Dialog for the Chart-Properties, constructed from respective xml document.
*
@@ -102,7 +98,6 @@
setCanDragReposition(true);
setCanDragResize(true);
- Config config = Config.getInstance();
collection = tab.getCollectionView().getCollection();
String outputName = tab.getOutputName();
origSettings = (OutputSettings)collection.getSettings(outputName);
@@ -140,6 +135,7 @@
Button cancel = new Button(MSG.label_cancel());
cancel.addClickHandler(this);
accept.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(ClickEvent e) {
if(isDialogValid()) {
updateCollection();
@@ -169,6 +165,7 @@
* This method is called when the user aborts theming.
* @param event The event.
*/
+ @Override
public void onClick(ClickEvent event) {
this.destroy();
}
@@ -178,8 +175,6 @@
*
*/
protected Canvas generatePropertyGroup(Property group, Property orig) {
- Config config = Config.getInstance();
- String locale = config.getLocale();
PropertyGroup pg = (PropertyGroup)group;
PropertyGroup origPg = (PropertyGroup)orig;
@@ -230,6 +225,7 @@
origPg.getPropertyByName("fixation")).getValue().booleanValue());
fix.addChangedHandler(new ChangedHandler() {
+ @Override
public void onChanged(ChangedEvent e) {
if ((Boolean)e.getValue()) {
range1.enable();
@@ -278,7 +274,6 @@
Property setting,
Property orig)
{
- PropertySetting s = (PropertySetting)setting;
DynamicForm form = new DynamicForm();
FormItem item = new FormItem();
if (setting instanceof BooleanProperty) {
@@ -344,6 +339,7 @@
logoChooser.setTitle(MSG.getString(name));
logoChooser.setTitleAlign(Alignment.LEFT);
logoChooser.addBlurHandler(new BlurHandler() {
+ @Override
public void onBlur(BlurEvent e) {
String val;
if (e.getItem().getValue() == null) {
@@ -369,6 +365,7 @@
placeChooser.setTitle(MSG.getString(name));
placeChooser.setTitleAlign(Alignment.LEFT);
placeChooser.addBlurHandler(new BlurHandler() {
+ @Override
public void onBlur(BlurEvent e) {
String val;
if (e.getItem().getValue() == null) {
@@ -394,6 +391,7 @@
placeChooser.setTitle(MSG.getString(name));
placeChooser.setTitleAlign(Alignment.LEFT);
placeChooser.addBlurHandler(new BlurHandler() {
+ @Override
public void onBlur(BlurEvent e) {
String val;
if (e.getItem().getValue() == null) {
@@ -412,6 +410,7 @@
item.setTitle(MSG.getString(name));
item.setTitleAlign(Alignment.LEFT);
item.addBlurHandler(new BlurHandler() {
+ @Override
public void onBlur(BlurEvent e) {
String val;
if (e.getItem().getValue() == null) {
@@ -441,6 +440,7 @@
item.setTitleStyle("color:#000;");
item.setTitleAlign(Alignment.LEFT);
item.addBlurHandler(new BlurHandler() {
+ @Override
public void onBlur(BlurEvent e) {
String val;
if (e.getItem().getValue() == null) {
@@ -469,6 +469,7 @@
item.setTitle(MSG.getString(name));
item.setTitleAlign(Alignment.LEFT);
item.addBlurHandler(new BlurHandler() {
+ @Override
public void onBlur(BlurEvent e) {
DoubleValidator validator = new DoubleValidator();
Map errors = e.getForm().getErrors();
@@ -495,6 +496,7 @@
item.setTitle(MSG.getString(name));
item.setTitleAlign(Alignment.LEFT);
item.addBlurHandler(new BlurHandler() {
+ @Override
public void onBlur(BlurEvent e) {
IntegerValidator validator = new IntegerValidator();
Map errors = e.getForm().getErrors();
@@ -517,10 +519,12 @@
Settings s = settings;
collection.addSettings(this.tab.getOutputName(), s);
updater.update(collection, loc, new AsyncCallback<Collection>() {
+ @Override
public void onFailure(Throwable caught) {
GWT.log("Could not update collection attributes.");
SC.warn(MSG.getString(caught.getMessage()));
}
+ @Override
public void onSuccess(Collection collection) {
updateChartTab();
}
diff -r 5e6e89f19a37 -r bbd82bd8e541 flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java Sun Nov 18 01:19:07 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java Mon Nov 19 00:07:53 2012 +0100
@@ -1,43 +1,35 @@
package de.intevation.flys.client.client.ui.chart;
import com.google.gwt.core.client.GWT;
-
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.ListGridFieldType;
-
+import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.menu.events.ClickHandler;
-
import com.smartgwt.client.widgets.menu.Menu;
import com.smartgwt.client.widgets.menu.MenuItem;
+import com.smartgwt.client.widgets.menu.events.ClickHandler;
import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent;
-import com.smartgwt.client.util.SC;
-
+import de.intevation.flys.client.client.Config;
+import de.intevation.flys.client.client.FLYSConstants;
+import de.intevation.flys.client.client.services.FeedServiceAsync;
+import de.intevation.flys.client.client.services.LoadArtifactService;
+import de.intevation.flys.client.client.services.LoadArtifactServiceAsync;
+import de.intevation.flys.client.client.ui.CollectionView;
+import de.intevation.flys.client.client.ui.ThemePanel;
import de.intevation.flys.client.shared.model.Artifact;
import de.intevation.flys.client.shared.model.Data;
+import de.intevation.flys.client.shared.model.DefaultArtifact;
import de.intevation.flys.client.shared.model.DefaultData;
-import de.intevation.flys.client.shared.model.DefaultArtifact;
import de.intevation.flys.client.shared.model.FacetRecord;
import de.intevation.flys.client.shared.model.OutputMode;
import de.intevation.flys.client.shared.model.Recommendation;
import de.intevation.flys.client.shared.model.Theme;
import de.intevation.flys.client.shared.model.ThemeList;
-import de.intevation.flys.client.client.Config;
-import de.intevation.flys.client.client.FLYSConstants;
-import de.intevation.flys.client.client.ui.CollectionView;
-import de.intevation.flys.client.client.ui.ThemePanel;
-
-import de.intevation.flys.client.client.services.FeedService;
-import de.intevation.flys.client.client.services.FeedServiceAsync;
-
-import de.intevation.flys.client.client.services.LoadArtifactService;
-import de.intevation.flys.client.client.services.LoadArtifactServiceAsync;
-
/**
* ThemePanel on the left in CollectionView.
@@ -208,12 +200,14 @@
new DefaultArtifact(artifact, "TODO:hash"),
feedData,
new AsyncCallback<Artifact>() {
+ @Override
public void onFailure(Throwable caught) {
GWT.log("Could not feed artifact (" + artifact
+ ") with area info: " + caught.getMessage());
SC.warn(MSG.getString(caught.getMessage()));
enable();
}
+ @Override
public void onSuccess(Artifact fartifact) {
GWT.log("Successfully set area params to " + artifact);
requestRedraw();
@@ -252,11 +246,14 @@
null, //use individual factories.
locale,
new AsyncCallback<Artifact[]>() {
+ @Override
public void onFailure(Throwable caught) {
GWT.log("Failed, no area artifact: " + caught.getMessage());
enable();
- // TODO SC.warn
+ // TODO i18n
+ SC.warn("Failed, no area artifact: " + caught.getMessage());
}
+ @Override
public void onSuccess(Artifact[] artifacts) {
GWT.log("Success, created area artifact: "
+ artifacts[0].getUuid());
@@ -307,6 +304,7 @@
MenuItem editManualPoints = new MenuItem(MSG.editpoints());
editManualPoints.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(MenuItemClickEvent evt) {
if(mode.getName().equals("historical_discharge")) {
new ManualDatePointsEditor(view.getCollection(),
@@ -328,11 +326,12 @@
* Include area specific menu items and manual point editor, depending
* on facet.
*/
+ @Override
protected Menu getSingleContextMenu(final ListGridRecord[] records) {
Menu menu = super.getSingleContextMenu(records);
final Theme facetTheme = ((FacetRecord)records[0]).getTheme();
- String thisItem = facetTheme.getDescription();
+
if (!canArea(facetTheme)) {
if (facetTheme.getFacet().endsWith("manualpoints")) {
attachManualPointsMenu(menu);
@@ -369,6 +368,7 @@
underMenu.addItem(againster);
againster.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(MenuItemClickEvent evt) {
disable();
createAreaArtifact(theme, facetTheme, false);
@@ -391,6 +391,7 @@
overMenu.addItem(againster);
againster.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(MenuItemClickEvent evt) {
disable();
createAreaArtifact(facetTheme, theme, false);
@@ -400,6 +401,7 @@
overMenu.addItem(createSeparator());
MenuItem againstAxis = new MenuItem(MSG.getString("x_axis"));
againstAxis.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(MenuItemClickEvent evt) {
disable();
createAreaArtifact(null, facetTheme, false);
@@ -422,6 +424,7 @@
betweenMenu.addItem(againster);
againster.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(MenuItemClickEvent evt) {
disable();
createAreaArtifact(facetTheme, theme, true);
@@ -441,6 +444,7 @@
areaMenu.addItem(createSeparator());
MenuItem standAloneAgainstAxis = new MenuItem(MSG.getString("against_x_axis"));
standAloneAgainstAxis.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(MenuItemClickEvent evt) {
disable();
createAreaArtifact(null, facetTheme, false);
diff -r 5e6e89f19a37 -r bbd82bd8e541 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 Sun Nov 18 01:19:07 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java Mon Nov 19 00:07:53 2012 +0100
@@ -2,6 +2,7 @@
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
+
import com.smartgwt.client.types.ListGridFieldType;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.Canvas;
@@ -125,12 +126,14 @@
artifactReference(artifact),
feedData,
new AsyncCallback<Artifact>() {
+ @Override
public void onFailure(Throwable caught) {
GWT.log("Could not feed artifact (" + artifact
+ ") with master marker: " + caught.getMessage());
SC.warn(MSG.getString(caught.getMessage()));
enable();
}
+ @Override
public void onSuccess(Artifact artifact) {
GWT.log("Successfully injected master mark to " + artifact);
setCurrentCSMaster(artifact.getUuid());
@@ -148,7 +151,7 @@
ThemeList themeList = getThemeList();
int count = getThemeList().getThemeCount();
String firstCSUuid = null;
- Theme firstCS = null;
+
for (int i = 1; i <= count; i++) {
Theme theme = themeList.getThemeAt(i);
String value = dataOf(theme, CS_IS_MASTER);
@@ -156,7 +159,6 @@
if (value != null) {
if (firstCSUuid == null) {
firstCSUuid = theme.getArtifact();
- firstCS = theme;
}
if (!value.equals("0")) {
setCurrentCSMaster(theme.getArtifact());
@@ -203,6 +205,7 @@
// Add Change Handler to first unset the old master and then set the
// new master.
masterCb.addChangeHandler(new ChangeHandler() {
+ @Override
public void onChange(ChangeEvent event) {
String selectedItem = (String) event.getValue();
final String artifact = selectedItem;
@@ -218,6 +221,7 @@
artifactReference(getCurrentCSMaster()),
feedData,
new AsyncCallback<Artifact>() {
+ @Override
public void onFailure(Throwable caught) {
GWT.log("Could not un-master artifact ("
+ getCurrentCSMaster() + "): " +
@@ -225,6 +229,7 @@
SC.warn(MSG.getString(caught.getMessage()));
enable();
}
+ @Override
public void onSuccess(Artifact oldMaster) {
GWT.log("Successfully un-mastered artifact.");
feedTellMaster(artifact);
@@ -396,6 +401,7 @@
* two values in \param in are in the same distance to
* \param to.
*/
+ @Override
public void spinnerValueEntered(KMSpinner spinner, final double enteredKm, final FacetRecord facetRecord, final boolean up) {
disable();
Config config = Config.getInstance();
@@ -610,6 +616,7 @@
if (synchronCrossSectionThemes.contains(themeHash)) {
synchronNavigationMenuItem.setTitle(MSG.chart_themepanel_asynchron());
synchronNavigationMenuItem.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(MenuItemClickEvent evt) {
synchronCrossSectionThemes.remove (themeHash);
}
@@ -618,6 +625,7 @@
else {
synchronNavigationMenuItem.setTitle(MSG.chart_themepanel_synchron());
synchronNavigationMenuItem.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(MenuItemClickEvent evt) {
synchronCrossSectionThemes.add (themeHash);
}
diff -r 5e6e89f19a37 -r bbd82bd8e541 flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualDatePointsEditor.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualDatePointsEditor.java Sun Nov 18 01:19:07 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualDatePointsEditor.java Mon Nov 19 00:07:53 2012 +0100
@@ -1,47 +1,42 @@
package de.intevation.flys.client.client.ui.chart;
-import java.util.List;
-import java.util.Date;
-
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONBoolean;
import com.google.gwt.json.client.JSONNumber;
import com.google.gwt.json.client.JSONParser;
import com.google.gwt.json.client.JSONString;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.i18n.client.DateTimeFormat;
+import com.smartgwt.client.types.Alignment;
+import com.smartgwt.client.types.ListGridFieldType;
import com.smartgwt.client.util.SC;
-import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.layout.HLayout;
+import com.smartgwt.client.widgets.Button;
import com.smartgwt.client.widgets.IButton;
-import com.smartgwt.client.widgets.Button;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.grid.CellEditValueFormatter;
+import com.smartgwt.client.widgets.grid.CellEditValueParser;
+import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import com.smartgwt.client.widgets.grid.events.RecordClickEvent;
import com.smartgwt.client.widgets.grid.events.RecordClickHandler;
-import com.smartgwt.client.types.ListGridFieldType;
-import com.smartgwt.client.widgets.grid.CellFormatter;
-import com.google.gwt.i18n.client.NumberFormat;
+import com.smartgwt.client.widgets.layout.HLayout;
+import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.grid.CellEditValueParser;
-import com.smartgwt.client.widgets.grid.CellEditValueFormatter;
-import com.smartgwt.client.widgets.events.ClickEvent;
-import com.smartgwt.client.widgets.events.ClickHandler;
-
-import com.smartgwt.client.types.Alignment;
-
-import de.intevation.flys.client.client.Config;
+import de.intevation.flys.client.client.event.RedrawRequestHandler;
import de.intevation.flys.client.shared.model.Collection;
import de.intevation.flys.client.shared.model.CollectionItem;
-
-import de.intevation.flys.client.shared.model.Settings;
import de.intevation.flys.client.shared.model.Property;
import de.intevation.flys.client.shared.model.PropertyGroup;
+import de.intevation.flys.client.shared.model.Settings;
import de.intevation.flys.client.shared.model.StringProperty;
-import de.intevation.flys.client.client.event.RedrawRequestHandler;
+import java.util.Date;
+import java.util.List;
/**
* UI to enter point data and save it to an PointArtifact.
@@ -58,14 +53,14 @@
/** Create and setup/add the ui. */
+ @Override
public void createUI() {
- Config config = Config.getInstance();
-
Button accept = new Button(MSG.label_ok());
Button cancel = new Button(MSG.label_cancel());
cancel.addClickHandler(this);
accept.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(ClickEvent e) {
okClicked();
}
@@ -86,6 +81,7 @@
listGrid.setShowHeaderContextMenu(false);
CellFormatter doubleFormat = new CellFormatter() {
+ @Override
public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
if(value != null) {
NumberFormat nf = NumberFormat.getDecimalFormat();
@@ -101,6 +97,7 @@
}};
CellFormatter dateFormat = new CellFormatter() {
+ @Override
public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
if(value != null && !value.toString().equals("")) {
try {
@@ -126,6 +123,7 @@
CellEditValueParser cevp = new CellEditValueParser() {
+ @Override
public Object parse(Object value, ListGridRecord record, int rowNum, int colNum) {
if (value == null)
return null;
@@ -141,6 +139,7 @@
};
CellEditValueFormatter cevf = new CellEditValueFormatter() {
+ @Override
public Object format(Object value, ListGridRecord record, int rowNum, int colNum) {
if (value != null) {
NumberFormat nf = NumberFormat.getDecimalFormat();
@@ -214,6 +213,7 @@
nameField, removeField});
listGrid.addRecordClickHandler(new RecordClickHandler() {
+ @Override
public void onRecordClick(final RecordClickEvent event) {
// Just handle remove-clicks
if(!event.getField().getName().equals(removeField.getName())) {
@@ -237,13 +237,13 @@
}
}
else {
- // TODO proper log
- System.out.println("No item found for " + uuid);
+ GWT.log("No item found for " + uuid);
}
IButton button = new IButton(MSG.newpoint());
button.setTop(250);
button.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(ClickEvent event) {
listGrid.startEditingNew();
}
@@ -262,6 +262,7 @@
/** Create JSON representation of the points present in the list grid. */
+ @Override
protected JSONArray jsonArrayFromListGrid() {
JSONArray list = new JSONArray();
int idx = 0;
@@ -276,7 +277,7 @@
DateTimeFormat.PredefinedFormat.DATE_MEDIUM);
Date d = df.parse(dateString);
- double dv = (double)d.getTime();
+ double dv = d.getTime();
data.set(0, new JSONNumber(dv));
data.set(1, new JSONNumber(point.getY()));
@@ -304,7 +305,7 @@
DateTimeFormat.PredefinedFormat.DATE_MEDIUM);
Date d = df.parse(dateString);
- double dv = (double)d.getTime();
+ double dv = d.getTime();
data.set(0, new JSONNumber(dv));
data.set(1, new JSONNumber(record.
getAttributeAsDouble(PointRecord.ATTRIBUTE_Y)));
diff -r 5e6e89f19a37 -r bbd82bd8e541 flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualPointsEditor.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualPointsEditor.java Sun Nov 18 01:19:07 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualPointsEditor.java Mon Nov 19 00:07:53 2012 +0100
@@ -148,8 +148,6 @@
/** Create and setup/add the ui. */
public void createUI() {
- Config config = Config.getInstance();
-
Button accept = new Button(MSG.label_ok());
Button cancel = new Button(MSG.label_cancel());
cancel.addClickHandler(this);
diff -r 5e6e89f19a37 -r bbd82bd8e541 flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualWSPEditor.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualWSPEditor.java Sun Nov 18 01:19:07 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualWSPEditor.java Mon Nov 19 00:07:53 2012 +0100
@@ -1,50 +1,34 @@
package de.intevation.flys.client.client.ui.chart;
import com.google.gwt.core.client.GWT;
-
import com.google.gwt.i18n.client.NumberFormat;
-
import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONNumber;
import com.google.gwt.json.client.JSONParser;
import com.google.gwt.json.client.JSONString;
-
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Alignment;
-
import com.smartgwt.client.util.SC;
-
import com.smartgwt.client.widgets.Button;
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.Window;
-
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
-
import com.smartgwt.client.widgets.form.DynamicForm;
-
import com.smartgwt.client.widgets.form.fields.TextItem;
-
import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
import com.smartgwt.client.widgets.form.fields.events.BlurHandler;
-
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
import de.intevation.flys.client.client.Config;
import de.intevation.flys.client.client.FLYSConstants;
-
import de.intevation.flys.client.client.event.RedrawRequestEvent;
import de.intevation.flys.client.client.event.RedrawRequestHandler;
-
-import de.intevation.flys.client.client.services.FeedService;
import de.intevation.flys.client.client.services.FeedServiceAsync;
-import de.intevation.flys.client.client.services.LoadArtifactService;
import de.intevation.flys.client.client.services.LoadArtifactServiceAsync;
-
import de.intevation.flys.client.client.utils.DoubleValidator;
-
import de.intevation.flys.client.shared.model.Artifact;
import de.intevation.flys.client.shared.model.Collection;
import de.intevation.flys.client.shared.model.CollectionItem;
@@ -73,7 +57,7 @@
/** Name of the main data item to be fed. */
public static final String LINE_DATA = "manualpoints.lines";
- /** When we chaged something, we need a RedrawRequest(Handler). */
+ /** When we change something, we need a RedrawRequest(Handler). */
protected RedrawRequestHandler redrawRequestHandler;
/** The collection */
@@ -127,7 +111,7 @@
for (int i = 0; i < size; i++) {
CollectionItem item = collection.getItem(i);
- String dataValue = (String) item.getData().get(dataItemName);
+ String dataValue = item.getData().get(dataItemName);
if (dataValue != null) {
// Found it.
uuid = item.identifier();
@@ -158,13 +142,12 @@
/** Create and setup/add the ui. */
public void createUI() {
- Config config = Config.getInstance();
-
Button accept = new Button(MSG.label_ok());
Button cancel = new Button(MSG.label_cancel());
cancel.addClickHandler(this);
accept.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(ClickEvent e) {
okClicked();
}
@@ -200,6 +183,7 @@
valueInputPanel.setTitle(yAxis);
valueInputPanel.setShowTitle(true);
valueInputPanel.addBlurHandler(new BlurHandler() {
+ @Override
public void onBlur(BlurEvent e) {
DoubleValidator validator = new DoubleValidator();
Map errors = e.getForm().getErrors();
@@ -248,7 +232,6 @@
oldLines = new JSONArray();
}
- int idx = 0;
double val;
if (valueInputPanel.getValue() == null)
return oldLines;
@@ -258,7 +241,7 @@
val = d;
}
catch(NumberFormatException nfe) {
- SC.warn("fehler... nfe... TODO");
+ GWT.log("fehler... nfe... TODO");
return oldLines;
}
@@ -299,11 +282,13 @@
new DefaultArtifact(uuid, "TODO:hash"),
feedData,
new AsyncCallback<Artifact>() {
+ @Override
public void onFailure(Throwable caught) {
GWT.log("Could not feed artifact with lines.");
SC.warn(MSG.getString(caught.getMessage()));
enable();
}
+ @Override
public void onSuccess(Artifact fartifact) {
GWT.log("Successfully set lines ");
redrawRequestHandler.onRedrawRequest(
@@ -337,9 +322,11 @@
"manualpoints",
locale,
new AsyncCallback<Artifact>() {
+ @Override
public void onFailure(Throwable caught) {
GWT.log("Creating manualpoint artifact failed!");
}
+ @Override
public void onSuccess(Artifact artifact) {
GWT.log("Successfully created artifact.");
removeItem(standByLabel);
@@ -354,6 +341,7 @@
* This method is called when the user aborts point editing.
* @param event The event.
*/
+ @Override
public void onClick(ClickEvent event) {
this.destroy();
}
diff -r 5e6e89f19a37 -r bbd82bd8e541 flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java Sun Nov 18 01:19:07 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java Mon Nov 19 00:07:53 2012 +0100
@@ -1,51 +1,37 @@
package de.intevation.flys.client.client.ui.fixation;
import com.google.gwt.core.client.GWT;
-
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.i18n.client.NumberFormat;
-
import com.google.gwt.json.client.JSONNumber;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONString;
-
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Alignment;
-
import com.smartgwt.client.util.SC;
-
import com.smartgwt.client.widgets.Button;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.HTMLPane;
import com.smartgwt.client.widgets.Img;
-
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.events.ResizedEvent;
import com.smartgwt.client.widgets.events.ResizedHandler;
-
import com.smartgwt.client.widgets.form.DynamicForm;
-
import com.smartgwt.client.widgets.form.fields.TextItem;
-
import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
-
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
-
import com.smartgwt.client.widgets.tab.Tab;
import com.smartgwt.client.widgets.tab.TabSet;
import de.intevation.flys.client.client.Config;
import de.intevation.flys.client.client.FLYSConstants;
-
import de.intevation.flys.client.client.services.FixingsOverviewService;
import de.intevation.flys.client.client.services.FixingsOverviewServiceAsync;
-
import de.intevation.flys.client.client.ui.AbstractUIProvider;
-
import de.intevation.flys.client.shared.model.Data;
import de.intevation.flys.client.shared.model.DataList;
import de.intevation.flys.client.shared.model.FixAnalysisArtifact;
@@ -66,6 +52,8 @@
extends AbstractUIProvider
implements ResizedHandler
{
+ private static final long serialVersionUID = -3667553404493415619L;
+
protected static HashMap<String, FixationPanel> instances = new HashMap<String, FixationPanel>();
/** The message class that provides i18n strings. */
@@ -91,7 +79,7 @@
htmlOverview = "";
}
-
+
/** Get the (master) artifact UUID. */
protected String getArtifactUuid() {
return this.artifact.getUuid();
@@ -100,10 +88,12 @@
protected void init() {
}
+ @Override
public Data[] getData() {
return null;
}
+ @Override
public Canvas create(DataList list) {
VLayout layout = new VLayout();
@@ -118,6 +108,7 @@
return layout;
}
+ @Override
public Canvas createOld(DataList list) {
return new DynamicForm();
}
@@ -159,10 +150,12 @@
renderCheckboxes(),
callBack,
new AsyncCallback<FixingsOverviewInfo>() {
+ @Override
public void onFailure(Throwable caught) {
GWT.log("Could not receive overview.");
SC.warn(caught.getMessage());
}
+ @Override
public void onSuccess(FixingsOverviewInfo info) {
GWT.log("Successfully loaded overview.");
fixInfo = info;
@@ -212,6 +205,7 @@
form.setFields(kmText);
form.setWidth(60);
lower.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(ClickEvent ce) {
FixFilter filter = updateChartTabLow();
NumberFormat nf = NumberFormat.getDecimalFormat();
@@ -225,6 +219,7 @@
});
upper.addClickHandler(new ClickHandler() {
+ @Override
public void onClick(ClickEvent ce) {
FixFilter filter = updateChartTabUp();
NumberFormat nf = NumberFormat.getDecimalFormat();
@@ -238,6 +233,7 @@
});
kmText.addChangedHandler(new ChangedHandler() {
+ @Override
public void onChanged(ChangedEvent ce) {
//TODO: get current value.
if(ce.getItem().getValue() != null) {
@@ -337,6 +333,7 @@
}
+ @Override
public void onResized(ResizedEvent re) {
FixAnalysisArtifact art = (FixAnalysisArtifact) this.artifact;
More information about the Dive4elements-commits
mailing list