Exemplo n.º 1
0
 protected void paintPort(PortView port, boolean show) {
   if (port != null) {
     Rectangle2D portBounds = net.toScreen(port.getBounds());
     getOverlay().setMouseOverPort(show ? portBounds : null);
     getOverlay().setScale(getNet().getScale());
     net.repaint(
         (int) portBounds.getX() - 1,
         (int) portBounds.getY() - 1,
         (int) portBounds.getWidth() + 2,
         (int) portBounds.getHeight() + 2);
   }
 }
Exemplo n.º 2
0
 private void repaintClip(Rectangle2D clip) {
   if (clip != null) {
     net.repaint(
         (int) clip.getX(), (int) clip.getY(), (int) clip.getWidth(), (int) clip.getHeight());
   } else net.repaint();
 }