Package wicketdnd

Examples of wicketdnd.DropTarget


          target.add(table);
        }
      }
    }.drag("tr"));
    table.add(new DropTarget()
    {
      @Override
      public Set<Operation> getOperations()
      {
        return dropOperations();
View Full Code Here


          target.add(tree);
        }
      }
    }.drag("span.tree-content"));
    tree.add(new DropTarget()
    {
      @Override
      public Set<Operation> getOperations()
      {
        return dropOperations();
View Full Code Here

         
          target.add(container);
        }
      }
    }.drag("span"));
    container.add(new DropTarget()
    {
      @Override
      public Set<Operation> getOperations()
      {
        return dropOperations();
View Full Code Here

          target.add(list);
        }
      }
    }.drag("div.item").initiate("span.initiate"));
    DropTarget dropTarget = new DropTarget()
    {
      @Override
      public Set<Operation> getOperations()
      {
        return dropOperations();
      }

      @Override
      public String[] getTypes()
      {
        return types();
      }

      @Override
      public void onDrop(AjaxRequestTarget target, Transfer transfer, Location location)
      {
        if (location.getComponent() == list)
        {
          foos.add(operate(transfer));
        }
        else
        {
          Foo foo = location.getModelObject();
          switch (location.getAnchor())
          {
            case TOP :
            case LEFT :
              foos.addBefore(operate(transfer), foo);
              break;
            case BOTTOM :
            case RIGHT :
              foos.addAfter(operate(transfer), foo);
              break;
            default :
              transfer.reject();
          }

          target.add(list);
        }
      }
    };
    if ("vertical".equals(id))
    {
      dropTarget.dropTopAndBottom("div.item");
    }
    else
    {
      dropTarget.dropLeftAndRight("div.item");
    }
    list.add(dropTarget);

    return list;
  }
View Full Code Here

          target.add(tabletree);
        }
      }
    }.drag("tr").initiate("span.tree-content"));
    tabletree.add(new DropTarget()
    {
      @Override
      public Set<Operation> getOperations()
      {
        return dropOperations();
View Full Code Here

          getBean(FlvRecordingDao.class).delete(rm.getObject());
        }
        target.add(trees); //FIXME add correct refresh
      }
    };
    trash.add(new WebMarkupContainer("drop-center").setOutputMarkupId(true)).add(new DropTarget(Operation.MOVE) {
      private static final long serialVersionUID = 1L;

      @Override
      public void onDrop(AjaxRequestTarget target, Transfer transfer, Location location) throws Reject {
        FlvRecording r = transfer.getData();
View Full Code Here

                transfer.setData(null);
              }
            }.drag("div"));
          }
          if (r.getFlvRecordingId() < 0 || r.isFolder()) {
            result.add(new DropTarget(Operation.MOVE) {
              private static final long serialVersionUID = 1L;

              @Override
              public void onDrop(AjaxRequestTarget target, Transfer transfer, Location location) throws Reject {
                FlvRecording p = lm.getObject();
View Full Code Here

          getBean(FlvRecordingDao.class).delete(rm.getObject());
        }
        target.add(trees); //FIXME add correct refresh
      }
    };
    trash.add(new WebMarkupContainer("drop-center").setOutputMarkupId(true)).add(new DropTarget(Operation.MOVE) {
      private static final long serialVersionUID = 1L;

      @Override
      public void onDrop(AjaxRequestTarget target, Transfer transfer, Location location) throws Reject {
        FlvRecording r = transfer.getData();
View Full Code Here

                transfer.setData(null);
              }
            }.drag("div"));
          }
          if (r.getFlvRecordingId() < 0 || r.isFolder()) {
            result.add(new DropTarget(Operation.MOVE) {
              private static final long serialVersionUID = 1L;

              @Override
              public void onDrop(AjaxRequestTarget target, Transfer transfer, Location location) throws Reject {
                FlvRecording p = lm.getObject();
View Full Code Here

          getBean(FlvRecordingDao.class).delete(rm.getObject());
        }
        target.add(trees); //FIXME add correct refresh
      }
    };
    trash.add(new WebMarkupContainer("drop-center").setOutputMarkupId(true)).add(new DropTarget(Operation.MOVE) {
      private static final long serialVersionUID = 1L;

      @Override
      public void onDrop(AjaxRequestTarget target, Transfer transfer, Location location) throws Reject {
        FlvRecording r = transfer.getData();
View Full Code Here

TOP

Related Classes of wicketdnd.DropTarget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.