mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-17 01:31:01 +00:00
add "mode" as url-parameter
This commit is contained in:
1 parent
e35650ad34
commit
c3b251de79
3 files changed
+18
-6
No files matched your search
+9
-2
@@ -22,7 +22,8 @@ public class SimulatorEntryPoint2 extends AbstractEntryPoint {
|
||||
private final SimulatorServiceAsync simulatorSvc = GWT.create(SimulatorService.class);
|
||||
private int xRes = 5;
|
||||
private int yRes = 5;
|
||||
private boolean autoUpdate = true;
|
||||
private boolean autoUpdate = false;
|
||||
private char mode = 'f';
|
||||
|
||||
private static Logger logger = Logger.getLogger(SimulatorEntryPoint.class.getName());
|
||||
|
||||
@@ -57,9 +58,15 @@ public class SimulatorEntryPoint2 extends AbstractEntryPoint {
|
||||
} else {
|
||||
autoUpdate = Boolean.parseBoolean(autoUpdateStr);
|
||||
}
|
||||
String modeStr = Window.Location.getParameter("mode");
|
||||
if (modeStr == null || modeStr.isEmpty()) {
|
||||
logger.config("Using default mode " + mode);
|
||||
} else {
|
||||
mode = modeStr.charAt(0);
|
||||
}
|
||||
|
||||
SimulatorMainPanel2 mainPanel = new SimulatorMainPanel2(simulatorSvc, stringMessages, this, xRes, yRes,
|
||||
autoUpdate);
|
||||
autoUpdate, mode);
|
||||
|
||||
switch (viewMode) {
|
||||
case ONESCREEN:
|
||||
|
||||
+4
-2
@@ -85,6 +85,7 @@ public class SimulatorMainPanel2 extends SplitLayoutPanel {
|
||||
private final int xRes;
|
||||
private final int yRes;
|
||||
private final boolean autoUpdate;
|
||||
private final char mode;
|
||||
|
||||
private SimulatorTimePanel timePanel;
|
||||
|
||||
@@ -177,7 +178,7 @@ public class SimulatorMainPanel2 extends SplitLayoutPanel {
|
||||
}
|
||||
|
||||
public SimulatorMainPanel2(SimulatorServiceAsync svc, StringMessages stringMessages, ErrorReporter errorReporter,
|
||||
int xRes, int yRes, boolean autoUpdate) {
|
||||
int xRes, int yRes, boolean autoUpdate, char mode) {
|
||||
|
||||
super();
|
||||
|
||||
@@ -187,6 +188,7 @@ public class SimulatorMainPanel2 extends SplitLayoutPanel {
|
||||
this.xRes = xRes;
|
||||
this.yRes = yRes;
|
||||
this.autoUpdate = autoUpdate;
|
||||
this.mode = mode;
|
||||
this.isOmniscient = new CheckBox(this.stringMessages.omniscient(), true);
|
||||
this.isOmniscient.setValue(true);
|
||||
|
||||
@@ -548,7 +550,7 @@ public class SimulatorMainPanel2 extends SplitLayoutPanel {
|
||||
initDisplayOptions(mapOptions);
|
||||
|
||||
simulatorMap = new SimulatorMap(simulatorSvc, stringMessages, errorReporter, xRes, yRes, timer, timePanel,
|
||||
windParams, busyIndicator);
|
||||
windParams, busyIndicator, mode);
|
||||
|
||||
// FlowPanel mapPanel = new FlowPanel();
|
||||
// mapPanel.setTitle("Map");
|
||||
|
||||
+5
-2
@@ -53,6 +53,7 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
private final Timer timer;
|
||||
private final SimulatorTimePanel timePanel;
|
||||
private final SimpleBusyIndicator busyIndicator;
|
||||
private final char mode;
|
||||
|
||||
private ColorPalette colorPalette;
|
||||
|
||||
@@ -158,7 +159,7 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
}
|
||||
|
||||
public SimulatorMap(SimulatorServiceAsync simulatorSvc, StringMessages stringMessages, ErrorReporter errorReporter,
|
||||
int xRes, int yRes, Timer timer, WindFieldGenParamsDTO windParams, SimpleBusyIndicator busyIndicator) {
|
||||
int xRes, int yRes, Timer timer, WindFieldGenParamsDTO windParams, SimpleBusyIndicator busyIndicator, char mode) {
|
||||
this.simulatorSvc = simulatorSvc;
|
||||
this.stringMessages = stringMessages;
|
||||
this.errorReporter = errorReporter;
|
||||
@@ -169,6 +170,7 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
timer.addTimeListener(this);
|
||||
this.windParams = windParams;
|
||||
this.busyIndicator = busyIndicator;
|
||||
this.mode = mode;
|
||||
colorPalette = new ColorPaletteGenerator();
|
||||
|
||||
dataInitialized = false;
|
||||
@@ -184,7 +186,7 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
}
|
||||
|
||||
public SimulatorMap(SimulatorServiceAsync simulatorSvc, StringMessages stringMessages, ErrorReporter errorReporter,
|
||||
int xRes, int yRes, Timer timer, SimulatorTimePanel timePanel, WindFieldGenParamsDTO windParams, SimpleBusyIndicator busyIndicator) {
|
||||
int xRes, int yRes, Timer timer, SimulatorTimePanel timePanel, WindFieldGenParamsDTO windParams, SimpleBusyIndicator busyIndicator, char mode) {
|
||||
this.simulatorSvc = simulatorSvc;
|
||||
this.stringMessages = stringMessages;
|
||||
this.errorReporter = errorReporter;
|
||||
@@ -195,6 +197,7 @@ public class SimulatorMap extends AbsolutePanel implements RequiresDataInitializ
|
||||
timer.addTimeListener(this);
|
||||
this.windParams = windParams;
|
||||
this.busyIndicator = busyIndicator;
|
||||
this.mode = mode;
|
||||
colorPalette = new ColorPaletteGenerator();
|
||||
|
||||
dataInitialized = false;
|
||||
|
||||
Reference in new issue
Block a user