public class TreeViewDropHandler extends Object implements MoveHandler, com.vaadin.event.dd.DropHandler
DropHandler
for moving JCR nodes and properties in trees, with Drag and Drop.
Additionally, the dropping conditions can be restricted, by implementing a DropConstraint
and configuring it in the WorkbenchDefinition
.
Constructor and Description |
---|
TreeViewDropHandler() |
TreeViewDropHandler(com.vaadin.v7.ui.TreeTable tree,
DropConstraint constraint) |
Modifier and Type | Method and Description |
---|---|
com.vaadin.event.dd.DropHandler |
asDropHandler() |
boolean |
basicMoveCheck(javax.jcr.Item source,
javax.jcr.Item target)
Performs check for moving items.
|
void |
drop(com.vaadin.event.dd.DragAndDropEvent dropEvent) |
com.vaadin.event.dd.acceptcriteria.AcceptCriterion |
getAcceptCriterion()
Accept dragged Elements.
|
boolean |
moveItem(com.vaadin.v7.data.Item source,
com.vaadin.v7.data.Item target,
MoveLocation location)
Performs move of the source node or property into target node or next to target node depending on the value of MoveLocation.
|
void |
moveNode(javax.jcr.Node nodeToMove,
javax.jcr.Node newParent,
MoveLocation location)
Performs move of the source node into target node or next to target node depending on the value of MoveLocation.
|
public TreeViewDropHandler()
public TreeViewDropHandler(com.vaadin.v7.ui.TreeTable tree, DropConstraint constraint)
public void drop(com.vaadin.event.dd.DragAndDropEvent dropEvent)
drop
in interface com.vaadin.event.dd.DropHandler
public com.vaadin.event.dd.acceptcriteria.AcceptCriterion getAcceptCriterion()
getAcceptCriterion
in interface com.vaadin.event.dd.DropHandler
public boolean basicMoveCheck(javax.jcr.Item source, javax.jcr.Item target)
public void moveNode(javax.jcr.Node nodeToMove, javax.jcr.Node newParent, MoveLocation location) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public boolean moveItem(com.vaadin.v7.data.Item source, com.vaadin.v7.data.Item target, MoveLocation location)
moveItem
in interface MoveHandler
public com.vaadin.event.dd.DropHandler asDropHandler()
asDropHandler
in interface MoveHandler
Copyright © 2018 Magnolia International Ltd.. All rights reserved.