|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maryanovsky.map.client.WidgetOverlay
public class WidgetOverlay
An overlay which positions a single widget at a specified location on the map.
Field Summary | |
---|---|
static String |
ANCHOR_PROPERTY_NAME
The name of the anchor property. |
static String |
OFFSET_PROPERTY_NAME
The name of the offset property. |
Constructor Summary | |
---|---|
WidgetOverlay(Widget widget,
LatLng anchor,
PointView offset)
Creates a new WidgetOverlay which places the specified
widget at the specified offset from the specified anchor point. |
|
WidgetOverlay(Widget widget,
LatLng anchor,
PointView offset,
SizeView widgetSize)
Creates a new WidgetOverlay which places the specified
widget at the specified offset from the specified anchor point. |
Method Summary | |
---|---|
void |
added(MapWidget mapWidget)
Adds the widget to the map's overlay panel. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Registers the specified property change listener to be notified when the specified property of this overlay changes. |
Alignment |
getAlignment()
Returns the alignment of the widget relative to the location specified by the anchor and offset. |
LatLng |
getAnchor()
Returns the anchor point at which the widget is added. |
PointView |
getOffset()
Returns the current offset of the widget from the anchor point. |
Widget |
getWidget()
Returns the widget this overlay adds to the map. |
void |
makeAnchorDraggableByMouse(HasAllMouseHandlers dragHandle,
boolean updateContinuously)
Makes the overlay draggable (via the specified drag handle) using the mouse in such a way that dragging it adjusts its anchor, but not the offset. |
void |
makeAnchorDraggableByTouch(HasAllTouchHandlers dragHandle,
boolean updateContinuously)
Makes the overlay draggable (via the specified drag handle) by touch in such a way that dragging it adjusts its anchor, but not the offset. |
void |
makeNonDraggable()
Makes the overlay non-draggable. |
void |
makeOffsetDraggableByMouse(HasAllMouseHandlers dragHandle,
boolean updateContinuously)
Makes the overlay draggable (via the specified drag handle) using the mouse in such a way that dragging it adjusts the offset, but not the anchor. |
void |
makeOffsetDraggableByTouch(HasAllTouchHandlers dragHandle,
boolean updateContinuously)
Makes the overlay draggable (via the specified drag handle) by touch in such a way that dragging it adjusts the offset, but not the anchor. |
void |
removed(MapWidget mapWidget)
Removes the widget from the map's overlay panel. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Unregisters the specified property change listener from being notified when the specified property of this overlay changes. |
void |
setAlignment(Alignment alignment)
Sets the alignment of the widget relative to the location specified by the anchor and offset. |
void |
setAnchor(LatLng anchor)
Sets the anchor point at which the widget is added. |
void |
setOffset(PointView offset)
Sets the offset of the widget from the anchor point. |
void |
updated(MapWidget mapWidget,
boolean isTemporary)
Invoked when the map view changes. |
void |
updatePosition()
Updates the widget's position. |
void |
updateWidgetSize(SizeView widgetSize)
This method should be called when the widget's size changes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ANCHOR_PROPERTY_NAME
public static final String OFFSET_PROPERTY_NAME
Constructor Detail |
---|
public WidgetOverlay(Widget widget, LatLng anchor, PointView offset, SizeView widgetSize)
WidgetOverlay
which places the specified
widget at the specified offset from the specified anchor point. You may
also pass the size of the widget, which can significantly reduce up the
time it takes to add the overlay. If you pass null
for the
widgetSize
parameter, it will be determined automatically,
which, if there are many WidgetOverlay
s, may take a long time.
Additionally, if
public WidgetOverlay(Widget widget, LatLng anchor, PointView offset)
WidgetOverlay
which places the specified
widget at the specified offset from the specified anchor point.
Method Detail |
---|
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
public Widget getWidget()
public LatLng getAnchor()
public void setAnchor(LatLng anchor)
public void setOffset(PointView offset)
public PointView getOffset()
public Alignment getAlignment()
public void setAlignment(Alignment alignment)
public void updateWidgetSize(SizeView widgetSize)
null
value.
public void added(MapWidget mapWidget)
added
in interface Overlay
public void updated(MapWidget mapWidget, boolean isTemporary)
isTemporary
specifies
whether the change is temporary (such as during a drag of the map or a
pan animation) or permanent.
updated
in interface Overlay
public void updatePosition()
public void removed(MapWidget mapWidget)
removed
in interface Overlay
public void makeOffsetDraggableByMouse(HasAllMouseHandlers dragHandle, boolean updateContinuously)
updateContinuously
specifies whether the offset will be
updated as the overlay is dragged or only at the end of the drag gesture.
public void makeAnchorDraggableByMouse(HasAllMouseHandlers dragHandle, boolean updateContinuously)
updateContinuously
specifies whether the anchor will be
updated as the overlay is dragged or only at the end of the drag gesture.
public void makeOffsetDraggableByTouch(HasAllTouchHandlers dragHandle, boolean updateContinuously)
updateContinuously
specifies whether the offset will be
updated as the overlay is dragged or only at the end of the drag gesture.
public void makeAnchorDraggableByTouch(HasAllTouchHandlers dragHandle, boolean updateContinuously)
updateContinuously
specifies whether the anchor will be
updated as the overlay is dragged or only at the end of the drag gesture.
public void makeNonDraggable()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |