Class ElevationSelector
- 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.HorizontalPanel
-
- uk.ac.rdg.resc.godiva.client.widgets.BaseSelector
-
- uk.ac.rdg.resc.godiva.client.widgets.ElevationSelector
-
- 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>
,ElevationSelectorIF
public class ElevationSelector extends BaseSelector implements ElevationSelectorIF
An implementation ofElevationSelectorIF
which presents the available elevations as a drop down list. In the case where we have a continuous depth axis, this will still be the case, but ranges will be generated, and the values shown will be the centre points of these ranges. The protocol for continuous vertical axes is more flexible, but in practice this is sufficient- 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 inherited from class uk.ac.rdg.resc.godiva.client.widgets.BaseSelector
label
-
-
Constructor Summary
Constructors Constructor Description ElevationSelector(String id, String title, ElevationSelectionHandler handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNElevations()
String
getSelectedElevation()
Gets the currently selected elevation as aString
String
getSelectedElevationRange()
Gets the currently selected elevation range if applicableString
getVerticalUnits()
boolean
isContinuous()
void
populateElevations(List<String> availableElevations)
Populates the available elevationsvoid
setContinuous(boolean continuous)
Sets this elevation selector to be continuousvoid
setEnabled(boolean enabled)
Enables/disables the elevation selectorvoid
setId(String id)
Sets the layer ID which this widget is referring tovoid
setSelectedElevation(String currentElevation)
Sets the current elevation to the desired valuevoid
setUnitsAndDirection(String units, boolean positive, boolean pressure)
Sets the units and direction of the vertical axis-
Methods inherited from class uk.ac.rdg.resc.godiva.client.widgets.BaseSelector
setTitle
-
Methods inherited from class com.google.gwt.user.client.ui.HorizontalPanel
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, 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
-
-
-
-
Constructor Detail
-
ElevationSelector
public ElevationSelector(String id, String title, ElevationSelectionHandler handler)
-
-
Method Detail
-
setId
public void setId(String id)
Description copied from interface:ElevationSelectorIF
Sets the layer ID which this widget is referring to- Specified by:
setId
in interfaceElevationSelectorIF
-
populateElevations
public void populateElevations(List<String> availableElevations)
Description copied from interface:ElevationSelectorIF
Populates the available elevations- Specified by:
populateElevations
in interfaceElevationSelectorIF
- Parameters:
availableElevations
- The available elevations, represented as aList
ofString
s
-
setUnitsAndDirection
public void setUnitsAndDirection(String units, boolean positive, boolean pressure)
Description copied from interface:ElevationSelectorIF
Sets the units and direction of the vertical axis- Specified by:
setUnitsAndDirection
in interfaceElevationSelectorIF
- Parameters:
units
- A string representing the unitspositive
-true
if increasing elevation value means increasing height.false
if increasing elevation value means increasing depthpressure
-true
if this axis represents pressure
-
getSelectedElevation
public String getSelectedElevation()
Description copied from interface:ElevationSelectorIF
Gets the currently selected elevation as aString
- Specified by:
getSelectedElevation
in interfaceElevationSelectorIF
-
setSelectedElevation
public void setSelectedElevation(String currentElevation)
Description copied from interface:ElevationSelectorIF
Sets the current elevation to the desired value- Specified by:
setSelectedElevation
in interfaceElevationSelectorIF
-
setEnabled
public void setEnabled(boolean enabled)
Description copied from interface:ElevationSelectorIF
Enables/disables the elevation selector- Specified by:
setEnabled
in interfaceElevationSelectorIF
-
getNElevations
public int getNElevations()
- Specified by:
getNElevations
in interfaceElevationSelectorIF
- Returns:
- The number of available elevations
-
getVerticalUnits
public String getVerticalUnits()
- Specified by:
getVerticalUnits
in interfaceElevationSelectorIF
- Returns:
- The units of the vertical axis
-
getSelectedElevationRange
public String getSelectedElevationRange()
Description copied from interface:ElevationSelectorIF
Gets the currently selected elevation range if applicable- Specified by:
getSelectedElevationRange
in interfaceElevationSelectorIF
-
setContinuous
public void setContinuous(boolean continuous)
Description copied from interface:ElevationSelectorIF
Sets this elevation selector to be continuous- Specified by:
setContinuous
in interfaceElevationSelectorIF
-
isContinuous
public boolean isContinuous()
- Specified by:
isContinuous
in interfaceElevationSelectorIF
- Returns:
true
if this currently represents a continuous vertical axis
-
-