public void invoke(Object sender, mxEventObject evt) { Graphics g = (Graphics) evt.getProperty("g"); paint(g); } });
/** * */ public void mousePressed(MouseEvent e) { if (currentState != null && handle.getParent() != null && e.getSource() == handle /* mouse hits handle */) { start(e); e.consume(); } }
if (graphComponent.isEnabled() && isEnabled()) if (eventState != null && isStateHandled(eventState))
/** * Constructs a new rotation handler. */ public mxRotationHandler(mxGraphComponent graphComponent) { this.graphComponent = graphComponent; graphComponent.addMouseListener(this); handle = createHandle(); // Installs the paint handler graphComponent.addListener(mxEvent.AFTER_PAINT, new mxIEventListener() { public void invoke(Object sender, mxEventObject evt) { Graphics g = (Graphics) evt.getProperty("g"); paint(g); } }); // Listens to all mouse events on the rendering control graphComponent.getGraphControl().addMouseListener(this); graphComponent.getGraphControl().addMouseMotionListener(this); // Needs to catch events because these are consumed handle.addMouseListener(this); handle.addMouseMotionListener(this); }
if (graphComponent.isEnabled() && isEnabled() && !e.isConsumed() && first != null)
if (graphComponent.isEnabled() && isEnabled()) if (eventState != null && isStateHandled(eventState))
/** * Constructs a new rotation handler. */ public mxRotationHandler(mxGraphComponent graphComponent) { this.graphComponent = graphComponent; graphComponent.addMouseListener(this); handle = createHandle(); // Installs the paint handler graphComponent.addListener(mxEvent.AFTER_PAINT, new mxIEventListener() { public void invoke(Object sender, mxEventObject evt) { Graphics g = (Graphics) evt.getProperty("g"); paint(g); } }); // Listens to all mouse events on the rendering control graphComponent.getGraphControl().addMouseListener(this); graphComponent.getGraphControl().addMouseMotionListener(this); // Needs to catch events because these are consumed handle.addMouseListener(this); handle.addMouseMotionListener(this); }
if (graphComponent.isEnabled() && isEnabled() && !e.isConsumed() && first != null)
public void invoke(Object sender, mxEventObject evt) { Graphics g = (Graphics) evt.getProperty("g"); paint(g); } });
/** * */ public void mousePressed(MouseEvent e) { if (currentState != null && handle.getParent() != null && e.getSource() == handle /* mouse hits handle */) { start(e); e.consume(); } }