public class DefaultDragSession extends java.lang.Object implements DragSession
ITEM| Constructor and Description |
|---|
DefaultDragSession(com.jme3.scene.Spatial source,
com.jme3.math.Vector2f dragLocation) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
close(DragEvent event) |
<T> T |
get(java.lang.String name,
T defaultValue)
Returns an attribute previously stored in this session or the
default value if no such attribute exists.
|
Draggable |
getDraggable()
Returns the application-provided "Draggable" that is used to
display the current drag location.
|
com.jme3.math.Vector2f |
getDragLocation()
Returns the current drag location in 'cursor space', ie: the 2D
coordinate of the screen or viewport that indicates the drag location.
|
com.jme3.scene.Spatial |
getDragSource()
Returns the container Spatial upon which the drag operation was
initiated.
|
DragStatus |
getDragStatus()
Return the drop status of this drag session.
|
com.jme3.collision.CollisionResult |
getDropCollision()
Returns the current 'drop' collision information or null if
there is no current drop target.
|
com.jme3.scene.Spatial |
getDropTarget()
Returns the current drop target or null if the drag is not
currently over a drop target.
|
boolean |
hasAttribute(java.lang.String name)
Returns true if the session has the specified attribute defined.
|
void |
set(java.lang.String name,
java.lang.Object attribute)
Sets an application-specific session attribute that lives as
long as this specific drag session.
|
protected void |
setDraggable(Draggable draggable) |
void |
setDragStatus(DragStatus status)
Called by drop event handlers to indicate that a drop
target and location are valid or invalid.
|
protected void |
setDropCollision(com.jme3.collision.CollisionResult collision) |
protected void |
setDropTarget(com.jme3.scene.Spatial dropTarget,
DragEvent event) |
public DefaultDragSession(com.jme3.scene.Spatial source,
com.jme3.math.Vector2f dragLocation)
public void set(java.lang.String name,
java.lang.Object attribute)
DragSessionset in interface DragSessionpublic <T> T get(java.lang.String name,
T defaultValue)
DragSessionget in interface DragSessionpublic boolean hasAttribute(java.lang.String name)
DragSessionhasAttribute in interface DragSessionpublic com.jme3.scene.Spatial getDragSource()
DragSessiongetDragSource in interface DragSessionprotected void setDraggable(Draggable draggable)
public Draggable getDraggable()
DragSessiongetDraggable in interface DragSessionpublic void setDragStatus(DragStatus status)
DragSessionsetDragStatus in interface DragSessionpublic DragStatus getDragStatus()
DragSessiongetDragStatus in interface DragSessionprotected void close(DragEvent event)
protected void setDropTarget(com.jme3.scene.Spatial dropTarget,
DragEvent event)
public com.jme3.scene.Spatial getDropTarget()
DragSessiongetDropTarget in interface DragSessionpublic com.jme3.math.Vector2f getDragLocation()
DragSessiongetDragLocation in interface DragSessionprotected void setDropCollision(com.jme3.collision.CollisionResult collision)
public com.jme3.collision.CollisionResult getDropCollision()
DragSessiongetDropCollision in interface DragSession