renamed toString to format

This commit is contained in:
Axel Uhl committed 2011-12-08 18:56:22 +01:00
1 parent 371da80de6
commit bbc1689b0f
3 files changed
+10 -10

No files matched your search

@@ -128,11 +128,11 @@ public class ChartsPanel extends FormPanel {
Label lblChart = new Label(stringConstants.chooseChart());
configPanel.add(lblChart);
final ListBox dataSelection = new ListBox();
dataSelection.addItem(DetailTypeFormatter.toString(DetailType.WINDWARD_DISTANCE_TO_OVERALL_LEADER, stringConstants),DetailType.WINDWARD_DISTANCE_TO_OVERALL_LEADER.toString());
dataSelection.addItem(DetailTypeFormatter.toString(DetailType.DISTANCE_TRAVELED, stringConstants),DetailType.DISTANCE_TRAVELED.toString());
dataSelection.addItem(DetailTypeFormatter.toString(DetailType.VELOCITY_MADE_GOOD_IN_KNOTS, stringConstants),DetailType.VELOCITY_MADE_GOOD_IN_KNOTS.toString());
dataSelection.addItem(DetailTypeFormatter.toString(DetailType.GAP_TO_LEADER_IN_SECONDS, stringConstants),DetailType.GAP_TO_LEADER_IN_SECONDS.toString());
dataSelection.addItem(DetailTypeFormatter.toString(DetailType.CURRENT_SPEED_OVER_GROUND_IN_KNOTS, stringConstants),DetailType.CURRENT_SPEED_OVER_GROUND_IN_KNOTS.toString());
dataSelection.addItem(DetailTypeFormatter.format(DetailType.WINDWARD_DISTANCE_TO_OVERALL_LEADER, stringConstants),DetailType.WINDWARD_DISTANCE_TO_OVERALL_LEADER.toString());
dataSelection.addItem(DetailTypeFormatter.format(DetailType.DISTANCE_TRAVELED, stringConstants),DetailType.DISTANCE_TRAVELED.toString());
dataSelection.addItem(DetailTypeFormatter.format(DetailType.VELOCITY_MADE_GOOD_IN_KNOTS, stringConstants),DetailType.VELOCITY_MADE_GOOD_IN_KNOTS.toString());
dataSelection.addItem(DetailTypeFormatter.format(DetailType.GAP_TO_LEADER_IN_SECONDS, stringConstants),DetailType.GAP_TO_LEADER_IN_SECONDS.toString());
dataSelection.addItem(DetailTypeFormatter.format(DetailType.CURRENT_SPEED_OVER_GROUND_IN_KNOTS, stringConstants),DetailType.CURRENT_SPEED_OVER_GROUND_IN_KNOTS.toString());
dataSelection.addChangeHandler(new ChangeHandler() {
@Override
@@ -228,7 +228,7 @@ public class ChartsPanel extends FormPanel {
Options opt = Options.create();
opt.setWidth(chartWidth);
opt.setHeight(chartHeight);
opt.setTitle(DetailTypeFormatter.toString(dataToShow, stringConstants));
opt.setTitle(DetailTypeFormatter.format(dataToShow, stringConstants));
AxisOptions hAxisOptions = AxisOptions.create();
hAxisOptions.setTitle("time");
opt.setHAxisOptions(hAxisOptions);
@@ -3,7 +3,7 @@ package com.sap.sailing.gwt.ui.client;
import com.sap.sailing.server.api.DetailType;
public class DetailTypeFormatter {
public static String toString(DetailType detailType, StringConstants stringConstants) {
public static String format(DetailType detailType, StringConstants stringConstants) {
switch (detailType) {
case DISTANCE_TRAVELED:
return stringConstants.distanceInMeters();
@@ -98,7 +98,7 @@ public class LeaderboardSettingsPanel extends DataEntryDialog<Result> {
vpMeneuvers.add(new Label(stringConstants.maneuverTypes()));
List<DetailType> currentMeneuverDetailSelection = maneuverDetailSelection;
for (DetailType detailType : ManeuverCountRaceColumn.getAvailableManeuverDetailColumnTypes()) {
CheckBox checkbox = createCheckbox(DetailTypeFormatter.toString(detailType, stringConstants));
CheckBox checkbox = createCheckbox(DetailTypeFormatter.format(detailType, stringConstants));
checkbox.setValue(currentMeneuverDetailSelection.contains(detailType));
maneuverDetailCheckboxes.put(detailType, checkbox);
vpMeneuvers.add(checkbox);
@@ -118,7 +118,7 @@ public class LeaderboardSettingsPanel extends DataEntryDialog<Result> {
vpLeft.add(new Label(stringConstants.raceDetailsToShow()));
List<DetailType> currentRaceDetailSelection = raceDetailSelection;
for (DetailType type : LeaderboardPanel.getAvailableRaceDetailColumnTypes()) {
CheckBox checkbox = createCheckbox(DetailTypeFormatter.toString(type, stringConstants));
CheckBox checkbox = createCheckbox(DetailTypeFormatter.format(type, stringConstants));
checkbox.setValue(currentRaceDetailSelection.contains(type));
raceDetailCheckboxes.put(type, checkbox);
vpLeft.add(checkbox);
@@ -126,7 +126,7 @@ public class LeaderboardSettingsPanel extends DataEntryDialog<Result> {
vpLeft.add(new Label(stringConstants.legDetailsToShow()));
List<DetailType> currentLegDetailSelection = legDetailSelection;
for (DetailType type : LegColumn.getAvailableLegDetailColumnTypes()) {
CheckBox checkbox = createCheckbox(DetailTypeFormatter.toString(type, stringConstants));
CheckBox checkbox = createCheckbox(DetailTypeFormatter.format(type, stringConstants));
checkbox.setValue(currentLegDetailSelection.contains(type));
legDetailCheckboxes.put(type, checkbox);
vpLeft.add(checkbox);