public class DragContext
extends java.lang.Object
WorldWindow
state for use in dragging operations.Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
dragState
The current drag state, which can be one of the three following values:
AVKey.DRAG_BEGIN , AVKey.DRAG_CHANGE ,
AVKey.DRAG_ENDED . |
protected Globe |
globe
The current
Globe of the WorldWindow . |
protected java.awt.Point |
initialPoint
In accordance with the AWT screen coordinates the top left point of the window is the origin.
|
protected java.awt.Point |
point
In accordance with the AWT screen coordinates the top left point of the window is the origin.
|
protected java.awt.Point |
previousPoint
In accordance with the AWT screen coordinates the top left point of the window is the origin.
|
protected SceneController |
sceneController
The current
SceneController of the WorldWindow . |
protected View |
view
The current
View of the WorldWindow . |
Constructor and Description |
---|
DragContext()
Creates a new
DragContext instance. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDragState()
Returns the current drag state for this drag event.
|
Globe |
getGlobe()
Returns the current
Globe for this drag event. |
java.awt.Point |
getInitialPoint()
Returns the initial screen point with the origin at the top left corner of the window.
|
java.awt.Point |
getPoint()
Returns the current screen point with the origin at the top left corner of the window.
|
java.awt.Point |
getPreviousPoint()
Returns the previous screen point with the origin at the top left corner of the window.
|
SceneController |
getSceneController()
Returns the current
SceneController for this drag event. |
View |
getView()
Returns the current
View for this drag event. |
void |
setDragState(java.lang.String dragState)
Set the
DragContext drag state, which must be one of the following three states: AVKey.DRAG_BEGIN
, AVKey.DRAG_CHANGE , or AVKey.DRAG_ENDED . |
void |
setGlobe(Globe globe)
Set the
DragContext Globe . |
void |
setInitialPoint(java.awt.Point initialPoint)
Set the
DragContext initial screen point. |
void |
setPoint(java.awt.Point point)
Set the
DragContext current screen point. |
void |
setPreviousPoint(java.awt.Point previousPoint)
Set the
DragContext previous screen point. |
void |
setSceneController(SceneController sceneController)
Set the
DragContext SceneController . |
void |
setView(View view)
Set the
DragContext View . |
protected java.lang.String dragState
AVKey.DRAG_BEGIN
, AVKey.DRAG_CHANGE
,
AVKey.DRAG_ENDED
.protected Globe globe
Globe
of the WorldWindow
.protected java.awt.Point initialPoint
protected java.awt.Point point
protected java.awt.Point previousPoint
protected SceneController sceneController
SceneController
of the WorldWindow
.protected View view
View
of the WorldWindow
.public DragContext()
DragContext
instance.public java.lang.String getDragState()
public Globe getGlobe()
Globe
for this drag event.Globe
.public java.awt.Point getInitialPoint()
public java.awt.Point getPoint()
public java.awt.Point getPreviousPoint()
public SceneController getSceneController()
SceneController
for this drag event.SceneController
.public View getView()
View
for this drag event.View
.public void setDragState(java.lang.String dragState)
DragContext
drag state, which must be one of the following three states: AVKey.DRAG_BEGIN
, AVKey.DRAG_CHANGE
, or AVKey.DRAG_ENDED
.dragState
- the drag state to assign to the DragContext
.java.lang.IllegalArgumentException
- if the drag state is null or not one of the three states defined for dragging.public void setGlobe(Globe globe)
DragContext
Globe
.globe
- the Globe
to assign to the DragContext
.java.lang.IllegalArgumentException
- if the globe is null.public void setInitialPoint(java.awt.Point initialPoint)
DragContext
initial screen point.initialPoint
- the screen point to assign to the initial screen point.java.lang.IllegalArgumentException
- if the initialPoint is null.public void setPoint(java.awt.Point point)
DragContext
current screen point.point
- the point to assign to the current screen point.java.lang.IllegalArgumentException
- if the point is null.public void setPreviousPoint(java.awt.Point previousPoint)
DragContext
previous screen point.previousPoint
- the screen point to assign to the previous screen point.java.lang.IllegalArgumentException
- if the previousPoint is null.public void setSceneController(SceneController sceneController)
DragContext
SceneController
.sceneController
- the SceneController
to assign to the DragContext
.java.lang.IllegalArgumentException
- if the scene controller is null.public void setView(View view)
DragContext
View
.view
- the View
to assign to the DragContext
.java.lang.IllegalArgumentException
- if the view is null.