ItEr22S12CUVistaRecursosTempoPorProxectoItEr21S07: Renaming wrong named function.
This commit is contained in:
parent
78afa5cab1
commit
e3fb9ed6d2
7 changed files with 9 additions and 9 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,6 +203,6 @@ public abstract class TimeTrackerState {
|
|||
|
||||
public abstract Interval getRealIntervalFor(Interval testInterval);
|
||||
|
||||
public abstract double pixelsPerDay();
|
||||
public abstract double daysPerPixel();
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue