ItEr22S12CUVistaRecursosTempoPorProxectoItEr21S07: Renaming wrong named function.

This commit is contained in:
Óscar González Fernández 2009-08-18 12:26:56 +02:00
parent 78afa5cab1
commit e3fb9ed6d2
7 changed files with 9 additions and 9 deletions

View file

@ -110,12 +110,12 @@ public class TimeTracker extends HtmlMacroComponent {
public void onIncrease(int offset) {
changeDetailLevel(getDetailLevel().next(), offset
* getDetailLevel().getTimeTrackerState().pixelsPerDay());
* getDetailLevel().getTimeTrackerState().daysPerPixel());
}
public void onDecrease(int offset) {
changeDetailLevel(getDetailLevel().previous(), offset
* getDetailLevel().getTimeTrackerState().pixelsPerDay());
* getDetailLevel().getTimeTrackerState().daysPerPixel());
}
private void changeDetailLevel(ZoomLevel d, double days) {
@ -127,7 +127,7 @@ public class TimeTracker extends HtmlMacroComponent {
fireZoomChanged(d);
scrollHorizontalPercentage((int) Math.floor(days
/ d.getTimeTrackerState().pixelsPerDay()));
/ d.getTimeTrackerState().daysPerPixel()));
}
private ZoomLevel getDetailLevel() {

View file

@ -23,7 +23,7 @@ public class DetailFiveTimeTrackerState extends TimeTrackerStateUsingJodaTime {
public static final DetailFiveTimeTrackerState INSTANCE = new DetailFiveTimeTrackerState();
public final double pixelsPerDay() {
public final double daysPerPixel() {
return ((double) 1 / SECOND_LEVEL_SIZE);
}

View file

@ -18,7 +18,7 @@ public class DetailFourTimeTrackerState extends TimeTrackerStateUsingJodaTime {
private static final int FIRST_LEVEL_SIZE = 200;
private static final int SECOND_LEVEL_SIZE = 50;
public final double pixelsPerDay() {
public final double daysPerPixel() {
return ((double) 7 / SECOND_LEVEL_SIZE);
}

View file

@ -17,7 +17,7 @@ public class DetailOneTimeTrackerState extends TimeTrackerState {
private static final int FIRST_LEVEL_ITEM_SIZE = 200;
private static final int SECOND_LEVEL_ITEM_SIZE = 100;
public final double pixelsPerDay() {
public final double daysPerPixel() {
return ((double) 365 / FIRST_LEVEL_ITEM_SIZE);
}

View file

@ -18,7 +18,7 @@ public class DetailThreeTimeTrackerState extends TimeTrackerStateUsingJodaTime {
private static final int FIRST_LEVEL_SIZE = 300;
protected static final int SECOND_LEVEL_SIZE = 50;
public final double pixelsPerDay() {
public final double daysPerPixel() {
return ((double) 182.5 / FIRST_LEVEL_SIZE);
}

View file

@ -20,7 +20,7 @@ public class DetailTwoTimeTrackerState extends TimeTrackerState {
private static final int FIRST_LEVEL_ITEM_SIZE = 400;
private static final int SECOND_LEVEL_ITEM_SIZE = 100;
public final double pixelsPerDay() {
public final double daysPerPixel() {
return ((double) 365 / FIRST_LEVEL_ITEM_SIZE);
}

View file

@ -203,6 +203,6 @@ public abstract class TimeTrackerState {
public abstract Interval getRealIntervalFor(Interval testInterval);
public abstract double pixelsPerDay();
public abstract double daysPerPixel();
}