private Rectangle getOverlayBounds() { Rectangle bounds = null; for (Rectangle fr : frames) { if (fr.width > 6) { Rectangle outerBounds = new Rectangle(fr.x - 3, fr.y - 3, fr.width + 6, fr.height + 6); if (bounds == null) bounds = outerBounds; bounds.add(outerBounds); } else { if (bounds == null) bounds = fr; bounds.add(fr); } } for (Rectangle ir : imageRects) { if (bounds == null) bounds = ir; bounds.add(ir); } return bounds; }
private Rectangle getOverlayBounds() { Rectangle bounds = null; for (Rectangle fr : frames) { if (fr.width > 6) { Rectangle outerBounds = new Rectangle(fr.x - 3, fr.y - 3, fr.width + 6, fr.height + 6); if (bounds == null) { bounds = outerBounds; } bounds.add(outerBounds); } else { if (bounds == null) { bounds = fr; } bounds.add(fr); } } for (Rectangle ir : imageRects) { if (bounds == null) { bounds = ir; } bounds.add(ir); } return bounds; }
public Rectangle getBounds() { if (areaRectangles.size() == 0) return new Rectangle(0, 0, 0, 0); AreaRectangle ar0 = areaRectangles.get(0); Rectangle bounds = Geometry.copy(ar0.rect); for (int i = 1; i < areaRectangles.size(); i++) { AreaRectangle ar = areaRectangles.get(i); bounds.add(ar.rect); } return bounds; }
public Rectangle getBounds() { if (areaRectangles.isEmpty()) return new Rectangle(0, 0, 0, 0); AreaRectangle ar0 = areaRectangles.get(0); Rectangle bounds = Geometry.copy(ar0.rect); for (int i = 1; i < areaRectangles.size(); i++) { AreaRectangle ar = areaRectangles.get(i); bounds.add(ar.rect); } return bounds; }
@Override public Rectangle getBounds() { if (segments.isEmpty()) return new Rectangle(Integer.MAX_VALUE, Integer.MAX_VALUE, 0, 0); IHyperlinkSegment segment0 = (IHyperlinkSegment) segments.get(0); Rectangle bounds = segment0.getBounds(); for (int i = 1; i < segments.size(); i++) { IHyperlinkSegment segment = (IHyperlinkSegment) segments.get(i); Rectangle sbounds = segment.getBounds(); bounds.add(sbounds); } return bounds; }
@Override public Rectangle getBounds() { if (segments.size() == 0) return new Rectangle(Integer.MAX_VALUE, Integer.MAX_VALUE, 0, 0); IHyperlinkSegment segment0 = (IHyperlinkSegment) segments.get(0); Rectangle bounds = segment0.getBounds(); for (int i = 1; i < segments.size(); i++) { IHyperlinkSegment segment = (IHyperlinkSegment) segments.get(i); Rectangle sbounds = segment.getBounds(); bounds.add(sbounds); } return bounds; }
/** * Perform any initialization you want to have happen -before- the * amination starts */ @Override public boolean jobInit(AnimationEngine engine) { if (!super.jobInit(engine)) return false; // Compute the shell's bounds Rectangle shellBounds = Geometry.copy((Rectangle) getStartRects() .get(0)); Iterator startIter = getStartRects().iterator(); Iterator endIter = getEndRects().iterator(); while (startIter.hasNext()) { shellBounds.add((Rectangle) startIter.next()); shellBounds.add((Rectangle) endIter.next()); } getAnimationShell().setBounds(shellBounds); // Making the shell visible will be slow on old video cards, so only start // the timer once it is visible. getAnimationShell().setVisible(true); return true; // OK to go... }
@Override public void mouseExit(MouseEvent e) { if (fComposite == null) return; Control[] children= fComposite.getChildren(); Rectangle bounds= null; for (int i= 0; i < children.length; i++) { if (bounds == null) bounds= children[i].getBounds(); else bounds.add(children[i].getBounds()); if (bounds.contains(e.x, e.y)) return; } // if none of the children contains the event, we leave the popup dispose(); }
@Override public void mouseExit(MouseEvent e) { if (fComposite == null) return; Control[] children= fComposite.getChildren(); Rectangle bounds= null; for (int i= 0; i < children.length; i++) { if (bounds == null) bounds= children[i].getBounds(); else bounds.add(children[i].getBounds()); if (bounds.contains(e.x, e.y)) return; } // if none of the children contains the event, we leave the popup dispose(); }
damage.add(oldBounds);
damage.add(oldBounds);
damage.add(oldBounds);
damage.add(oldBounds);
bounds = new Rectangle(rect.x, rect.y, rect.width, rect.height); } else { bounds.add(rect);
bounds = new Rectangle(rect.x, rect.y, rect.width, rect.height); } else { bounds.add(rect);
bounds = new Rectangle(rect.x, rect.y, rect.width, rect.height); } else { bounds.add(rect);
bounds = new Rectangle(rect.x, rect.y, rect.width, rect.height); } else { bounds.add(rect);
bounds = new Rectangle(rect.x, rect.y, rect.width, rect.height); } else { bounds.add(rect);
totalBounds.add(subjectArea); if (totalBounds.contains(x, y)) return true;
java.awt.Rectangle rect = paintInfo .getAggregateBounds(); repaintTarget.add(new Rectangle(rect.x, rect.y, rect.width, rect.height));