Refactored partial to show regatta live races on mobile

This commit is contained in:
Benjamin Barth committed 2015-08-27 09:15:53 +02:00
1 parent 3a83f7393d
commit 55ee4c096e
2 files changed
+23 -5

No files matched your search

@@ -1,5 +1,8 @@
package com.sap.sailing.gwt.home.mobile.partials.liveraces;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.reload.RefreshableWidget;
import com.sap.sailing.gwt.home.mobile.partials.regattaStatus.RegattaStatusRace;
@@ -12,14 +15,18 @@ import com.sap.sailing.gwt.ui.shared.dispatch.event.LiveRaceDTO;
public class RegattaLiveRaces extends Composite implements RefreshableWidget<SortedSetResult<LiveRaceDTO>> {
private final MobileSection mobileSection = new MobileSection();
private final SectionHeaderContent header = new SectionHeaderContent();
private static RegattaLiveRacesUiBinder uiBinder = GWT.create(RegattaLiveRacesUiBinder.class);
interface RegattaLiveRacesUiBinder extends UiBinder<MobileSection, RegattaLiveRaces> {
}
@UiField SectionHeaderContent sectionHeaderUi;
private final MobileSection mobileSection;
public RegattaLiveRaces() {
RegattaStatusResources.INSTANCE.css().ensureInjected();
header.setSectionTitle(StringMessages.INSTANCE.liveNow());
mobileSection.addHeader(header);
initWidget(mobileSection);
initWidget(mobileSection = uiBinder.createAndBindUi(this));
sectionHeaderUi.setSectionTitle(StringMessages.INSTANCE.liveNow());
setVisible(false);
}
@@ -0,0 +1,11 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:mp="urn:import:com.sap.sailing.gwt.home.mobile.partials" xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
<ui:with field="res" type="com.sap.sailing.gwt.home.mobile.resources.SharedResources" />
<mp:section.MobileSection>
<mp:header>
<mp:sectionHeader.SectionHeaderContent ui:field="sectionHeaderUi"/>
</mp:header>
</mp:section.MobileSection>
</ui:UiBinder>