Class CmsLocationController
- java.lang.Object
-
- org.opencms.gwt.client.ui.input.location.CmsLocationController
-
public class CmsLocationController extends java.lang.Object
The location picker controller.
-
-
Constructor Summary
Constructors Constructor Description CmsLocationController(CmsLocationPicker picker, java.lang.String configuration)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.google.gwt.core.client.JavaScriptObject
getCurrentPosition()
Return a maps API position object according the the current location value.CmsLocationValue
getLocationValue()
Returns the current location value.java.lang.String
getStringValue()
Returns the JSON string representation of the current value.protected void
onAddressChange(com.google.gwt.user.client.ui.SuggestOracle.Suggestion suggestion)
Called on address suggestion selection.protected void
onAddressChange(java.lang.String address)
Called on address value change.protected void
onCancel()
Cancels the location selection.protected void
onHeightChange(java.lang.String height)
Called on height value change.protected void
onLatitudeChange(java.lang.String latitude)
Called on latitude value change.protected void
onLongitudeChange(java.lang.String longitude)
Called on longitude value change.protected void
onModeChange(java.lang.String mode)
Called on mode value change.protected void
onOk()
Sets the selected location value.protected void
onPreviewResize()
Ensures the preview map has the right size and is centered.protected void
onTypeChange(java.lang.String type)
Called on map type change.protected void
onWidthChange(java.lang.String width)
Called on width value change.protected void
onZoomChange(java.lang.String zoom)
Called on zoom value change.void
setStringValue(java.lang.String value)
Sets the location value as string.
-
-
-
Constructor Detail
-
CmsLocationController
public CmsLocationController(CmsLocationPicker picker, java.lang.String configuration)
Constructor.- Parameters:
picker
- the picker widgetconfiguration
- the widget configuration
-
-
Method Detail
-
getLocationValue
public CmsLocationValue getLocationValue()
Returns the current location value.- Returns:
- the location value
-
getStringValue
public java.lang.String getStringValue()
Returns the JSON string representation of the current value.- Returns:
- the JSON string representation
-
setStringValue
public void setStringValue(java.lang.String value)
Sets the location value as string.- Parameters:
value
- the string representation of the location value (JSON)
-
getCurrentPosition
protected com.google.gwt.core.client.JavaScriptObject getCurrentPosition()
Return a maps API position object according the the current location value.- Returns:
- the position object
-
onAddressChange
protected void onAddressChange(java.lang.String address)
Called on address value change.- Parameters:
address
- the new address
-
onAddressChange
protected void onAddressChange(com.google.gwt.user.client.ui.SuggestOracle.Suggestion suggestion)
Called on address suggestion selection.- Parameters:
suggestion
- the selected suggestion
-
onCancel
protected void onCancel()
Cancels the location selection.
-
onHeightChange
protected void onHeightChange(java.lang.String height)
Called on height value change.- Parameters:
height
- the height
-
onLatitudeChange
protected void onLatitudeChange(java.lang.String latitude)
Called on latitude value change.- Parameters:
latitude
- the latitude
-
onLongitudeChange
protected void onLongitudeChange(java.lang.String longitude)
Called on longitude value change.- Parameters:
longitude
- the longitude
-
onModeChange
protected void onModeChange(java.lang.String mode)
Called on mode value change.- Parameters:
mode
- the mode
-
onOk
protected void onOk()
Sets the selected location value.
-
onPreviewResize
protected void onPreviewResize()
Ensures the preview map has the right size and is centered.
-
onTypeChange
protected void onTypeChange(java.lang.String type)
Called on map type change.- Parameters:
type
- the map type
-
onWidthChange
protected void onWidthChange(java.lang.String width)
Called on width value change.- Parameters:
width
- the width
-
onZoomChange
protected void onZoomChange(java.lang.String zoom)
Called on zoom value change.- Parameters:
zoom
- the zoom
-
-