@Override public void addDamagedRegion(FigureDrawContext fdc, Region region) { region.add(fdc.toClientRectangle(x1, y1, x2, y2)); } }
@Override public void addDamagedRegion(FigureDrawContext fdc, Region region) { region.add(fdc.toClientRectangle(x1, y1, x2, y2)); } }
@Override public void updateRegion(Region region) { region.add(label.getBounds()); }
@Override public void addDamagedRegion(FigureDrawContext fdc, Region region) { region.add(fdc.toClientRectangle(x1, y1, x2, y2)); } }
@Override public void addDamagedRegion(FigureDrawContext fdc, Region region) { region.add(fdc.toClientRectangle(x, y, x, y)); } }
@Override public void addDamagedRegion(FigureDrawContext fdc, Region region) { region.add(fdc.toClientRectangle(x1, y1, x2, y2)); } }
@Override public void addDamagedRegion(FigureDrawContext fdc, Region region) { region.add(fdc.toClientRectangle(x1, y1, x2, y2)); } }
@Override public void addDamagedRegion(FigureDrawContext fdc, Region region) { region.add(fdc.toClientRectangle(x1, y1, x2, y2)); } }
@Override public void addDamagedRegion(FigureDrawContext fdc, Region region) { region.add(fdc.toClientRectangle(x1, y1, x2, y2)); } }
@Override public void addDamagedRegion(FigureDrawContext fdc, Region region) { int xmin = Integer.MAX_VALUE, ymin = Integer.MAX_VALUE; int xmax = Integer.MIN_VALUE, ymax = Integer.MIN_VALUE; for (int i = 0; i < points.length; i += 2) { if (points[i] < xmin) xmin = points[i]; if (points[i] > xmax) xmax = points[i]; if (points[i+1] < ymin) ymin = points[i+1]; if (points[i+1] > ymax) ymax = points[i+1]; } region.add(fdc.toClientRectangle(xmin, ymin, xmax, ymax)); } }
@Override public void updateRegion(Region region) { outerRect = new Rectangle(innerRect.x - width, innerRect.y - width, innerRect.width + (2 * width), innerRect.height + (2 * width)); region.add(outerRect); region.subtract(innerRect); }
@Override public void updateRegion(Region region) { outerRect = new Rectangle(innerRect.x - width, innerRect.y - width, innerRect.width + (2 * width), innerRect.height + (2 * width)); region.add(outerRect); region.subtract(innerRect); }
void setNewShape() { Region oldRegion = region; region = new Region(); region.add(getPolygon(false)); hoverShell.setRegion(region); if (oldRegion != null) { oldRegion.dispose(); } } }
void setNewShape() { Region oldRegion = region; region = new Region(); region.add(getPolygon(false)); hoverShell.setRegion(region); if (oldRegion != null) { oldRegion.dispose(); } } }
void setNewShape() { Region oldRegion = region; region = new Region(); region.add(getPolygon(false)); hoverShell.setRegion(region); if(oldRegion != null) { oldRegion.dispose(); } } }
void setNewShape() { Region oldRegion = region; region = new Region(); region.add(getPolygon(false)); hoverShell.setRegion(region); if (oldRegion != null) { oldRegion.dispose(); } } }
void setNewShape() { Region oldRegion = region; region = new Region(); region.add(getPolygon(false)); hoverShell.setRegion(region); if (oldRegion != null) { oldRegion.dispose(); } } }
@Override public void addDamagedRegion(FigureDrawContext fdc, Region region) { Font oldFont = fdc.gc.getFont(); fdc.gc.setFont(font); Point textExtent = fdc.gc.textExtent(text); fdc.gc.setFont(oldFont); region.add(fdc.toClientRectangle(x, y, x + textExtent.x, y + textExtent.y)); } }
protected void packPopup() { popupLayout.marginTop = HAH; popupLayout.marginBottom = 0; popup.pack(); Region oldRegion = region; region = new Region(); region.add(getPolygon(false)); popup.setRegion(region); Rectangle bounds = region.getBounds(); popup.setSize(bounds.width, bounds.height + 2); if (oldRegion != null) { oldRegion.dispose(); } }
private void defineRegion() { Region rgn = new Region(); for (Rectangle r : rects) { rgn.add(r); rgn.subtract(r.x + 2, r.y + 2, r.width - 4, r.height - 4); } if (feedbackShell.getRegion() != null && !feedbackShell.getRegion().isDisposed()) feedbackShell.getRegion().dispose(); feedbackShell.setRegion(rgn); feedbackShell.redraw(); display.update(); }