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); } }
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(); }