Package com.allen_sauer.gwt.dnd.client.util

Examples of com.allen_sauer.gwt.dnd.client.util.CoordinateLocation


  @Override
  public void onEnter(DragContext context) {
    super.onEnter(context);
    positioner = newPositioner(context);
    int targetIndex = DOMUtil.findIntersect(dropTarget, new CoordinateLocation(context.mouseX,
        context.mouseY), getLocationWidgetComparator());
    dropTarget.insert(positioner, targetIndex);
  }
View Full Code Here


  }

  @Override
  public void onMove(DragContext context) {
    super.onMove(context);
    int targetIndex = DOMUtil.findIntersect(dropTarget, new CoordinateLocation(context.mouseX,
        context.mouseY), getLocationWidgetComparator());

    // check that positioner not already in the correct location
    int positionerIndex = dropTarget.getWidgetIndex(positioner);
View Full Code Here

     * @param y offset top relative to document body
     * @return a drop controller for the intersecting drop target or <code>null</code> if none are
     *         applicable
     */
    DropController getIntersectDropController(int x, int y) {
      Location location = new CoordinateLocation(x, y);
      for (int i = sortedCandidates.length - 1; i >= 0; i--) {
        Candidate candidate = sortedCandidates[i];
        Area targetArea = candidate.getTargetArea();
        if (targetArea.intersects(location)) {
          return candidate.getDropController();
View Full Code Here

      int draggableAbsoluteLeft = context.draggable.getAbsoluteLeft();
      int draggableAbsoluteTop = context.draggable.getAbsoluteTop();
      HashMap<Widget, CoordinateLocation> widgetLocation = new HashMap<Widget, CoordinateLocation>();
      for (Widget widget : context.selectedWidgets) {
        widgetLocation.put(widget, new CoordinateLocation(widget.getAbsoluteLeft(),
            widget.getAbsoluteTop()));
      }

      context.dropController = getIntersectDropController(context.mouseX, context.mouseY);
      if (context.dropController != null) {
View Full Code Here

      int draggableAbsoluteLeft = context.draggable.getAbsoluteLeft();
      int draggableAbsoluteTop = context.draggable.getAbsoluteTop();
      HashMap<Widget, CoordinateLocation> widgetLocation = new HashMap<Widget, CoordinateLocation>();
      for (Widget widget : context.selectedWidgets) {
        widgetLocation.put(widget, new CoordinateLocation(widget.getAbsoluteLeft(),
            widget.getAbsoluteTop()));
      }

      context.dropController = getIntersectDropController(context.mouseX, context.mouseY);
      if (context.dropController != null) {
View Full Code Here

   * @param y offset top relative to document body
   * @return a drop controller for the intersecting drop target or <code>null</code> if none are
   *         applicable
   */
  DropController getIntersectDropController(int x, int y) {
    Location location = new CoordinateLocation(x, y);
    for (int i = sortedCandidates.length - 1; i >= 0; i--) {
      Candidate candidate = sortedCandidates[i];
      if (DOMUtil.DEBUG) {
        DOMUtil.debugWidgetWithColor(candidate.getDropTarget(), "blue");
      }
View Full Code Here

   * @param y offset top relative to document body
   * @return a drop controller for the intersecting drop target or <code>null</code> if none
   *         are applicable
   */
  DropController getIntersectDropController(int x, int y) {
    Location location = new CoordinateLocation(x, y);
    for (int i = sortedCandidates.length - 1; i >= 0; i--) {
      Candidate candidate = sortedCandidates[i];
      Area targetArea = candidate.getTargetArea();
      if (targetArea.intersects(location)) {
        return candidate.getDropController();
View Full Code Here

      int draggableAbsoluteLeft = context.draggable.getAbsoluteLeft();
      int draggableAbsoluteTop = context.draggable.getAbsoluteTop();
      HashMap<Widget, CoordinateLocation> widgetLocation = new HashMap<Widget, CoordinateLocation>();
      for (Widget widget : context.selectedWidgets) {
        widgetLocation.put(widget, new CoordinateLocation(widget.getAbsoluteLeft(),
            widget.getAbsoluteTop()));
      }

      context.dropController = getIntersectDropController(context.mouseX, context.mouseY);
      if (context.dropController != null) {
View Full Code Here

  @Override
  public void onEnter(DragContext context) {
    super.onEnter(context);
    positioner = newPositioner(context);
    int targetIndex = DOMUtil.findIntersect(dropTarget, new CoordinateLocation(context.mouseX,
        context.mouseY), getLocationWidgetComparator());
    insert(positioner, targetIndex);
  }
View Full Code Here

  }

  @Override
  public void onMove(DragContext context) {
    super.onMove(context);
    int targetIndex = DOMUtil.findIntersect(dropTarget, new CoordinateLocation(context.mouseX,
        context.mouseY), getLocationWidgetComparator());

    // check that positioner not already in the correct location
    int positionerIndex = dropTarget.getWidgetIndex(positioner);
View Full Code Here

TOP

Related Classes of com.allen_sauer.gwt.dnd.client.util.CoordinateLocation

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.