/** Create the data choices associated with this source. */ protected void doMakeDataChoices() { layerList = new ArrayList(); for (int i = 0; i < wmsSelections.size(); i++) { WmsSelection selection = (WmsSelection) wmsSelections.get(i); layerList.add(new TwoFacedObject(selection.getTitle(), selection.getLayer())); } for (int i = 0; i < wmsSelections.size(); i++) { Hashtable properties = new Hashtable(); properties.put(PROP_LAYERS, layerList); properties.put(PROP_LAYER, layerList.get(i)); properties.put(DataChoice.PROP_ICON, "/auxdata/ui/icons/Earth16.gif"); WmsSelection selection = (WmsSelection) wmsSelections.get(i); addDataChoice( new DirectDataChoice( this, selection, selection.toString(), selection.toString(), categories, properties)); } }
/** * Get the description. This adds on the last url requested. * * @return description */ public String getFullDescription() { StringBuffer sb = new StringBuffer(super.getFullDescription()); if (lastUrl != null) { sb.append("<p><b>Last request:</b> " + lastUrl); } sb.append( "Images<p><table><tr><td><b>Name</b></td><td><b>Layer</b></td><td><b>Server</b></td></tr>\n"); for (int i = 0; i < wmsSelections.size(); i++) { WmsSelection selection = (WmsSelection) wmsSelections.get(i); sb.append("<tr><td>"); sb.append(selection.getTitle()); sb.append("</td><td>"); sb.append(selection.getLayer()); sb.append("</td><td>"); sb.append(selection.getServer()); sb.append("</td></tr>"); } sb.append("</table>"); return sb.toString(); }