Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/DistancePanel.java @ 793:4497d19c22fd
Finished the panel to enter waterlevel/ground information (from, to, diff).
flys-client/trunk@2301 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 07 Jul 2011 14:12:21 +0000 |
parents | dfbc6693247e |
children | 9bb8b7a751ec |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DistancePanel.java Thu Jul 07 12:10:50 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DistancePanel.java Thu Jul 07 14:12:21 2011 +0000 @@ -61,10 +61,8 @@ public DistancePanel(String labelOrientation) { - distancesTable = new RangeTable(); - locationsTable = new LocationsTable(); distancePanel = new DoubleRangePanel( - getLabelFrom(), getLabelTo(), getLabelStep(), + labelFrom(), labelTo(), labelStep(), 0d, 0d, 0d, 250, this, labelOrientation); } @@ -130,28 +128,58 @@ StringBuilder sb = new StringBuilder(); sb.append(from[0].getLabel()); - sb.append(" " + getLabelFrom() + " "); + sb.append(" " + getUnitFrom() + " - "); sb.append(to[0].getLabel()); - sb.append(" " + getLabelTo() + " "); + sb.append(" " + getUnitTo() + " - "); sb.append(step[0].getLabel()); - sb.append(" " + getLabelStep()); + sb.append(" " + getUnitStep()); return sb.toString(); } + protected String labelFrom() { + return getLabelFrom() + " [" + getUnitFrom() + "]"; + } + + protected String getLabelFrom() { - return MSG.unitFrom(); + return MSG.dpLabelFrom(); + } + + + protected String getUnitFrom() { + return MSG.dpUnitFrom(); + } + + + protected String labelTo() { + return getLabelTo() + " [" + getUnitTo() + "]"; } protected String getLabelTo() { - return MSG.unitTo(); + return MSG.dpLabelTo(); + } + + + protected String getUnitTo() { + return MSG.dpUnitTo(); + } + + + protected String labelStep() { + return getLabelStep() + " [" + getUnitStep() + "]"; } protected String getLabelStep() { - return MSG.unitWidth(); + return MSG.dpLabelStep(); + } + + + protected String getUnitStep() { + return MSG.dpUnitStep(); } @@ -366,6 +394,9 @@ protected void initHelperPanel() { + distancesTable = new RangeTable(); + locationsTable = new LocationsTable(); + Config config = Config.getInstance(); String url = config.getServerUrl(); String river = getRiverName();