/** * Sets the antialiasing setting. This is a bound property. * @param value the new antialiasing setting */ public void setAntialiasing(boolean value) { boolean old = isAntialiasing(); antialiasing = value; if (old != value) setDirty(true); firePropertyChange("antialiasing", old, isAntialiasing()); }
/** * Sets the antialiasing setting. This is a bound property. * @param value the new antialiasing setting */ public void setAntialiasing(boolean value) { boolean old = isAntialiasing(); antialiasing = value; if (old != value) setDirty(true); firePropertyChange("antialiasing", old, isAntialiasing()); }
/** * Sets the antialiasing setting. This is a bound property. * @param value the new antialiasing setting */ public void setAntialiasing(boolean value) { boolean old = isAntialiasing(); antialiasing = value; if (old != value) setDirty(true); firePropertyChange("antialiasing", old, isAntialiasing()); }
/** * Sets the antialiasing setting. This is a bound property. * @param value the new antialiasing setting */ public void setAntialiasing(boolean value) { boolean old = isAntialiasing(); antialiasing = value; if (old != value) setDirty(true); firePropertyChange("antialiasing", old, isAntialiasing()); }
/** * Sets the antialiasing setting. This is a bound property. * @param value the new antialiasing setting */ public void setAntialiasing(boolean value) { boolean old = isAntialiasing(); antialiasing = value; if (old != value) setDirty(true); firePropertyChange("antialiasing", old, isAntialiasing()); }
/** * Sets the antialiasing setting. This is a bound property. * @param value the new antialiasing setting */ public void setAntialiasing(boolean value) { boolean old = isAntialiasing(); antialiasing = value; if (old != value) setDirty(true); firePropertyChange("antialiasing", old, isAntialiasing()); }
/** * <p>This method is called by the <code>paint</code> method prior to * any drawing operations to configure the drawing surface. The default * implementation sets the rendering hints that have been specified for * this <code>AbstractPainter</code>.</p> * * <p>This method can be overridden by subclasses to modify the drawing * surface before any painting happens.</p> * * @param g the graphics surface to configure. This will never be null. * @see #paint(Graphics2D, Object, int, int) */ protected void configureGraphics(Graphics2D g) { //configure antialiasing if(isAntialiasing()) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } else { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } getInterpolation().configureGraphics(g); }
/** * <p>This method is called by the <code>paint</code> method prior to * any drawing operations to configure the drawing surface. The default * implementation sets the rendering hints that have been specified for * this <code>AbstractPainter</code>.</p> * * <p>This method can be overriden by subclasses to modify the drawing * surface before any painting happens.</p> * * @param g the graphics surface to configure. This will never be null. * @see #paint(Graphics2D, Object, int, int) */ protected void configureGraphics(Graphics2D g) { //configure antialiasing if(isAntialiasing()) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } else { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } getInterpolation().configureGraphics(g); }
/** * <p>This method is called by the <code>paint</code> method prior to * any drawing operations to configure the drawing surface. The default * implementation sets the rendering hints that have been specified for * this <code>AbstractPainter</code>.</p> * * <p>This method can be overridden by subclasses to modify the drawing * surface before any painting happens.</p> * * @param g the graphics surface to configure. This will never be null. * @see #paint(Graphics2D, Object, int, int) */ protected void configureGraphics(Graphics2D g) { //configure antialiasing if (isAntialiasing()) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } else { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } getInterpolation().configureGraphics(g); }
/** * <p>This method is called by the <code>paint</code> method prior to * any drawing operations to configure the drawing surface. The default * implementation sets the rendering hints that have been specified for * this <code>AbstractPainter</code>.</p> * * <p>This method can be overridden by subclasses to modify the drawing * surface before any painting happens.</p> * * @param g the graphics surface to configure. This will never be null. * @see #paint(Graphics2D, Object, int, int) */ protected void configureGraphics(Graphics2D g) { //configure antialiasing if(isAntialiasing()) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } else { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } getInterpolation().configureGraphics(g); }
/** * <p>This method is called by the <code>paint</code> method prior to * any drawing operations to configure the drawing surface. The default * implementation sets the rendering hints that have been specified for * this <code>AbstractPainter</code>.</p> * * <p>This method can be overridden by subclasses to modify the drawing * surface before any painting happens.</p> * * @param g the graphics surface to configure. This will never be null. * @see #paint(Graphics2D, Object, int, int) */ protected void configureGraphics(Graphics2D g) { //configure antialiasing if(isAntialiasing()) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } else { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } getInterpolation().configureGraphics(g); }
/** * <p>This method is called by the <code>paint</code> method prior to * any drawing operations to configure the drawing surface. The default * implementation sets the rendering hints that have been specified for * this <code>AbstractPainter</code>.</p> * * <p>This method can be overridden by subclasses to modify the drawing * surface before any painting happens.</p> * * @param g the graphics surface to configure. This will never be null. * @see #paint(Graphics2D, Object, int, int) */ protected void configureGraphics(Graphics2D g) { //configure antialiasing if(isAntialiasing()) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } else { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } getInterpolation().configureGraphics(g); }
@Test public void testDefaults() { assertThat(p.getFilters().length, is(0)); assertThat(p.getInterpolation(), is(AbstractPainter.Interpolation.NearestNeighbor)); assertThat(p.isAntialiasing(), is(true)); assertThat(p.isCacheable(), is(false)); assertThat(p.isCacheCleared(), is(true)); assertThat(p.isDirty(), is(false)); assertThat(p.isInPaintContext(), is(false)); assertThat(p.isVisible(), is(true)); assertThat(p.shouldUseCache(), is(p.isCacheable())); }
/** * TODO remove when the compound painter does not start dirty */ private void copyOfSuper_testDefaultsWithCorrectedValues() { assertThat(p.getFilters().length, is(0)); assertThat(p.getInterpolation(), is(AbstractPainter.Interpolation.NearestNeighbor)); assertThat(p.isAntialiasing(), is(true)); assertThat(p.isCacheable(), is(false)); assertThat(p.isCacheCleared(), is(true)); //TODO why does CompoundPainter start dirty? assertThat(p.isDirty(), is(true)); assertThat(p.isInPaintContext(), is(false)); assertThat(p.isVisible(), is(true)); assertThat(p.shouldUseCache(), is(false)); }
/** * TODO remove when the compound painter does not start dirty */ private void copyOfSuper_testDefaultsWithCorrectedValues() { assertThat(p.getFilters().length, is(0)); assertThat(p.getInterpolation(), is(AbstractPainter.Interpolation.NearestNeighbor)); assertThat(p.isAntialiasing(), is(true)); assertThat(p.isCacheable(), is(false)); assertThat(p.isCacheCleared(), is(true)); //TODO this is because the constructor calls the setters assertThat(p.isDirty(), is(true)); assertThat(p.isInPaintContext(), is(false)); assertThat(p.isVisible(), is(true)); assertThat(p.shouldUseCache(), is(false)); }
assertThat(p.getFilters().length, is(0)); assertThat(p.getInterpolation(), is(AbstractPainter.Interpolation.NearestNeighbor)); assertThat(p.isAntialiasing(), is(true)); assertThat(p.isCacheable(), is(true)); assertThat(p.isCacheCleared(), is(true));
assertThat(p.getFilters().length, is(0)); assertThat(p.getInterpolation(), is(AbstractPainter.Interpolation.NearestNeighbor)); assertThat(p.isAntialiasing(), is(true)); assertThat(p.isCacheable(), is(false)); assertThat(p.isCacheCleared(), is(true));