Examples of WidgetArea


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

   */
  protected Widget newDragProxy(DragContext context) {
    AbsolutePanel container = new AbsolutePanel();
    container.getElement().getStyle().setProperty("overflow", "visible");

    WidgetArea draggableArea = new WidgetArea(context.draggable, null);
    for (Widget widget : context.selectedWidgets) {
      WidgetArea widgetArea = new WidgetArea(widget, null);
      Widget proxy = new SimplePanel();
      proxy.setPixelSize(widget.getOffsetWidth(), widget.getOffsetHeight());
      proxy.addStyleName(DragClientBundle.INSTANCE.css().proxy());
      container.add(proxy, widgetArea.getLeft() - draggableArea.getLeft(),
          widgetArea.getTop() - draggableArea.getTop());
    }

    return container;
  }
View Full Code Here

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

   */
  void resetCache(Panel boundaryPanel, DragContext context) {
    ArrayList<Candidate> list = new ArrayList<Candidate>();

    if (context.draggable != null) {
      WidgetArea boundaryArea = new WidgetArea(boundaryPanel, null);
      for (DropController dropController : dropControllerList) {
        Candidate candidate = new Candidate(dropController);
        Widget dropTarget = candidate.getDropTarget();
        if (DOM.isOrHasChild(context.draggable.getElement(), dropTarget.getElement())) {
          continue;
View Full Code Here

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

      Widget target = dropController.getDropTarget();
      if (!target.isAttached()) {
        throw new IllegalStateException(
            "Unattached drop target. You must call DragController#unregisterDropController for all drop targets not attached to the DOM.");
      }
      targetArea = new WidgetArea(target, null);
    }
View Full Code Here

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

    @Override
    public void onMove( DragContext context ) {
        final Location l = new CoordinateLocation( context.mouseX,
                                                   context.mouseY );
        final WidgetArea northWidgetArea = new WidgetArea( northWidget,
                                                           null );
        final WidgetArea southWidgetArea = new WidgetArea( southWidget,
                                                           null );
        final WidgetArea eastWidgetArea = new WidgetArea( eastWidget,
                                                          null );
        final WidgetArea westWidgetArea = new WidgetArea( westWidget,
                                                          null );
        final WidgetArea centreWidgetArea = new WidgetArea( centreWidget,
                                                            null );
        Position p = Position.NONE;
        if ( northWidgetArea.intersects( l ) ) {
            p = Position.NORTH;
        } else if ( southWidgetArea.intersects( l ) ) {
            p = Position.SOUTH;
        } else if ( eastWidgetArea.intersects( l ) ) {
            p = Position.EAST;
        } else if ( westWidgetArea.intersects( l ) ) {
            p = Position.WEST;
        } else if ( centreWidgetArea.intersects( l ) ) {
            p = Position.SELF;
        }
        if ( p != dropTargetPosition ) {
            dropTargetPosition = p;
            showDropTarget( context,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.