Package gwtquery.plugins.draggable.client

Examples of gwtquery.plugins.draggable.client.DraggableOptions


   * Constructor wrapping a existing widget.
   *
   * @param w the widget that you want to make draggable
   */
  public DraggableWidget(T w) {
    this(w, new DraggableOptions(), DraggableOptions.DEFAULT_SCOPE);
  }
View Full Code Here


   * @param scope Used to group sets of draggable and droppable Widget, in addition
   *              to droppable's accept option. A draggable with the same scope
   *              value as a droppable will be accepted.
   */
  public DraggableWidget(T w, String scope) {
    this(w, new DraggableOptions(), scope);
  }
View Full Code Here

   * <p/>
   * As {@link DraggableWidget} extends {@link Composite}, don't forget to call
   * {@link #initWidget(Widget)} method !
   */
  protected DraggableWidget() {
    this.options = new DraggableOptions();

  }
View Full Code Here

  public boolean hasToBeExecuted(DraggableOptions options) {
    return options.isScroll();
  }

  public void onDrag(DraggableHandler handler, DragContext ctx, GqEvent e) {
    DraggableOptions options = handler.getOptions();
    Element draggableElement = ctx.getDraggable();
    GQuery scrollParent = handler.getHelperScrollParent();
    Element scrollParentElement = scrollParent.get(0);
    if (scrollParentElement == null) {
      return;
    }

    AxisOption axis = options.getAxis();
    Offset overflowOffset = $(draggableElement).data(OVERFLOW_OFFSET_KEY,
        Offset.class);
    int scrollSensitivity = options.getScrollSensitivity();
    int scrollSpeed = options.getScrollSpeed();

    boolean scrolled = false;

    if (scrollParentElement != null
        && scrollParentElement != $(GQuery.document).get(0)
View Full Code Here

TOP

Related Classes of gwtquery.plugins.draggable.client.DraggableOptions

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.