PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/webportal/src/main/java/au/org/emii/portal/event/LegendClickEventListener.java

http://alageospatialportal.googlecode.com/
Java | 29 lines | 17 code | 8 blank | 4 comment | 0 complexity | b34c1227a7dd0d081b82a2b0fc3590f6 MD5 | raw file
 1package au.org.emii.portal.event;
 2
 3import au.org.emii.portal.menu.MapLayer;
 4import au.org.emii.portal.composer.LegendComposer;
 5import org.zkoss.zk.ui.Executions;
 6import org.zkoss.zk.ui.event.Event;
 7import org.zkoss.zul.Popup;
 8
 9
10public class LegendClickEventListener extends LegendEventListener {
11	
12	public LegendClickEventListener(MapLayer mapLayer) {
13		super(mapLayer);
14	}
15	
16	/**
17	 * Show legend as an overlay window
18	 * @param event
19	 */
20	protected void createComponents(Event event) {
21		Popup popup = (Popup) Executions.createComponents("/WEB-INF/zul/LegendPopup.zul", event.getTarget().getRoot(), null);
22		LegendComposer window = (LegendComposer) popup.getFirstChild();
23		
24		window.setMapLayer(mapLayer);
25		window.extractFromPopup();
26		
27	}
28
29}