mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-06 12:23:55 +00:00
First step in order to have a persistent information display
This commit is contained in:
1 parent
56649524ce
commit
5f22064cf8
3 files changed
+12
-5
No files matched your search
+6
@@ -37,6 +37,7 @@ public abstract class AbstractEntryPoint implements EntryPoint, ErrorReporter, W
|
||||
private Button dialogCloseButton;
|
||||
protected StringMessages stringMessages;
|
||||
protected UserAgentDetails userAgent;
|
||||
protected Label persistentAlertLabel;
|
||||
|
||||
/**
|
||||
* Create a remote service proxy to talk to the server-side sailing service.
|
||||
@@ -109,6 +110,11 @@ public abstract class AbstractEntryPoint implements EntryPoint, ErrorReporter, W
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reportPersistentInformation(String message) {
|
||||
persistentAlertLabel.setText(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSmallWidth() {
|
||||
int width = Window.getClientWidth();
|
||||
|
||||
+1
@@ -3,4 +3,5 @@ package com.sap.sailing.gwt.ui.client;
|
||||
public interface ErrorReporter {
|
||||
void reportError(String message);
|
||||
void reportError(String message, boolean silentMode);
|
||||
void reportPersistentInformation(String message);
|
||||
}
|
||||
+5
-5
@@ -19,7 +19,7 @@ public class UserStatusPanel extends FlowPanel {
|
||||
|
||||
private final Label userRolesText;
|
||||
|
||||
public static final Label alert = new Label("");
|
||||
public final Label persistentAlert = new Label("");
|
||||
|
||||
public UserStatusPanel(final UserManagementServiceAsync userManagementService, final ErrorReporter errorReporter) {
|
||||
super();
|
||||
@@ -45,8 +45,8 @@ public class UserStatusPanel extends FlowPanel {
|
||||
addFloatingWidget(userNameText);
|
||||
addFloatingWidget(userRolesText);
|
||||
|
||||
alert.setStyleName("global-alert-message");
|
||||
add(alert);
|
||||
persistentAlert.setStyleName("global-alert-message");
|
||||
add(persistentAlert);
|
||||
|
||||
updateUser(user);
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public class UserStatusPanel extends FlowPanel {
|
||||
}
|
||||
}
|
||||
|
||||
public static void setGlobalAlert(String message) {
|
||||
alert.setText(message);
|
||||
public void setGlobalAlert(String message) {
|
||||
persistentAlert.setText(message);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user