|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
com.maryanovsky.map.client.MapWidget
com.maryanovsky.map.client.widgets.overview.OverviewMapWidget
public class OverviewMapWidget
A MapWidget
which displays an overview map for a certain other
MapWidget
.
The style name of this widget is map-OverviewMapWidget
. The
rectangle that displays the bounds of the main map consists of 3 elements
placed into each other - outer, middle and inner one. Their style names are
map-OverviewMapWidgetRectOuter
,
map-OverviewMapWidgetRectMiddle
and
map-OverviewMapWidgetRectInner
respectively.
In order to properly use this widget's default look, you need to import the
"widgets/overview/overview.css" file into the page's CSS.
Nested Class Summary | |
---|---|
static class |
OverviewMapWidget.StandardSynchronization
The most commonly used implementation of OverviewMapWidget.Synchronization. |
static interface |
OverviewMapWidget.Synchronization
The interface to implement when you want to decide on a custom relationship between the location of a main map widget and its overview. |
Nested classes/interfaces inherited from class com.maryanovsky.map.client.MapWidget |
---|
MapWidget.MapAnimation |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.maryanovsky.map.client.MapWidget |
---|
MAGNIFICATION_PROPERTY_NAME, MAP_PROPERTY_NAME, SIZE_PROPERTY_NAME, TEMPORARY_OFFSET_PROPERTY_NAME |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
OverviewMapWidget(MapWidget mainMapWidget,
OverviewMapWidget.Synchronization synchronization)
Creates a new OverviewMapWidget for the specified main map
widget and OverviewMapWidget.Synchronization between them. |
Method Summary | |
---|---|
protected Widget |
createBoundsWidget()
Creates the widget to display the display bounds of the main map widget on the overview widget. |
protected Widget |
getBoundsWidget()
Returns the widget displaying the bounds of the main map on this overview map; null if none. |
MapWidget |
getMainMapWidget()
Returns the main map widget whose overview this widget displays. |
protected LatLng |
getPinnedBoundsWidgetLocation()
Returns the location of the bounds widget when it is pinned; null otherwise. |
protected boolean |
isBoundsWidgetDragged()
Returns whether the bounds widget is currently being dragged. |
protected void |
replaceBoundsWidget()
Replaces the current boundsWidget , if any, with a new one,
as created by createBoundsWidget(). |
protected void |
setBoundsWidgetDragged(boolean isBoundsWidgetDragged)
Tells the overview map widget whether its bounds widget it being dragged. |
protected void |
setPinnedBoundsWidgetLocation(LatLng location)
Pins the bounds widget to the specified location, or unpins it if the argument is null . |
protected void |
updateBoundsWidget()
Updates the current boundsWidget to accurately reflect the
bounds of the main map widget display. |
Methods inherited from class com.google.gwt.user.client.ui.Composite |
---|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget |
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, isOrWasAttached, removeFromParent, setLayoutData, sinkEvents |
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, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OverviewMapWidget(MapWidget mainMapWidget, OverviewMapWidget.Synchronization synchronization)
OverviewMapWidget
for the specified main map
widget and OverviewMapWidget.Synchronization between them.
mainMapWidget
- The main map widget with which we are linked.synchronization
- The synchronization between the main and overview
map widgets.Method Detail |
---|
public final MapWidget getMainMapWidget()
protected final void setPinnedBoundsWidgetLocation(LatLng location)
null
. This allows forcing it to a location other
than the one displayed by the main widget, when such a thing is necessary
(usually temporarily, during certain animations).
protected final LatLng getPinnedBoundsWidgetLocation()
null
otherwise. It is up to
updateBoundsWidget() to check whether the bounds
widget is pinned and set its location appropriately.
protected final void setBoundsWidgetDragged(boolean isBoundsWidgetDragged)
protected boolean isBoundsWidgetDragged()
protected final Widget getBoundsWidget()
null
if none.
protected void replaceBoundsWidget()
boundsWidget
, if any, with a new one,
as created by createBoundsWidget().
protected Widget createBoundsWidget()
null
for none. This method
may be invoked (by replaceBoundsWidget() more than once,
such as when the projection of one of the map(s) changes.
protected void updateBoundsWidget()
boundsWidget
to accurately reflect the
bounds of the main map widget display. See also
getPinnedBoundsWidgetLocation() and
isBoundsWidgetDragged() for special circumstances when the
bounds widget may not necessarily reflect the bounds of the main map
widget.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |