ClickEvent
// In my constructor.
selectionModel = new SingleSelectionModel<LightOwner>();
display.getOwnerTable().setSelectionModel(selectionModel);
// In the function I use for setting up all event handling.
getSelectedObject();
if (selected != null) {
History.newItem("edit-owner/"+selected.getId());
}
}
});
// In the function I use for setting up all event handling.
selectionModel.addSelectionChangeHandler(new
SelectionChangeEvent.Handler() {
public void onSelectionChange(SelectionChangeEvent event) {
LightOwner selected = selectionModel.SelectionChangeEvent.Handler() {
public void onSelectionChange(
if (selected != null) {
}
}
});
DoubleClickEvent
SingleSelectionModel<T> selectionModel = new SingleSelectionModel<T>();
cellTable.setSelectionModel(selectionModel);
cellTable.addDomHandler(new DoubleClickHandler() {
@Override
public void onDoubleClick(final DoubleClickEvent event) {
T selected = selectionModel
.getSelectedObject();
if (selected != null) {
//DO YOUR STUFF
}
}
},
DoubleClickEvent.getType());
'GWT' 카테고리의 다른 글
Widget에 마우스 포인터 변경하기 (0) | 2014.06.27 |
---|---|
Java to JavaScrip with jsni using JSON (0) | 2014.02.25 |
Right Click Event (0) | 2013.10.16 |
[GWT] Open with Designer 로 열때 에러 날때... (0) | 2013.07.10 |