use of com.google.gwt.event.dom.client.MouseUpHandler in project gerrit by GerritCodeReview.
the class DraftBox method initResizeHandler.
private void initResizeHandler() {
resizeTimer = new Timer() {
@Override
public void run() {
getCommentGroup().resize();
}
};
addDomHandler(new MouseMoveHandler() {
@Override
public void onMouseMove(MouseMoveEvent event) {
int h = editArea.getOffsetHeight();
if (isEdit() && h != editAreaHeight) {
getCommentGroup().resize();
resizeTimer.scheduleRepeating(50);
editAreaHeight = h;
}
}
}, MouseMoveEvent.getType());
addDomHandler(new MouseUpHandler() {
@Override
public void onMouseUp(MouseUpEvent event) {
resizeTimer.cancel();
getCommentGroup().resize();
}
}, MouseUpEvent.getType());
}
Aggregations