@@ -0,0 +1,1544 @@
+package org.azavea.otm;%0A%0Aimport java.text.NumberFormat;%0A%0Aimport org.azavea.otm.data.Model;%0Aimport org.json.JSONException;%0A%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.widget.TextView;%0A%0Apublic class EcoField extends Field %7B%0A%0A%09private static final String VALUE_KEY = %22.value%22;%0A%09private static final String UNIT_KEY = %22.unit%22;%0A%09private static final String AMOUNT_KEY = %22.dollars%22;%0A%09%0A%09protected EcoField(String key, String label, int minimumToEdit, %0A%09%09%09String keyboard, String format, String type)%09%7B%0A%09%09super(key, label, minimumToEdit, keyboard, format, type);%0A%09%7D%0A%09%0A%09@Override%0A%09public View renderForDisplay(LayoutInflater layout, Model model) %0A%09%09%09throws JSONException %7B%0A%09%09View container = layout.inflate(R.layout.plot_ecofield_row, null);%0A        ((TextView)container.findViewById(R.id.field_label)).setText(this.label);%0A        %0A        // Extract the value of this type of eco benefit%0A        String value = getValueForKey(this.key + VALUE_KEY, model.getData()).toString();%0A        String units = getValueForKey(this.key + UNIT_KEY, model.getData()).toString();%0A        ((TextView)container.findViewById(R.id.field_value))%0A        %09.setText(value + %22 %22 + units);%0A        %0A        // The dollar amount of the benefit%0A        NumberFormat currency = NumberFormat.getCurrencyInstance();%0A        Double amount = (Double)getValueForKey(this.key + AMOUNT_KEY, model.getData());%0A        ((TextView)container.findViewById(R.id.field_money))%0A        %09.setText(currency.format(amount));%0A    %09%0A        return container;%0A%09%7D%0A%7D%0A

Add EcoField