Class LayerSelectorTree
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.ComplexPanel
-
- com.google.gwt.user.client.ui.CellPanel
-
- com.google.gwt.user.client.ui.VerticalPanel
-
- uk.ac.rdg.resc.godiva.client.widgets.LayerSelectorTree
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.HasAlignment
,com.google.gwt.user.client.ui.HasHorizontalAlignment
,com.google.gwt.user.client.ui.HasVerticalAlignment
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IndexedPanel
,com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
,com.google.gwt.user.client.ui.InsertPanel
,com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,Iterable<com.google.gwt.user.client.ui.Widget>
,LayerSelectorIF
public class LayerSelectorTree extends com.google.gwt.user.client.ui.VerticalPanel implements LayerSelectorIF
An implementation ofLayerSelectorIF
which presents the layers in a popup tree.- Author:
- Guy Griffiths
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
-
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment
com.google.gwt.user.client.ui.HasHorizontalAlignment.AutoHorizontalAlignmentConstant, com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant
-
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment
com.google.gwt.user.client.ui.HasVerticalAlignment.VerticalAlignmentConstant
-
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
-
-
Field Summary
Fields Modifier and Type Field Description String
firstTitle
-
Constructor Summary
Constructors Constructor Description LayerSelectorTree(LayerSelectionHandler layerHandler, com.google.gwt.user.client.ui.HTML titleLabel)
LayerSelectorTree(LayerSelectionHandler layerHandler, String firstText, boolean showRefreshButton, com.google.gwt.user.client.ui.HTML titleLabel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getSelectedId()
List<String>
getTitleElements()
String
getWmsUrl()
void
populateLayers(LayerMenuItem topItem)
Populate the menu treevoid
selectLayer(String id, String wmsUrl, boolean autoZoomAndPalette)
Sets the selected layervoid
setEnabled(boolean enabled)
Enables/disables the layer selector-
Methods inherited from class com.google.gwt.user.client.ui.VerticalPanel
add, getHorizontalAlignment, getVerticalAlignment, insert, insert, onEnsureDebugId, remove, setHorizontalAlignment, setVerticalAlignment
-
Methods inherited from class com.google.gwt.user.client.ui.CellPanel
getBody, getSpacing, getTable, setBorderWidth, setCellHeight, setCellHeight, setCellHorizontalAlignment, setCellHorizontalAlignment, setCellHorizontalAlignment, setCellHorizontalAlignment, setCellVerticalAlignment, setCellVerticalAlignment, setCellVerticalAlignment, setCellVerticalAlignment, setCellWidth, setCellWidth, setSpacing
-
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
-
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndex
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
firstTitle
public String firstTitle
-
-
Constructor Detail
-
LayerSelectorTree
public LayerSelectorTree(LayerSelectionHandler layerHandler, com.google.gwt.user.client.ui.HTML titleLabel)
-
LayerSelectorTree
public LayerSelectorTree(LayerSelectionHandler layerHandler, String firstText, boolean showRefreshButton, com.google.gwt.user.client.ui.HTML titleLabel)
-
-
Method Detail
-
populateLayers
public void populateLayers(LayerMenuItem topItem)
Description copied from interface:LayerSelectorIF
Populate the menu tree- Specified by:
populateLayers
in interfaceLayerSelectorIF
- Parameters:
topItem
- ALayerMenuItem
representing the top level menu item
-
getSelectedId
public String getSelectedId()
- Specified by:
getSelectedId
in interfaceLayerSelectorIF
- Returns:
- The currently selected layer ID
-
selectLayer
public void selectLayer(String id, String wmsUrl, boolean autoZoomAndPalette)
Description copied from interface:LayerSelectorIF
Sets the selected layer- Specified by:
selectLayer
in interfaceLayerSelectorIF
- Parameters:
id
- The layer IDwmsUrl
- The corresponding WMS URLautoZoomAndPalette
- Whether or not to automatically zoom and set the palette after selecting the layer
-
setEnabled
public void setEnabled(boolean enabled)
Description copied from interface:LayerSelectorIF
Enables/disables the layer selector- Specified by:
setEnabled
in interfaceLayerSelectorIF
-
getTitleElements
public List<String> getTitleElements()
- Specified by:
getTitleElements
in interfaceLayerSelectorIF
- Returns:
- A list of string elements which define where we are in the menu tree. This is used for generating titles
-
getWmsUrl
public String getWmsUrl()
- Specified by:
getWmsUrl
in interfaceLayerSelectorIF
- Returns:
- The WMS URL of the currently selected layer
-
-