|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.core.client.JavaScriptObject
com.google.gwt.maps.client.DraggableObject
public class DraggableObject
This class makes a DOM element draggable. The static members for changing the drag cursors affect all subsequently created draggable objects, such as the map, zoom control slider, and overview map rectangles. The per-instance members affect only their particular instance. For example, before creating the map, you can call DraggableObject.setDraggableCursorDefault('default') and DraggableObject.setDraggingCursorDefault('move') to get the pre-API 2.56 style. Alternatively, the Map constructor can take options to set its DraggableObject's cursor style. See the W3C CSS specification for allowable cursor values.
Constructor Summary | |
---|---|
protected |
DraggableObject()
|
Method Summary | |
---|---|
static java.lang.String |
getDraggableCursorDefault()
Returns the current dragging cursor in use by the map. |
static java.lang.String |
getDraggingCursorDefault()
Returns the current draggable cursor in use by the map. |
void |
moveBy(Point point)
Moves the DraggableObject by a given size offset. |
void |
moveTo(Point point)
Moves the GDraggableObject to a given absolute position. |
static DraggableObject |
newInstance(com.google.gwt.dom.client.Element element)
Sets up event handlers so that the source element can be dragged. |
static DraggableObject |
newInstance(com.google.gwt.dom.client.Element element,
DraggableObjectOptions options)
Sets up event handlers so that the source element can be dragged. |
void |
setDraggableCursor(java.lang.String cursor)
Sets the cursor when the mouse is over this draggable object. |
static void |
setDraggableCursorDefault(java.lang.String cursor)
Sets the draggable cursor for subsequently created draggable objects. |
void |
setDraggingCursor(java.lang.String cursor)
Sets the cursor when the mouse is held down, dragging this draggable object. |
static void |
setDraggingCursorDefault(java.lang.String cursor)
Sets the dragging cursor for subsequently created draggable objects. |
Methods inherited from class com.google.gwt.core.client.JavaScriptObject |
---|
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected DraggableObject()
Method Detail |
---|
public static java.lang.String getDraggableCursorDefault()
public static java.lang.String getDraggingCursorDefault()
public static final DraggableObject newInstance(com.google.gwt.dom.client.Element element)
element
- the element to turn into a draggable object.public static final DraggableObject newInstance(com.google.gwt.dom.client.Element element, DraggableObjectOptions options)
element
- the element to turn into a draggable object.options
- optional parameters.public static void setDraggableCursorDefault(java.lang.String cursor)
cursor
- the draggable cursor for subsequently created draggable
objects.public static void setDraggingCursorDefault(java.lang.String cursor)
cursor
- the dragging cursor for subsequently created draggable
objects.public final void moveBy(Point point)
point
- offset to move object.public final void moveTo(Point point)
point
- absolute position to move to.public final void setDraggableCursor(java.lang.String cursor)
cursor
- CSS specification of cursor type.public final void setDraggingCursor(java.lang.String cursor)
cursor
- CSS specification of cursor type.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |