Class LayerSelectorCombo
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.FocusWidget
-
- com.google.gwt.user.client.ui.ButtonBase
-
- com.google.gwt.user.client.ui.Button
-
- uk.ac.rdg.resc.godiva.client.widgets.LayerSelectorCombo
-
- All Implemented Interfaces:
com.google.gwt.event.dom.client.HasAllDragAndDropHandlers
,com.google.gwt.event.dom.client.HasAllFocusHandlers
,com.google.gwt.event.dom.client.HasAllGestureHandlers
,com.google.gwt.event.dom.client.HasAllKeyHandlers
,com.google.gwt.event.dom.client.HasAllMouseHandlers
,com.google.gwt.event.dom.client.HasAllTouchHandlers
,com.google.gwt.event.dom.client.HasBlurHandlers
,com.google.gwt.event.dom.client.HasClickHandlers
,com.google.gwt.event.dom.client.HasDoubleClickHandlers
,com.google.gwt.event.dom.client.HasDragEndHandlers
,com.google.gwt.event.dom.client.HasDragEnterHandlers
,com.google.gwt.event.dom.client.HasDragHandlers
,com.google.gwt.event.dom.client.HasDragLeaveHandlers
,com.google.gwt.event.dom.client.HasDragOverHandlers
,com.google.gwt.event.dom.client.HasDragStartHandlers
,com.google.gwt.event.dom.client.HasDropHandlers
,com.google.gwt.event.dom.client.HasFocusHandlers
,com.google.gwt.event.dom.client.HasGestureChangeHandlers
,com.google.gwt.event.dom.client.HasGestureEndHandlers
,com.google.gwt.event.dom.client.HasGestureStartHandlers
,com.google.gwt.event.dom.client.HasKeyDownHandlers
,com.google.gwt.event.dom.client.HasKeyPressHandlers
,com.google.gwt.event.dom.client.HasKeyUpHandlers
,com.google.gwt.event.dom.client.HasMouseDownHandlers
,com.google.gwt.event.dom.client.HasMouseMoveHandlers
,com.google.gwt.event.dom.client.HasMouseOutHandlers
,com.google.gwt.event.dom.client.HasMouseOverHandlers
,com.google.gwt.event.dom.client.HasMouseUpHandlers
,com.google.gwt.event.dom.client.HasMouseWheelHandlers
,com.google.gwt.event.dom.client.HasTouchCancelHandlers
,com.google.gwt.event.dom.client.HasTouchEndHandlers
,com.google.gwt.event.dom.client.HasTouchMoveHandlers
,com.google.gwt.event.dom.client.HasTouchStartHandlers
,com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.safehtml.client.HasSafeHtml
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.Focusable
,com.google.gwt.user.client.ui.HasEnabled
,com.google.gwt.user.client.ui.HasFocus
,com.google.gwt.user.client.ui.HasHTML
,com.google.gwt.user.client.ui.HasText
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.IsWidget
,com.google.gwt.user.client.ui.SourcesClickEvents
,com.google.gwt.user.client.ui.SourcesFocusEvents
,com.google.gwt.user.client.ui.SourcesKeyboardEvents
,com.google.gwt.user.client.ui.SourcesMouseEvents
,LayerSelectorIF
public class LayerSelectorCombo extends com.google.gwt.user.client.ui.Button implements LayerSelectorIF
An implementation ofLayerSelectorIF
which presents the layers in a popup tree.- Author:
- Guy Griffiths
-
-
Field Summary
Fields Modifier and Type Field Description String
firstTitle
-
Constructor Summary
Constructors Constructor Description LayerSelectorCombo(LayerSelectionHandler layerHandler)
LayerSelectorCombo(LayerSelectionHandler layerHandler, String firstText, boolean showRefreshButton)
-
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.ButtonBase
getHTML, getText, setHTML, setHTML, setText
-
Methods inherited from class com.google.gwt.user.client.ui.FocusWidget
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, getTabIndex, isEnabled, onAttach, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setFocus, setTabIndex
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, 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, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
-
-
-
Field Detail
-
firstTitle
public String firstTitle
-
-
Constructor Detail
-
LayerSelectorCombo
public LayerSelectorCombo(LayerSelectionHandler layerHandler)
-
LayerSelectorCombo
public LayerSelectorCombo(LayerSelectionHandler layerHandler, String firstText, boolean showRefreshButton)
-
-
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 interfacecom.google.gwt.user.client.ui.HasEnabled
- Specified by:
setEnabled
in interfaceLayerSelectorIF
- Overrides:
setEnabled
in classcom.google.gwt.user.client.ui.FocusWidget
-
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
-
-