コード例 #1
0
 @Nullable
 private GraphElement overCell(MouseEvent e) {
   int y = PositionUtil.getYInsideRow(e);
   int x = e.getX();
   GraphPrintCell row = getGraphPrintCell(e);
   return row != null ? myGraphPainter.mouseOver(row, x, y) : null;
 }
コード例 #2
0
 @Nullable
 private Node arrowToNode(MouseEvent e) {
   int y = PositionUtil.getYInsideRow(e);
   int x = e.getX();
   GraphPrintCell row = getGraphPrintCell(e);
   if (row == null) {
     return null;
   }
   SpecialPrintElement printElement = myGraphPainter.mouseOverArrow(row, x, y);
   if (printElement == null) {
     return null;
   }
   Edge edge = printElement.getGraphElement().getEdge();
   if (edge == null) {
     return null;
   }
   return printElement.getType() == SpecialPrintElement.Type.DOWN_ARROW
       ? edge.getDownNode()
       : edge.getUpNode();
 }