/** Restores this region to an empty region. */ public void reset() { area.reset(); }
/** Does not set the @param area, but copies its internal data. */ public void putData(final Area a) { if (this.area == a) return; this.area.reset(); this.area.add(a); }
@Override public final synchronized boolean setData(final Area area) { if (null == area) { if (null == this.aw) return true; this.aw.getArea().reset(); } else { if (null != this.aw) this.aw.putData(area); else this.aw = new AreaWrapper(area); } return true; } @Override
protected void checkMouseMoved( MouseEvent e ) { JComponent c = findHelpComponentAt( e.getPoint() ); if( c != focussedHelpComponent ) { focussedHelpComponent = c; // Container contentPane = f.getContentPane(); if( c == null ) { focussedArea.reset(); } else { Point p1 = SwingUtilities.convertPoint( c, 0, 0, this ); Point p2 = SwingUtilities.convertPoint( c, c.getWidth(), c.getHeight(), this ); RoundRectangle2D rr = new RoundRectangle2D.Double( p1.x - 4, p1.y - 4, (p2.x - p1.x) + 8, (p2.y - p1.y) + 8, 8.0, 8.0 ); focussedArea = new Area( rr ); // new Rectangle2D.Double( r2 )); } repaint(); } }
/** * Removes all of the geometry from this area node and restores it to an empty area. */ public void reset() { Area oldArea = (Area) area.clone(); area.reset(); updateBoundsFromShape(); firePropertyChange(-1, "area", oldArea, getArea()); }
area.reset(); area.add( new Area( rect )); rect.setRoundRect( x + 2, y + 2, w - 4, h - 4, arcIn, arcIn );
/** * Removes all of the geometry from this area node and restores it to an empty area. */ public void reset() { Area oldArea = (Area) area.clone(); area.reset(); updateBoundsFromShape(); firePropertyChange(-1, "area", oldArea, getArea()); }
area.reset(); area.add(new Area(new Rectangle2D.Double(0.0, 0.0, bounds.getMaxX(), bounds.getMaxY())));
protected void deactivateHelpMode() { if( f.getGlassPane() != this ) return; this.setVisible( false ); f.setGlassPane( normalGlassPane ); f.setFocusTraversalPolicy( normalFocus ); normalGlassPane = null; normalFocus = null; focussedHelpComponent = null; focussedArea.reset(); f.requestFocus(); }
protected void activateHelpMode() { Component recentGlassPane = f.getGlassPane(); if( recentGlassPane == this || recentGlassPane.isVisible() ) return; normalGlassPane = recentGlassPane; focussedHelpComponent = null; focussedArea.reset(); f.setGlassPane( this ); this.setVisible( true ); normalFocus = f.getFocusTraversalPolicy(); f.setFocusTraversalPolicy( new NoFocusTraversalPolicy() ); this.requestFocus(); }
area.reset(); areaSegments.clear(); Path2D.Double triangle = new Path2D.Double();
/** Parts of @param a not intersected by any of @param vdt rois will be left untouched if @param remove_outside is false. */ static final public void apply(final VectorDataTransform vdt, final Area a, final boolean remove_outside) { final Area b = new Area(); for (final VectorDataTransform.ROITransform rt : vdt.transforms) { // Cut the intersecting part from a: final Area intersection = new Area(a); intersection.intersect(rt.roi); a.subtract(intersection); // .. and add it to b, transformed: b.add(M.transform(rt.ct, intersection)); } if (!M.isEmpty(a)) { if (remove_outside) { // Clear areas not affected any ROITransform Utils.log("WARNING: parts of an area in layer " + vdt.layer + "\n did not intersect any transformation target\n and where removed."); a.reset(); } else Utils.log("WARNING: parts of an area in layer " + vdt.layer + "\n remain untransformed."); } // Add b (the transformed parts) to what remains of a a.add(b); }
this.target_area.reset(); this.target_area.add(added);
exposedArea.reset(); exposedArea.add(area);
if (area.isEmpty()) return; source.getLayerSet().addDataEditStep(source); area.reset(); ((AreaContainer)source).calculateBoundingBox(la); source.getLayerSet().addDataEditStep(source);