info.magnolia.ui.workbench.tree.drop
Class AlwaysTrueDropConstraint

java.lang.Object
  extended by info.magnolia.ui.workbench.tree.drop.AlwaysTrueDropConstraint
All Implemented Interfaces:
DropConstraint

public class AlwaysTrueDropConstraint
extends Object
implements DropConstraint

Basic implementation of DropConstraint. Return Always true.


Constructor Summary
AlwaysTrueDropConstraint()
           
 
Method Summary
 boolean allowedAfter(com.vaadin.data.Item sourceItem, com.vaadin.data.Item targetItem)
           
 boolean allowedAsChild(com.vaadin.data.Item sourceItem, com.vaadin.data.Item targetItem)
           
 boolean allowedBefore(com.vaadin.data.Item sourceItem, com.vaadin.data.Item targetItem)
           
 boolean allowedToMove(com.vaadin.data.Item sourceItem)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlwaysTrueDropConstraint

public AlwaysTrueDropConstraint()
Method Detail

allowedAsChild

public boolean allowedAsChild(com.vaadin.data.Item sourceItem,
                              com.vaadin.data.Item targetItem)
Specified by:
allowedAsChild in interface DropConstraint
Parameters:
sourceItem - Moved Item.
targetItem - Target Item .
Returns:
true if the sourceItem is allowed to be set as a child of targetItem.
false otherwise.

allowedBefore

public boolean allowedBefore(com.vaadin.data.Item sourceItem,
                             com.vaadin.data.Item targetItem)
Specified by:
allowedBefore in interface DropConstraint
Parameters:
sourceItem - Moved Item.
targetItem - Target Item .
Returns:
true if the sourceItem is allowed to be put before the targetItem.
false otherwise.

allowedAfter

public boolean allowedAfter(com.vaadin.data.Item sourceItem,
                            com.vaadin.data.Item targetItem)
Specified by:
allowedAfter in interface DropConstraint
Parameters:
sourceItem - Moved Item.
targetItem - Target Item .
Returns:
true if the sourceItem is allowed to be put after the targetItem.
false otherwise.

allowedToMove

public boolean allowedToMove(com.vaadin.data.Item sourceItem)
Specified by:
allowedToMove in interface DropConstraint
Returns:
true if the Item is allowed to be moved
false otherwise.


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.