public class DragHandle extends Object
DragAndDropHandler
.Modifier and Type | Class and Description |
---|---|
static interface |
DragHandle.DragHandleCallback
Callback interface for the DragHandle event life cycle.
|
Constructor and Description |
---|
DragHandle(String baseName)
Creates a new DragHandle.
|
DragHandle(String baseName,
DragHandle.DragHandleCallback callback)
Creates a new DragHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
addStyleName(String styleName)
Adds CSS style name to the drag handle element.
|
void |
addTo(com.google.gwt.dom.client.Element elem)
Adds this drag handle to an HTML element.
|
com.google.gwt.dom.client.Element |
getElement()
Gets the element used as actual drag handle.
|
com.google.gwt.dom.client.Element |
getParent()
Returns the current parent element for this drag handle.
|
void |
removeFromParent()
Removes this drag handle from whatever it was attached to.
|
void |
removeStyleName(String styleName)
Removes existing style name from drag handle element.
|
void |
setCallback(DragHandle.DragHandleCallback dragHandleCallback)
Sets the user-facing drag handle callback method.
|
public DragHandle(String baseName)
baseName
- CSS style name to use for this DragHandle element. This
parameter is supplied to the constructor (rather than added
later) both to provide the "-dragged" style and to make sure
that the drag handle can be properly styled (it's otherwise
invisible)public DragHandle(String baseName, DragHandle.DragHandleCallback callback)
baseName
- CSS style name to use for this DragHandle element. This
parameter is supplied to the constructor (rather than added
later) both to provide the "-dragged" style and to make sure
that the drag handle can be properly styled (it's otherwise
invisible)callback
- Callback object allows hooking up the drag handle to the rest
of the program logicpublic void setCallback(DragHandle.DragHandleCallback dragHandleCallback)
dragHandleCallback
- the callback object to use (can be null)public com.google.gwt.dom.client.Element getParent()
public com.google.gwt.dom.client.Element getElement()
public void addTo(com.google.gwt.dom.client.Element elem)
elem
- an elementpublic void removeFromParent()
public void addStyleName(String styleName)
styleName
- a CSS style namepublic void removeStyleName(String styleName)
styleName
- a CSS style nameCopyright © 2018 Vaadin Ltd. All rights reserved.