Mercurial > dive4elements > river
changeset 4321:e7f7be368cf3
NaviChartOutputTab: Doc.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 30 Oct 2012 10:45:16 +0100 |
parents | c3ac330d9be4 |
children | f36550788add |
files | flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/NaviChartOutputTab.java |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/NaviChartOutputTab.java Tue Oct 30 10:44:54 2012 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/NaviChartOutputTab.java Tue Oct 30 10:45:16 2012 +0100 @@ -202,9 +202,12 @@ } + /** Callback when km-up-button is clicked. + * Increases collectionViews KM and refreshes view. */ protected void updateChartUp() { double currentKm = collectionView.getCurrentKm(); if (currentKm < collectionView.getMaxKm()) { + // Why this math? double newVal = currentKm * 100; newVal += (collectionView.getSteps() / 10); collectionView.setCurrentKm((double)Math.round(newVal) / 100); @@ -213,9 +216,13 @@ updateChartInfo(); } } + + /** Callback when km-down-button is clicked. + * Decreases collectionViews KM and refreshes view. */ protected void updateChartDown() { double currentKm = collectionView.getCurrentKm(); if (currentKm > collectionView.getMinKm()) { + // Why this math? double newVal = currentKm * 100; newVal -= (collectionView.getSteps() / 10); collectionView.setCurrentKm((double)Math.round(newVal) / 100);