boolean o = (GraphConstants.getOffset(port.getAllAttributes()) != null);
// ...Then use Parent's Bounds
Rectangle2D r = (o) ? port.getBounds() : port.getParentView()
.getBounds();
// Scale from Model to Screen
r = graph.toScreen((Rectangle2D) r.clone());
// Add Space For the Highlight Border
r.setFrame(r.getX() - 3, r.getY() - 3, r.getWidth() + 6, r
.getHeight() + 6);
// Paint Port in Preview (=Highlight) Mode
graph.getUI().paintCell(g, port, r, true);