Package com.ardor3d.extension.ui.event
Class FrameDragListener
java.lang.Object
com.ardor3d.extension.ui.event.FrameDragListener
- All Implemented Interfaces:
DragListener
The drag listener responsible for allowing a frame to be moved around the screen with the mouse.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
drag
(int mouseX, int mouseY) Method called when the button is still held after startDrag and the mouse has moved again.void
endDrag
(UIComponent component, int mouseX, int mouseY) Do nothing.boolean
isDragHandle
(UIComponent component, int mouseX, int mouseY) Check if we are dragging's the frames title bar label.boolean
void
startDrag
(int mouseX, int mouseY) Let the implementor know that we've accepted this as our current drag target.
-
Field Details
-
uiFrame
-
-
Constructor Details
-
FrameDragListener
-
-
Method Details
-
startDrag
public void startDrag(int mouseX, int mouseY) Description copied from interface:DragListener
Let the implementor know that we've accepted this as our current drag target. This is called by the hud if a drag action is detected and isDragHandle has returned true.- Specified by:
startDrag
in interfaceDragListener
- Parameters:
mouseX
- the x mouse coordinatemouseY
- the y mouse coordinate
-
drag
public void drag(int mouseX, int mouseY) Description copied from interface:DragListener
Method called when the button is still held after startDrag and the mouse has moved again.- Specified by:
drag
in interfaceDragListener
- Parameters:
mouseX
- the new x mouse coordinatemouseY
- the new y mouse coordinate
-
smallerThanWindow
public boolean smallerThanWindow()- Returns:
- true if this frame can be fully contained by the hud.
-
endDrag
Do nothing.- Specified by:
endDrag
in interfaceDragListener
- Parameters:
component
- the UIComponent our drag ended over.mouseX
- the x mouse coordinatemouseY
- the y mouse coordinate
-
isDragHandle
Check if we are dragging's the frames title bar label.- Specified by:
isDragHandle
in interfaceDragListener
- Parameters:
component
- the UIComponent being acted upon in a suspected drag operationmouseX
- the x mouse coordinatemouseY
- the y mouse coordinate- Returns:
- true if the given parameters describe a drag handle
-