/** * Resets the rubberband selection without carrying out the selection. */ public void reset() { first = null; if (bounds != null) { graphComponent.getGraphControl().repaint(bounds); bounds = null; } }
/** * Resets the rubberband selection without carrying out the selection. */ public void reset() { first = null; if (bounds != null) { graphComponent.getGraphControl().repaint(bounds); bounds = null; } }
/** * * @param graphComponent */ public mxPanningHandler(mxGraphComponent graphComponent) { this.graphComponent = graphComponent; graphComponent.getGraphControl().addMouseListener(this); graphComponent.getGraphControl().addMouseMotionListener(this); }
/** * */ public void destroy() { graphComponent.getGraphControl().removeMouseListener(this); graphComponent.getGraphControl().removeMouseMotionListener(this); }
public void mouseClicked(MouseEvent e) { graphComponent.getGraphControl().dispatchEvent( SwingUtilities.convertMouseEvent(e.getComponent(), e, graphComponent.getGraphControl())); }
/** * */ public void destroy() { graphComponent.getGraphControl().removeMouseListener(this); graphComponent.getGraphControl().removeMouseMotionListener(this); }
/** * Constructs an event handler that highlights cells. */ public mxCellTracker(mxGraphComponent graphComponent, Color color) { super(graphComponent, color); graphComponent.getGraphControl().addMouseListener(this); graphComponent.getGraphControl().addMouseMotionListener(this); }
/** * Constructs an event handler that highlights cells. */ public mxCellTracker(mxGraphComponent graphComponent, Color color) { super(graphComponent, color); graphComponent.getGraphControl().addMouseListener(this); graphComponent.getGraphControl().addMouseMotionListener(this); }
/** * */ public void insertComponent(mxCellState state, Component c) { getGraphControl().add(c, 0); }
/** * * @param graphComponent */ public mxPanningHandler(mxGraphComponent graphComponent) { this.graphComponent = graphComponent; graphComponent.getGraphControl().addMouseListener(this); graphComponent.getGraphControl().addMouseMotionListener(this); }
/** * */ public void insertComponent(mxCellState state, Component c) { getGraphControl().add(c, 0); }
public void mouseClicked(MouseEvent e) { graphComponent.getGraphControl().dispatchEvent( SwingUtilities.convertMouseEvent(e.getComponent(), e, graphComponent.getGraphControl())); }
/** * Starts handling a gesture at the given handle index. */ public void start(MouseEvent e, int index) { this.index = index; first = e.getPoint(); preview = createPreview(); if (preview != null) { graphComponent.getGraphControl().add(preview, 0); } }
/** * Starts handling a gesture at the given handle index. */ public void start(MouseEvent e, int index) { this.index = index; first = e.getPoint(); preview = createPreview(); if (preview != null) { graphComponent.getGraphControl().add(preview, 0); } }
/** * Draws the preview using the graphics canvas. */ protected void paintPreview(mxGraphics2DCanvas canvas) { graphComponent.getGraphControl().drawCell(graphComponent.getCanvas(), previewState.getCell()); }
/** * Draws the preview using the graphics canvas. */ protected void paintPreview(mxGraphics2DCanvas canvas) { graphComponent.getGraphControl().drawCell(graphComponent.getCanvas(), previewState.getCell()); }
/** * */ public Point convertPoint(Point pt) { pt = SwingUtilities.convertPoint(graphComponent, pt, graphComponent.getGraphControl()); pt.x -= graphComponent.getHorizontalScrollBar().getValue(); pt.y -= graphComponent.getVerticalScrollBar().getValue(); return pt; }
/** * */ public Point convertPoint(Point pt) { pt = SwingUtilities.convertPoint(graphComponent, pt, graphComponent.getGraphControl()); pt.x -= graphComponent.getHorizontalScrollBar().getValue(); pt.y -= graphComponent.getVerticalScrollBar().getValue(); return pt; }
/** * */ public void stopAnimation() { graphComponent.getGraph().getView().revalidate(); super.stopAnimation(); preview = null; if (dirty != null) { graphComponent.getGraphControl().repaint(dirty.getRectangle()); } }
/** * */ public void stopAnimation() { graphComponent.getGraph().getView().revalidate(); super.stopAnimation(); preview = null; if (dirty != null) { graphComponent.getGraphControl().repaint(dirty.getRectangle()); } }