/** * unset the down point and change the cursor back to the default */ public void mouseReleased(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>)e.getSource(); down = null; vv.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
/** * unset the 'down' point and change the cursoe back to the system * default cursor */ public void mouseReleased(MouseEvent e) { VisualizationViewer<?,?> vv = (VisualizationViewer<?,?>)e.getSource(); down = null; vv.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
/** unset the 'down' point and change the cursoe back to the system default cursor */ public void mouseReleased(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>) e.getSource(); down = null; vv.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
/** * unset the 'down' point and change the cursoe back to the system * default cursor */ public void mouseReleased(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>)e.getSource(); down = null; vv.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
public void mouseReleased(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>) e.getSource(); down = null; vv.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
public void mouseReleased(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>)e.getSource(); down = null; vv.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
/** unset the down point and change the cursor back to the default */ public void mouseReleased(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>) e.getSource(); down = null; vv.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
/** unset the 'down' point and change the cursoe back to the system default cursor */ public void mouseReleased(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>) e.getSource(); down = null; vv.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
public void mousePressed(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>)e.getSource(); boolean accepted = checkModifiers(e); down = e.getPoint(); if(accepted) { vv.setCursor(cursor); } }
public void mousePressed(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>) e.getSource(); boolean accepted = checkModifiers(e); down = e.getPoint(); if (accepted) { vv.setCursor(cursor); } }
/** * save the 'down' point and check the modifiers. If the * modifiers are accepted, set the cursor to the 'hand' cursor * @param e the event */ public void mousePressed(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>)e.getSource(); boolean accepted = checkModifiers(e); down = e.getPoint(); if(accepted) { vv.setCursor(cursor); } }
/** * Check the event modifiers. Set the 'down' point for later * use. If this event satisfies the modifiers, change the cursor * to the system 'move cursor' * @param e the event */ public void mousePressed(MouseEvent e) { VisualizationViewer<?,?> vv = (VisualizationViewer<?,?>)e.getSource(); boolean accepted = checkModifiers(e); down = e.getPoint(); if(accepted) { vv.setCursor(cursor); } }
/** * Check the event modifiers. Set the 'down' point for later * use. If this event satisfies the modifiers, change the cursor * to the system 'move cursor' * @param e the event */ public void mousePressed(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>)e.getSource(); boolean accepted = checkModifiers(e); down = e.getPoint(); if(accepted) { vv.setCursor(cursor); } }
/** * Check the event modifiers. Set the 'down' point for later use. If this event satisfies the * modifiers, change the cursor to the system 'move cursor' * * @param e the event */ public void mousePressed(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>) e.getSource(); boolean accepted = checkModifiers(e); down = e.getPoint(); if (accepted) { vv.setCursor(cursor); } }
/** * Check the event modifiers. Set the 'down' point for later use. If this event satisfies the * modifiers, change the cursor to the system 'move cursor' * * @param e the event */ public void mousePressed(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>) e.getSource(); boolean accepted = checkModifiers(e); down = e.getPoint(); if (accepted) { vv.setCursor(cursor); } }
/** * save the 'down' point and check the modifiers. If the modifiers are accepted, set the cursor to * the 'hand' cursor * * @param e the event */ public void mousePressed(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>) e.getSource(); boolean accepted = checkModifiers(e); down = e.getPoint(); if (accepted) { vv.setCursor(cursor); } }
/** * Handle mouse moved to set the cursor to hand when over an agent (vertex) * or message (edge). */ public void mouseMoved(MouseEvent e) { Point2D p = e.getPoint();// vv.getRenderContext().getBasicTransformer().inverseViewTransform(e.getPoint()); GraphElementAccessor pickSupport = canvas.vv.getPickSupport(); if (pickSupport != null) { AgentGroup v = (AgentGroup)pickSupport.getVertex(canvas.vv.getGraphLayout(), p.getX(), p.getY()); MessageGroup ml = (MessageGroup)pickSupport.getEdge(canvas.vv.getGraphLayout(), p.getX(), p.getY()); if (v == null && ml == null) { canvas.vv.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } else { canvas.vv.setCursor(cursor); } } }
/** * chack the modifiers. If accepted, translate the graph according to the dragging of the mouse * pointer * * @param e the event */ public void mouseDragged(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>) e.getSource(); boolean accepted = checkModifiers(e); if (accepted) { MutableTransformer viewTransformer = vv.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.VIEW); vv.setCursor(cursor); try { Point2D q = viewTransformer.inverseTransform(down); Point2D p = viewTransformer.inverseTransform(e.getPoint()); float dx = (float) (p.getX() - q.getX()); float dy = (float) (p.getY() - q.getY()); viewTransformer.translate(dx, dy); down.x = e.getX(); down.y = e.getY(); } catch (RuntimeException ex) { System.err.println("down = " + down + ", e = " + e); throw ex; } e.consume(); } }
public final void actionPerformed(ActionEvent e) { Cursor cursor = viewer.getVisualizationViewer().getCursor(); viewer.getVisualizationViewer().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); RootPaneContainer root = findRoot(viewer); root.getGlassPane().setVisible(true); root.getGlassPane().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); StateEdit edit = null; try { doAction(); } finally { if (edit != null) { viewer.getVisualizationViewer().repaint(); edit.end(); } root.getGlassPane().setVisible(false); viewer.getVisualizationViewer().setCursor(cursor); } viewer.getVisualizationViewer().repaint(); } });
/** * Check the event modifiers. Set the 'down' point for later * use. If this event satisfies the modifiers, change the cursor * to the system 'move cursor' * @param e the event */ public void mousePressed(MouseEvent e) { VisualizationViewer<?, ?> vv = (VisualizationViewer<?, ?>)e.getSource(); MutableTransformer vt = vv.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.VIEW); if(vt instanceof LensTransformer) { vt = ((LensTransformer)vt).getDelegate(); } Point2D p = vt.inverseTransform(e.getPoint()); boolean accepted = checkModifiers(e); if(accepted) { vv.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); testViewCenter(vv.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.LAYOUT), p); testViewCenter(vv.getRenderContext().getMultiLayerTransformer().getTransformer(Layer.VIEW), p); vv.repaint(); } super.mousePressed(e); }