/** * */ public void mouseDragged(MouseEvent e) { if (graphComponent.isEnabled() && isEnabled()) { Iterator<mxCellHandler> it = handlers.values().iterator(); while (it.hasNext() && !e.isConsumed()) { it.next().mouseDragged(e); } } }
/** * */ public void mouseMoved(MouseEvent e) { if (graphComponent.isEnabled() && isEnabled()) { Iterator<mxCellHandler> it = handlers.values().iterator(); while (it.hasNext() && !e.isConsumed()) { it.next().mouseMoved(e); } } }
/** * */ public void mouseMoved(MouseEvent e) { if (graphComponent.isEnabled() && isEnabled()) { Iterator<mxCellHandler> it = handlers.values().iterator(); while (it.hasNext() && !e.isConsumed()) { it.next().mouseMoved(e); } } }
/** * */ public void mouseDragged(MouseEvent e) { if (graphComponent.isEnabled() && isEnabled()) { Iterator<mxCellHandler> it = handlers.values().iterator(); while (it.hasNext() && !e.isConsumed()) { it.next().mouseDragged(e); } } }
/** * */ public void mouseReleased(MouseEvent e) { if (graphComponent.isEnabled() && isEnabled()) { Iterator<mxCellHandler> it = handlers.values().iterator(); while (it.hasNext() && !e.isConsumed()) { it.next().mouseReleased(e); } } reset(); }
/** * */ public void mouseReleased(MouseEvent e) { if (graphComponent.isEnabled() && isEnabled()) { Iterator<mxCellHandler> it = handlers.values().iterator(); while (it.hasNext() && !e.isConsumed()) { it.next().mouseReleased(e); } } reset(); }
/** * Dispatches the mousepressed event to the subhandles. This is * called from the connection handler as subhandles have precedence * over the connection handler. */ public void mousePressed(MouseEvent e) { if (graphComponent.isEnabled() && !graphComponent.isForceMarqueeEvent(e) && isEnabled()) { Iterator<mxCellHandler> it = handlers.values().iterator(); while (it.hasNext() && !e.isConsumed()) { it.next().mousePressed(e); } } }
/** * Dispatches the mousepressed event to the subhandles. This is * called from the connection handler as subhandles have precedence * over the connection handler. */ public void mousePressed(MouseEvent e) { if (graphComponent.isEnabled() && !graphComponent.isForceMarqueeEvent(e) && isEnabled()) { Iterator<mxCellHandler> it = handlers.values().iterator(); while (it.hasNext() && !e.isConsumed()) { it.next().mousePressed(e); } } }
/** * */ public void mousePressed(MouseEvent e) { if (graphComponent.isEnabled() && isEnabled() && !e.isConsumed() && isStartEvent(e)) { start(e); e.consume(); } }
/** * */ public void mousePressed(MouseEvent e) { if (graphComponent.isEnabled() && isEnabled() && !e.isConsumed() && isStartEvent(e)) { start(e); e.consume(); } }
/** * */ public void mousePressed(MouseEvent e) { if (!graphComponent.isForceMarqueeEvent(e) && !graphComponent.isPanningEvent(e) && !e.isPopupTrigger() && graphComponent.isEnabled() && isEnabled() && !e.isConsumed() && ((isHighlighting() && marker.hasValidState()) || (!isHighlighting() && bounds != null && bounds.contains(e.getPoint())))) { start(e, marker.getValidState()); e.consume(); } }
/** * */ public void mousePressed(MouseEvent e) { if (!graphComponent.isForceMarqueeEvent(e) && !graphComponent.isPanningEvent(e) && !e.isPopupTrigger() && graphComponent.isEnabled() && isEnabled() && !e.isConsumed() && ((isHighlighting() && marker.hasValidState()) || (!isHighlighting() && bounds != null && bounds.contains(e.getPoint())))) { start(e, marker.getValidState()); e.consume(); } }
public void mouseReleased(MouseEvent e) { if (isEnabled()) { if (!e.isConsumed() && isEditEvent(e)) { Object cell = getCellAt(e.getX(), e.getY(), false); if (cell != null && getGraph().isCellEditable(cell)) { startEditingAtCell(cell, e); } } else { // Other languages use focus traversal here, in Java // we explicitely stop editing after a click elsewhere stopEditing(!invokesStopCellEditing); } } }
public void mouseReleased(MouseEvent e) { if (isEnabled()) { if (!e.isConsumed() && isEditEvent(e)) { Object cell = getCellAt(e.getX(), e.getY(), false); if (cell != null && getGraph().isCellEditable(cell)) { startEditingAtCell(cell, e); } } else { // Other languages use focus traversal here, in Java // we explicitely stop editing after a click elsewhere stopEditing(!invokesStopCellEditing); } } }
@Override public void mousePressed( final MouseEvent e ) { if ( graphComponent.isEnabled() && isEnabled() && !e.isConsumed() && !graphComponent.isForceMarqueeEvent( e ) ) { cell = graphComponent.getCellAt( e.getX(), e.getY(), false ); initialCell = cell; if ( cell != null ) { if ( isSelectEnabled() && !graphComponent.getGraph().isCellSelected( cell ) ) { graphComponent.selectCellForEvent( cell, e ); cell = null; } // Starts move if the cell under the mouse is movable // and/or any // cells of the selection are movable if ( isMoveEnabled() && !e.isPopupTrigger() ) { start( e ); e.consume(); } } } }
@Override public void mousePressed( final MouseEvent e ) { if ( graphComponent.isEnabled() && isEnabled() && !e.isConsumed() && !graphComponent.isForceMarqueeEvent( e ) ) { cell = graphComponent.getCellAt( e.getX(), e.getY(), false ); initialCell = cell; if ( cell != null ) { if ( isSelectEnabled() && !graphComponent.getGraph().isCellSelected( cell ) ) { graphComponent.selectCellForEvent( cell, e ); cell = null; } // Starts move if the cell under the mouse is movable // and/or any // cells of the selection are movable if ( isMoveEnabled() && !e.isPopupTrigger() ) { start( e ); e.consume(); } } } }
/** * */ public void mouseMoved(MouseEvent e) { if (graphComponent.isEnabled() && isEnabled() && !e.isConsumed()) { Cursor cursor = getCursor(e); if (cursor != null) { graphComponent.getGraphControl().setCursor(cursor); e.consume(); } else { graphComponent.getGraphControl().setCursor(DEFAULT_CURSOR); } } }
/** * */ public void mouseMoved(MouseEvent e) { if (graphComponent.isEnabled() && isEnabled() && !e.isConsumed()) { Cursor cursor = getCursor(e); if (cursor != null) { graphComponent.getGraphControl().setCursor(cursor); e.consume(); } else { graphComponent.getGraphControl().setCursor(DEFAULT_CURSOR); } } }
/** * */ public void mouseReleased(MouseEvent e) { if (graphComponent.isEnabled() && isEnabled() && !e.isConsumed() && current != null) { mxGraph graph = graphComponent.getGraph(); double scale = graph.getView().getScale(); mxPoint tr = graph.getView().getTranslate(); current.setX(current.getX() / scale - tr.getX()); current.setY(current.getY() / scale - tr.getY()); current.setWidth(current.getWidth() / scale); current.setHeight(current.getHeight() / scale); Object cell = insertCell(current); eventSource.fireEvent(new mxEventObject(mxEvent.INSERT, "cell", cell)); e.consume(); } reset(); }
/** * */ public void mouseReleased(MouseEvent e) { if (graphComponent.isEnabled() && isEnabled() && !e.isConsumed() && current != null) { mxGraph graph = graphComponent.getGraph(); double scale = graph.getView().getScale(); mxPoint tr = graph.getView().getTranslate(); current.setX(current.getX() / scale - tr.getX()); current.setY(current.getY() / scale - tr.getY()); current.setWidth(current.getWidth() / scale); current.setHeight(current.getHeight() / scale); Object cell = insertCell(current); eventSource.fireEvent(new mxEventObject(mxEvent.INSERT, "cell", cell)); e.consume(); } reset(); }