コード例 #1
0
 public void mouseDragged(MouseEvent e) {
   graphContainer
       .getGraphControl()
       .dispatchEvent(
           SwingUtilities.convertMouseEvent(
               (Component) e.getSource(), e, graphContainer.getGraphControl()));
 }
コード例 #2
0
    public void mousePressed(MouseEvent e) {
      // Selects to create a handler for resizing
      if (!graph.isCellSelected(cell)) {
        graphContainer.selectCellForEvent(cell, e);
      }

      // Initiates a resize event in the handler
      mxCellHandler handler = graphContainer.getSubHandler().getHandler(cell);

      if (handler != null) {
        // Starts the resize at index 7 (bottom right)
        handler.start(
            SwingUtilities.convertMouseEvent(
                (Component) e.getSource(), e, graphContainer.getGraphControl()),
            index);
        e.consume();
      }
    }