/** * * @param x * @param y * @param hitSwimlaneContent * @return Returns the cell at the given location. */ public Object getCellAt(int x, int y, boolean hitSwimlaneContent) { return getCellAt(x, y, hitSwimlaneContent, null); }
/** * * @param x * @param y * @return Returns the cell at the given location. */ public Object getCellAt(int x, int y) { return getCellAt(x, y, true); }
/** * * @param x * @param y * @return Returns the cell at the given location. */ public Object getCellAt(int x, int y) { return getCellAt(x, y, true); }
/** * * @param x * @param y * @param hitSwimlaneContent * @return Returns the cell at the given location. */ public Object getCellAt(int x, int y, boolean hitSwimlaneContent) { return getCellAt(x, y, hitSwimlaneContent, null); }
/** * Returns the state at the given location. This uses mxGraph.getCellAt. */ protected Object getCell(MouseEvent e) { return graphComponent.getCellAt(e.getX(), e.getY(), swimlaneContentEnabled); }
/** * Returns the state at the given location. This uses mxGraph.getCellAt. */ protected Object getCell(MouseEvent e) { return graphComponent.getCellAt(e.getX(), e.getY(), swimlaneContentEnabled); }
/** * */ protected Cursor getCursor(MouseEvent e) { Cursor cursor = null; if (isMoveEnabled()) { Object cell = graphComponent.getCellAt(e.getX(), e.getY(), false); if (cell != null) { if (graphComponent.isFoldingEnabled() && graphComponent.hitFoldingIcon(cell, e.getX(), e.getY())) { cursor = FOLD_CURSOR; } else if (graphComponent.getGraph().isCellMovable(cell)) { cursor = MOVE_CURSOR; } } } return cursor; }
/** * */ protected Cursor getCursor(MouseEvent e) { Cursor cursor = null; if (isMoveEnabled()) { Object cell = graphComponent.getCellAt(e.getX(), e.getY(), false); if (cell != null) { if (graphComponent.isFoldingEnabled() && graphComponent.hitFoldingIcon(cell, e.getX(), e.getY())) { cursor = FOLD_CURSOR; } else if (graphComponent.getGraph().isCellMovable(cell)) { cursor = MOVE_CURSOR; } } } return cursor; }
/** * */ public String getToolTipText(MouseEvent e) { String tip = getSelectionCellsHandler().getToolTipText(e); if (tip == null) { Object cell = getCellAt(e.getX(), e.getY()); if (cell != null) { if (hitFoldingIcon(cell, e.getX(), e.getY())) { tip = mxResources.get("collapse-expand"); } else { tip = graph.getToolTipForCell(cell); } } } if (tip != null && tip.length() > 0) { return tip; } return super.getToolTipText(e); }
/** * */ public String getToolTipText(MouseEvent e) { String tip = getSelectionCellsHandler().getToolTipText(e); if (tip == null) { Object cell = getCellAt(e.getX(), e.getY()); if (cell != null) { if (hitFoldingIcon(cell, e.getX(), e.getY())) { tip = mxResources.get("collapse-expand"); } else { tip = graph.getToolTipForCell(cell); } } } if (tip != null && tip.length() > 0) { return tip; } return super.getToolTipText(e); }
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(); } } } }
&& !graphComponent.isForceMarqueeEvent(e)) cell = graphComponent.getCellAt(e.getX(), e.getY(), false); initialCell = cell;
&& !graphComponent.isForceMarqueeEvent(e)) cell = graphComponent.getCellAt(e.getX(), e.getY(), false); initialCell = cell;
public void mousePressed(MouseEvent e) Object cell = graphComponent.getCellAt(e.getX(), e.getY()); if (cell instanceof mxCell)
&& !graphComponent.isForceMarqueeEvent(e)) cell = graphComponent.getCellAt(e.getX(), e.getY(), false);
/** * Returns the drop target for the given transferable and location. */ protected Object getDropTarget(mxGraphComponent graphComponent, mxGraphTransferable gt) { Object[] cells = gt.getCells(); Object target = null; // Finds the target cell at the given location and checks if the // target is not already the parent of the first imported cell if (location != null) { target = graphComponent.getGraph().getDropTarget(cells, location, graphComponent.getCellAt(location.x, location.y)); if (cells.length > 0 && graphComponent.getGraph().getModel().getParent(cells[0]) == target) { target = null; } } return target; }
/** * Returns the drop target for the given transferable and location. */ protected Object getDropTarget(mxGraphComponent graphComponent, mxGraphTransferable gt) { Object[] cells = gt.getCells(); Object target = null; // Finds the target cell at the given location and checks if the // target is not already the parent of the first imported cell if (location != null) { target = graphComponent.getGraph().getDropTarget(cells, location, graphComponent.getCellAt(location.x, location.y)); if (cells.length > 0 && graphComponent.getGraph().getModel().getParent(cells[0]) == target) { target = null; } } return target; }