de.lessvoid.nifty.examples.dragndrop
Class DragDropScreen

java.lang.Object
  extended by de.lessvoid.nifty.examples.dragndrop.DragDropScreen
All Implemented Interfaces:
NiftyExample, ScreenController

public class DragDropScreen
extends Object
implements ScreenController, NiftyExample


Constructor Summary
DragDropScreen()
           
 
Method Summary
 void bind(Nifty nifty, Screen screen)
           
 String getMainXML()
          The resource path of the XML file that is supposed to be load for the example.
 String getStartScreen()
          The start screen that is supposed to be load initial.
 String getTitle()
          The title of this demonstration example.
 void onAnyWindowClose(String id, WindowClosedEvent event)
           
 void onEndScreen()
           
 void onStartScreen()
           
 void onTrashDrop(String id, DroppableDroppedEvent event)
          Called when something is dropped on the Trash.
 void prepareStart(Nifty nifty)
          This function is called right before the example itself is executed.
 void quit()
          quit method called from the dragndrop.xml.
 void showDragCancelStatus(String id, DraggableDragCanceledEvent event)
          Called for all Draggables when the Drag operation stops.
 void showDragStartStatus(String id, DraggableDragStartedEvent event)
          Called for all Draggables when the Drag operation starts.
 void showDropStatus(String id, DroppableDroppedEvent event)
          Called for all Dropables when something is dropped on them.
 void spawnDraggable()
           
 void spawnWindow()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DragDropScreen

public DragDropScreen()
Method Detail

bind

public void bind(Nifty nifty,
                 Screen screen)
Specified by:
bind in interface ScreenController

onStartScreen

public void onStartScreen()
Specified by:
onStartScreen in interface ScreenController

onEndScreen

public void onEndScreen()
Specified by:
onEndScreen in interface ScreenController

quit

public final void quit()
quit method called from the dragndrop.xml.


spawnDraggable

public void spawnDraggable()

spawnWindow

public void spawnWindow()

onAnyWindowClose

public void onAnyWindowClose(String id,
                             WindowClosedEvent event)

showDragStartStatus

public void showDragStartStatus(String id,
                                DraggableDragStartedEvent event)
Called for all Draggables when the Drag operation starts.

Parameters:
event - the DraggableDragStartedEvent

showDragCancelStatus

public void showDragCancelStatus(String id,
                                 DraggableDragCanceledEvent event)
Called for all Draggables when the Drag operation stops.

Parameters:
event - the DraggableDragCanceledEvent

showDropStatus

public void showDropStatus(String id,
                           DroppableDroppedEvent event)
Called for all Dropables when something is dropped on them.

Parameters:
event - the DropableDroppedEvent

onTrashDrop

public void onTrashDrop(String id,
                        DroppableDroppedEvent event)
Called when something is dropped on the Trash.

Parameters:
event - the DropableDroppedEvent

getStartScreen

public String getStartScreen()
Description copied from interface: NiftyExample
The start screen that is supposed to be load initial.

Specified by:
getStartScreen in interface NiftyExample
Returns:
the name of the start screen

getMainXML

public String getMainXML()
Description copied from interface: NiftyExample
The resource path of the XML file that is supposed to be load for the example.

Specified by:
getMainXML in interface NiftyExample
Returns:
the resource path to the main XML or null in case no XML file is supposed to be load

getTitle

public String getTitle()
Description copied from interface: NiftyExample
The title of this demonstration example.

Specified by:
getTitle in interface NiftyExample
Returns:
the title of this example

prepareStart

public void prepareStart(Nifty nifty)
Description copied from interface: NiftyExample
This function is called right before the example itself is executed. In case building or changing the GUI before its displayed is required: This is the place.

Specified by:
prepareStart in interface NiftyExample
Parameters:
nifty - the used instance of the Nifty-GUI


Copyright © 2012. All Rights Reserved.