本文整理汇总了Java中com.google.gwt.user.client.ui.TableListener类的典型用法代码示例。如果您正苦于以下问题:Java TableListener类的具体用法?Java TableListener怎么用?Java TableListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TableListener类属于com.google.gwt.user.client.ui包,在下文中一共展示了TableListener类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SurveillanceView
import com.google.gwt.user.client.ui.TableListener; //导入依赖的package包/类
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);
}
示例2: Calendar
import com.google.gwt.user.client.ui.TableListener; //导入依赖的package包/类
/** 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");
}
示例3: addTableListener
import com.google.gwt.user.client.ui.TableListener; //导入依赖的package包/类
public void addTableListener(TableListener listener) {
this.table.addTableListener(listener);
}
示例4: addTableListener
import com.google.gwt.user.client.ui.TableListener; //导入依赖的package包/类
/**
* 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);
}
示例5: removeTableListener
import com.google.gwt.user.client.ui.TableListener; //导入依赖的package包/类
/**
* 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);
}