Package com.google.gwt.user.client.ui.HTMLTable

Examples of com.google.gwt.user.client.ui.HTMLTable.Cell


        return gridLoaded;
    }

    @Override
    public void onClick(ClickEvent event) {
        Cell cell = grid.getCellForEvent(event);
        if (cell == null) {
            return;
        }

        selectedY = cell.getRowIndex();
        selectedX = cell.getCellIndex();
    }
View Full Code Here


      grid.setWidget(row, col, createCell(c));
      num++;
    }
    grid.addClickHandler(new ClickHandler() {
      public void onClick(final ClickEvent event) {
        Cell cell = grid.getCellForEvent(event);
        if (cell != null) {
          String color = COLORS[cell.getRowIndex() * COLS + cell.getCellIndex()];
          onColorChoose(color);
        }
      }
    });
    grid.addStyleName(style.grid());
View Full Code Here

{
   public class GridMouseHandler implements ClickHandler, MouseMoveHandler
   {
      public void onClick(ClickEvent event)
      {
         Cell cell = grid_.getCellForEvent(event) ;
         if (cell != null)
         {
            int rowClicked = cell.getRowIndex() ;
            SelectionCommitEvent.fire(CompletionList.this, items_[rowClicked]) ;
         }
      }
View Full Code Here

    if(delegate == null) throw new IllegalArgumentException("Null delegate");
    this.delegate = delegate;
  }

  public void onClick(ClickEvent event) {
    final Cell cell = table.getCellForEvent(event);
    final int row = cell.getRowIndex();
    Log.debug("RowContextPopup - onClick row: " + row);

    // account for header row and deleted rows
    if(row < 1 || table.isRowMarkedDeleted(row)) return;
View Full Code Here

    this.delegate = delegate;
  }

  @Override
  public void onClick(ClickEvent event) {
    final Cell cell = table.getCellForEvent(event);
    final int row = cell.getRowIndex();
    //Log.debug("RowContextPopup - onClick row: " + row);

    // account for header row and deleted rows
    if(row < 1 || table.isRowMarkedDeleted(row)) return;
View Full Code Here

            });
        }
    }

    private void performClickAction(@Nonnull final ClickEvent event) {
        Cell cell = table.getCellForEvent(event);
        if (cell != null) {
            int row = cell.getRowIndex();
            selectRow(row);
        }
    }
View Full Code Here

    table.setText(0, 4, Util.C.columnGroupType());
    table.setText(0, 5, Util.C.columnGroupVisibleToAll());
    table.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        final Cell cell = table.getCellForEvent(event);
        if (cell != null && cell.getCellIndex() != 1
            && getRowItem(cell.getRowIndex()) != null) {
          movePointerTo(cell.getRowIndex());
        }
      }
    });

    final FlexCellFormatter fmt = table.getFlexCellFormatter();
View Full Code Here

          .patchTableOpenUnifiedDiff()));

      table.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(final ClickEvent event) {
          final Cell cell = table.getCellForEvent(event);
          if (cell != null && cell.getRowIndex() > 0) {
            movePointerTo(cell.getRowIndex());
          }
        }
      });
      setSavePointerId(PatchTable.this.savePointerId);
    }
View Full Code Here

    }

    table.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(final ClickEvent event) {
        final Cell cell = table.getCellForEvent(event);
        if (cell == null) {
          return;
        }
        if (cell.getCellIndex() == C_STAR) {
          // Don't do anything (handled by star itself).
        } else if (cell.getCellIndex() == C_OWNER) {
          // Don't do anything.
        } else if (getRowItem(cell.getRowIndex()) != null) {
          movePointerTo(cell.getRowIndex());
        }
      }
    });
  }
View Full Code Here

    setStylePrimaryName("ui-table");
    table.setStylePrimaryName("ui-table");
    table.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        Cell eventCell = table.getCellForEvent(event);
        if(eventCell == null)
          return;
        int row = eventCell.getRowIndex();
        Element currentEventTarget = event.getNativeEvent().getCurrentEventTarget().cast();
        for(Element elt = event.getNativeEvent().getEventTarget().cast();
            elt != currentEventTarget && elt != getElement() && elt != null;
            elt = DOM.getParent(elt)) {
          if(elt.getTagName().equalsIgnoreCase("td") && elt == table.getCellFormatter().getElement(row, eventCell.getCellIndex()))
            break;
          if(elt.getTagName().equalsIgnoreCase("tr") && elt == table.getRowFormatter().getElement(row))
            break;
          if((DOM.getEventsSunk(elt) & (Event.ONCLICK|Event.ONCONTEXTMENU|Event.ONMOUSEDOWN|Event.ONMOUSEUP)) != 0) {
            // Ignore this event since it should be handled by the other element
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.HTMLTable.Cell

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.