public HandlerRegistration addMouseDownHandler(MouseDownHandler handler) { return html.addMouseDownHandler(handler); }
public HandlerRegistration addMouseDownHandler(MouseDownHandler handler) { return html.addMouseDownHandler(handler); }
handle.getElement().getStyle().setCursor(cursor); handle.addMouseDownHandler(new MouseDownHandler() {
/** * Append draggable background for the selection area */ private HTML appendDraggableBackground() { final HTML backgroundHandle = new HTML(); backgroundHandle.setWidth(this.nInnerWidth + "px"); backgroundHandle.setHeight(this.nInnerHeight + "px"); backgroundHandle.getElement().getStyle().setCursor(Cursor.MOVE); backgroundHandle.addStyleName(this.bundleResources.css().selectionDraggableBackground()); backgroundHandle.addMouseDownHandler(new MouseDownHandler() { public void onMouseDown(MouseDownEvent event) { isDown = true; action = Constants.DRAG_BACKGROUND; } }); backgroundHandle.addTouchStartHandler(new TouchStartHandler() { public void onTouchStart(TouchStartEvent event) { isDown = true; action = Constants.DRAG_BACKGROUND; } }); this.handlesContainer.add(backgroundHandle, 0, 0); return backgroundHandle; }
/*************************************** * Creates a new instance. * * @param sTitle The column title * @param nIndex The index of this instance in the table */ ColumnHeader(String sTitle, int nIndex) { this.nColumnIndex = nIndex; FlowPanel aTitlePanel = new FlowPanel(); aTitleLabel = new Label(sTitle); aResizer = new HTML(); aSortIndicator = new Image(); aSortIndicator.addStyleName(GwtTable.CSS.ewtSortIndicator()); aResizer.setHTML(" "); aResizer.addStyleName(GwtTable.CSS.ewtResizer()); aResizer.addDoubleClickHandler(this); aResizer.addMouseDownHandler(this); if (nIndex > 0) { aTitlePanel.add(aResizer); } aTitlePanel.add(aSortIndicator); aTitlePanel.add(aTitleLabel); initWidget(aTitlePanel); setSortIndicator(null); }