Esempio n. 1
0
 /**
  * Sets a cursor style.
  *
  * @param event is an event.
  */
 protected void setCursor(Event event) {
   Element th = getTh(event);
   if (this.th != null || isOverBorder(event, th)) {
     DOM.setStyleAttribute(DOM.eventGetTarget(event), "cursor", "e-resize");
     this.currentX = getPositionX(event);
     timer.schedule(20);
   } else DOM.setStyleAttribute(DOM.eventGetTarget(event), "cursor", "");
 }
Esempio n. 2
0
  /**
   * This method interrupts resiszing.
   *
   * @param event is an event.
   */
  protected void interruptResizing(Event event) {
    int positionX = getPositionX(event);
    int positionY = getPositionY(event);
    Element thead = grid.getTHeadElement();
    int left = DOM.getAbsoluteLeft(thead);
    int top = DOM.getAbsoluteTop(thead);
    int width = getElementWidth(thead);
    int height = getElementHeight(thead);

    if (positionX < left
        || positionX > left + width
        || positionY < top
        || positionY > top + height) {
      th = null;
      timer.cancel();
    }
  }
Esempio n. 3
0
 /** This method normally stops resisng and changes column width. */
 protected void stopResizing() {
   resize();
   timer.cancel();
   th = null;
 }