Java Code Examples for com.google.gwt.user.client.ui.TableListener

The following are top voted examples for showing how to use com.google.gwt.user.client.ui.TableListener. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: opennmszh   File: SurveillanceDashlet.java   Source Code and License 6 votes vote down vote up
public SurveillanceView(Dashlet dashlet) {
    super(dashlet);
    m_grid.addTableListener(new TableListener() {

        public void onCellClicked(SourcesTableEvents table, int row, int col) {
            cellClicked(row, col);
            if (row == 0 && col == 0) {
                onAllClicked();
            } else if (row == 0) {
                onColumnGroupClicked(col-1);
            } else if (col == 0) {
                onRowGroupClicked(row-1);
            } else {
                onIntersectionClicked(row-1, col-1);
            }

        }

    });
    
    initWidget(m_grid);
    
}
 
Example 2
Project: OpenNMS   File: SurveillanceDashlet.java   Source Code and License 6 votes vote down vote up
public SurveillanceView(Dashlet dashlet) {
    super(dashlet);
    m_grid.addTableListener(new TableListener() {

        public void onCellClicked(SourcesTableEvents table, int row, int col) {
            cellClicked(row, col);
            if (row == 0 && col == 0) {
                onAllClicked();
            } else if (row == 0) {
                onColumnGroupClicked(col-1);
            } else if (col == 0) {
                onRowGroupClicked(row-1);
            } else {
                onIntersectionClicked(row-1, col-1);
            }

        }

    });
    
    initWidget(m_grid);
    
}
 
Example 3
Project: gwittir   File: Calendar.java   Source Code and License 5 votes vote down vote up
/** Creates a new instance of Calendar */
public Calendar() {
    this.value = this.renderDate;

    for (int i = 0; i < 7; i++) {
        grid.setWidget(0, i, new Label(Calendar.DAYS_OF_WEEK_SHORT[i]));
        grid.getCellFormatter().setStyleName(0, i, "day");
    }

    grid.setCellSpacing(0);
    grid.setCellPadding(0);
    super.initWidget(grid);

    final Calendar instance = this;
    this.grid.addTableListener(
        new TableListener() {
            public void onCellClicked(SourcesTableEvents sender, int row, int cell) {
                boolean cancelled = false;

                for (Iterator it = new ArrayList(eventListeners).iterator(); it.hasNext();) {
                    if (!((CalendarListener) it.next()).onDateClicked(instance, currentDates[row - 1][cell])) {
                        cancelled = true;

                        break;
                    }
                }

                if (!cancelled && (currentDates[row - 1][cell].getMonth() == getRenderDate().getMonth())) {
                    setValue(currentDates[row - 1][cell]);
                }
            }
        }
    );
    this.setStyleName("gwittir-Calendar");
}
 
Example 4
Project: gwittir   File: BoundTable.java   Source Code and License 4 votes vote down vote up
public void addTableListener(TableListener listener) {
    this.table.addTableListener(listener);
}
 
Example 5
Project: gwt-gantt   File: HTMLTable.java   Source Code and License 2 votes vote down vote up
/**
   * Adds a listener to the current table.
   *
   * @param listener listener to add
   * @deprecated add a click handler instead and use
   *             {@link HTMLTable#getCellForEvent(ClickEvent)} to get the cell
   *             information (remember to check for a null return value)
   */
  @Deprecated
  public void addTableListener(TableListener listener) {
//    ListenerWrapper.WrappedTableListener.add(this, listener);
  }
 
Example 6
Project: gwt-gantt   File: HTMLTable.java   Source Code and License 2 votes vote down vote up
/**
   * Removes the specified table listener.
   *
   * @param listener listener to remove
   *
   * @deprecated Use the {@link HandlerRegistration#removeHandler}
   * method on the object returned by an add*Handler method instead
   */
  @Deprecated
  public void removeTableListener(TableListener listener) {
//    ListenerWrapper.WrappedTableListener.remove(this, listener);
  }