Mercurial > dive4elements > river
diff gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoPanel.java @ 7934:71a2e408adca
Moved info stack section to top level widget (parameterlist).
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 17 Jun 2014 09:47:45 +0200 |
parents | 165020640d7b |
children | 5e38e2924c07 |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoPanel.java Tue Jun 17 09:45:48 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoPanel.java Tue Jun 17 09:47:45 2014 +0200 @@ -11,8 +11,6 @@ import com.google.gwt.core.client.GWT; import com.smartgwt.client.types.Overflow; -import com.smartgwt.client.widgets.Canvas; -import com.smartgwt.client.widgets.layout.SectionStackSection; import com.smartgwt.client.widgets.layout.VLayout; import org.dive4elements.river.client.client.FLYS; import org.dive4elements.river.client.client.FLYSConstants; @@ -30,9 +28,6 @@ /** The instance of FLYS */ protected FLYS flys; - /** SectionStackSection where this InfoPanel belongs in*/ - protected SectionStackSection section; - /** Name of the river */ protected String river; @@ -49,20 +44,11 @@ public final static String SECTION_ID = "InfoPanelSection"; public InfoPanel(FLYS flys, InfoListGrid listgrid) { - SectionStackSection section = new SectionStackSection(); - section.setExpanded(false); - section.setTitle(getSectionTitle()); - section.setName(SECTION_ID); - section.setID(SECTION_ID); - setOverflow(Overflow.HIDDEN); setStyleName("infopanel"); this.flys = flys; - section.setHidden(true); - section.setItems(this); - this.section = section; this.listgrid = listgrid; this.addMember(listgrid); } @@ -96,59 +82,11 @@ this.listgrid.setRiverInfo(riverinfo); } - /** - * Hide the section stack section. - */ - @Override - public void hide() { - GWT.log("InfoPanel - hide"); - this.section.setHidden(true); - } - - /** - * Show the section stack section. - */ - @Override - public void show() { - GWT.log("InfoPanel - show"); - this.section.setHidden(false); - } - - @Override - public void addMember(Canvas component) { - super.addMember(component); - expand(); - } - - @Override - public void removeMembers(Canvas[] components) { - super.removeMembers(components); - contract(); - } - - public SectionStackSection getSection() { - return this.section; - } - protected void removeAllMembers() { removeMembers(getMembers()); } - /** - * Expands the gauge section. - */ - public void expand() { - section.setExpanded(true); - } - - /** - * Contracts/shrinks the expanded gauge section. - */ - public void contract() { - section.setExpanded(false); - } - protected abstract void refresh(); - protected abstract String getSectionTitle(); + public abstract String getSectionTitle(); }