de.lessvoid.nifty.controls.dragndrop
Class DroppableControl

java.lang.Object
  extended by de.lessvoid.nifty.controls.AbstractController
      extended by de.lessvoid.nifty.controls.dragndrop.DroppableControl
All Implemented Interfaces:
Controller, Droppable, NiftyControl

public class DroppableControl
extends AbstractController
implements Droppable


Constructor Summary
DroppableControl()
           
 
Method Summary
protected  boolean accept(DroppableControl source, DraggableControl draggable)
           
 void addFilter(DroppableDropFilter filter)
          Add the given filter to this Droppable.
 void bind(Nifty nifty, Screen screen, Element element, Properties parameter, Attributes controlDefinitionAttributes)
           
protected  void drop(DraggableControl droppedDraggable, EndNotify endNotify)
           
 DraggableControl getDraggable()
           
 boolean inputEvent(NiftyInputEvent inputEvent)
           
 void onStartScreen()
           
 void removeAllFilters()
          Remove all Filters.
 void removeFilter(DroppableDropFilter filter)
          Remove the given filter.
 
Methods inherited from class de.lessvoid.nifty.controls.AbstractController
bind, disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, init, isBound, isEnabled, layoutCallback, onFocus, setEnabled, setFocus, setFocusable, setHeight, setId, setStyle, setWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lessvoid.nifty.controls.NiftyControl
disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, layoutCallback, setEnabled, setFocus, setFocusable, setHeight, setId, setStyle, setWidth
 

Constructor Detail

DroppableControl

public DroppableControl()
Method Detail

bind

public void bind(Nifty nifty,
                 Screen screen,
                 Element element,
                 Properties parameter,
                 Attributes controlDefinitionAttributes)
Specified by:
bind in interface Controller

onStartScreen

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

inputEvent

public boolean inputEvent(NiftyInputEvent inputEvent)
Specified by:
inputEvent in interface Controller

drop

protected void drop(DraggableControl droppedDraggable,
                    EndNotify endNotify)

getDraggable

public DraggableControl getDraggable()

addFilter

public void addFilter(DroppableDropFilter filter)
Description copied from interface: Droppable
Add the given filter to this Droppable. A DroppableDropFilter will be asked if a certain Draggable is able to be dropped on this Droppable.

Specified by:
addFilter in interface Droppable
Parameters:
filter - the filter

removeFilter

public void removeFilter(DroppableDropFilter filter)
Description copied from interface: Droppable
Remove the given filter.

Specified by:
removeFilter in interface Droppable
Parameters:
filter - the filter to be removed

removeAllFilters

public void removeAllFilters()
Description copied from interface: Droppable
Remove all Filters.

Specified by:
removeAllFilters in interface Droppable

accept

protected boolean accept(DroppableControl source,
                         DraggableControl draggable)


Copyright © 2011. All Rights Reserved.