jrect.getMinX() + 1.0, jrect.getMaxY() - 1.0, jrect.getMaxX() - 2.0, jrect.getMaxY() - 1.0); g.draw(line); line = new Line2D.Double( // Left line jrect.getMinX() + 2.0, jrect.getMaxY() - 2.0, jrect.getMaxX() - 3.0, jrect.getMaxY() - 2.0); g.draw(line); line = new Line2D.Double( // Left line jrect.getMinX() + 2.0, jrect.getMinY() + 2.0, jrect.getMaxX() - 2.0, jrect.getMinY() + 2.0); g.draw(line); line = new Line2D.Double( // Right line jrect.getMaxX() - 2.0f, jrect.getMinY() + 2.0, jrect.getMaxX() - 2.0f, jrect.getMaxY() - 2.0); g.draw(line); jrect.getMinX() + 1.0, jrect.getMinY() + 1.0, jrect.getMaxX() - 1.0, jrect.getMinY() + 1.0); g.draw(line); line = new Line2D.Double( // Right line jrect.getMaxX() - 1.0f, jrect.getMinY() + 1.0, jrect.getMaxX() - 1.0f, jrect.getMaxY() - 1.0); g.draw(line); } else if (bs.isStyleInset()) { jrect.getMinX() + 1.0, jrect.getMaxY() - 1.0, jrect.getMaxX() - 1.0, jrect.getMaxY() - 1.0); g.draw(line); line = new Line2D.Double( // Left line jrect.getMinX() + 2.0, jrect.getMaxY() - 2.0, jrect.getMaxX() - 2.0, jrect.getMaxY() - 2.0); g.draw(line); line = new Line2D.Double( // Left line
if (selBounds.getMinX() < kidBounds.getMaxX() && selBounds.getMaxX() > kidBounds.getMinX()) testDist2 = 0; else if (selBounds.getMinX() < kidBounds.getMaxX() && selBounds.getMaxX() > kidBounds.getMinX()) testDist2 = 0; else if (selBounds.getMinX() < kidBounds.getMaxX() && selBounds.getMaxX() > kidBounds.getMinX()) testDist2 = 0; else if (selBounds.getMinX() < kidBounds.getMaxX() && selBounds.getMaxX() > kidBounds.getMinX()) testDist2 = 0; else if (selBounds.getMinX() < kidBounds.getMaxX() && selBounds.getMaxX() > kidBounds.getMinX()) testDist2 = 0; else if (selBounds.getMinX() < kidBounds.getMaxX() && selBounds.getMaxX() > kidBounds.getMinX()) testDist2 = 0; else
private Rectangle2D.Float deriveBorderDrawingRectangle(float borderWidth) { Rectangle2D.Float jrect = deriveDrawingRectangle(); float halfBorderWidth = borderWidth / 2.0f; double minX = jrect.getMinX() + halfBorderWidth; double minY = jrect.getMinY() + halfBorderWidth; double maxX = jrect.getMaxX() - halfBorderWidth; double maxY = jrect.getMaxY() - halfBorderWidth; jrect.setFrameFromDiagonal(minX, minY, maxX, maxY); return jrect; }