mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-30 17:36:40 +00:00
Added BusyIndicator to LeaderboardPanel
This commit is contained in:
1 parent
046c42fa1f
commit
c95f92e4af
1 file changed
+16
-8
+16
-8
@@ -67,6 +67,7 @@ import com.sap.sailing.gwt.ui.shared.components.IsEmbeddableComponent;
|
||||
import com.sap.sailing.gwt.ui.shared.components.SettingsDialog;
|
||||
import com.sap.sailing.gwt.ui.shared.components.SettingsDialogComponent;
|
||||
import com.sap.sailing.gwt.ui.shared.panels.BusyIndicator;
|
||||
import com.sap.sailing.gwt.ui.shared.panels.SimpleBusyIndicator;
|
||||
|
||||
/**
|
||||
* A leaderboard essentially consists of a table widget that in its columns displays the entries.
|
||||
@@ -175,6 +176,8 @@ public class LeaderboardPanel extends FormPanel implements TimeListener, PlaySta
|
||||
|
||||
private final ImageResource pauseIcon;
|
||||
private final ImageResource playIcon;
|
||||
|
||||
private final BusyIndicator busyIndicator;
|
||||
|
||||
private class SettingsClickHandler implements ClickHandler {
|
||||
private final StringMessages stringConstants;
|
||||
@@ -848,10 +851,19 @@ public class LeaderboardPanel extends FormPanel implements TimeListener, PlaySta
|
||||
listHandler = new ListHandler<LeaderboardRowDTO>(getData().getList());
|
||||
getLeaderboardTable().addColumnSortHandler(listHandler);
|
||||
loadCompleteLeaderboard(getLeaderboardDisplayDate());
|
||||
|
||||
|
||||
if(preSelectedRace == null) {
|
||||
isEmbedded = false;
|
||||
} else {
|
||||
isEmbedded = true;
|
||||
}
|
||||
contentPanel = new VerticalPanel();
|
||||
headerPanel = new DockPanel();
|
||||
DockPanel toolbarPanel = new DockPanel();
|
||||
busyIndicator = new SimpleBusyIndicator(true);
|
||||
if (!isEmbedded) {
|
||||
toolbarPanel.add(busyIndicator);
|
||||
}
|
||||
headerPanel.setWidth("100%");
|
||||
headerPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
||||
toolbarPanel.setWidth("100%");
|
||||
@@ -902,11 +914,9 @@ public class LeaderboardPanel extends FormPanel implements TimeListener, PlaySta
|
||||
refreshAndSettingsPanel.add(refreshPanel);
|
||||
refreshAndSettingsPanel.add(settingsAnchor);
|
||||
toolbarPanel.add(refreshAndSettingsPanel, DockPanel.EAST);
|
||||
if(preSelectedRace == null) {
|
||||
if(!isEmbedded) {
|
||||
contentPanel.add(headerPanel);
|
||||
contentPanel.add(toolbarPanel);
|
||||
} else {
|
||||
isEmbedded = true;
|
||||
}
|
||||
contentPanel.add(getLeaderboardTable());
|
||||
setWidget(contentPanel);
|
||||
@@ -1528,13 +1538,11 @@ public class LeaderboardPanel extends FormPanel implements TimeListener, PlaySta
|
||||
|
||||
@Override
|
||||
public BusyIndicator getBusyIndicator() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
return busyIndicator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasBusyIndicator() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user