/** * <p>A convenience method for specifying the filters to use based on * BufferedImageOps. These will each be individually wrapped by an ImageFilter * and then setFilters(Effect... filters) will be called with the resulting * array</p> * * * @param effects the BufferedImageOps to wrap as filters */ public void setFilters(BufferedImageOp ... effects) { if (effects == null) effects = new BufferedImageOp[0]; BufferedImageOp[] old = getFilters(); this.filters = new BufferedImageOp[effects.length]; System.arraycopy(effects, 0, this.filters, 0, this.filters.length); setDirty(true); firePropertyChange("filters", old, getFilters()); }
/** * Sets a new value for the interpolation setting. This setting determines if interpolation * should be used when drawing scaled images. @see java.awt.RenderingHints.KEY_INTERPOLATION. * @param value the new interpolation setting */ public void setInterpolation(Interpolation value) { Object old = getInterpolation(); this.interpolation = value == null ? Interpolation.NearestNeighbor : value; if (old != value) setDirty(true); firePropertyChange("interpolation", old, getInterpolation()); }
/** * 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 a new value for the interpolation setting. This setting determines if interpolation * should be used when drawing scaled images. @see java.awt.RenderingHints.KEY_INTERPOLATION. * @param value the new interpolation setting */ public void setInterpolation(Interpolation value) { Object old = getInterpolation(); this.interpolation = value == null ? Interpolation.NearestNeighbor : value; if (old != value) setDirty(true); firePropertyChange("interpolation", old, getInterpolation()); }
/** * Sets a new value for the interpolation setting. This setting determines if interpolation * should be used when drawing scaled images. @see java.awt.RenderingHints.KEY_INTERPOLATION. * @param value the new interpolation setting */ public void setInterpolation(Interpolation value) { Object old = getInterpolation(); this.interpolation = value == null ? Interpolation.NearestNeighbor : value; if (old != value) setDirty(true); firePropertyChange("interpolation", old, getInterpolation()); }
/** * 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 a new value for the interpolation setting. This setting determines if interpolation * should be used when drawing scaled images. @see java.awt.RenderingHints.KEY_INTERPOLATION. * @param value the new interpolation setting */ public void setInterpolation(Interpolation value) { Object old = getInterpolation(); this.interpolation = value == null ? Interpolation.NearestNeighbor : value; if (old != value) setDirty(true); firePropertyChange("interpolation", old, getInterpolation()); }
/** * Sets a new value for the interpolation setting. This setting determines if interpolation * should be used when drawing scaled images. @see java.awt.RenderingHints.KEY_INTERPOLATION. * @param value the new interpolation setting */ public void setInterpolation(Interpolation value) { Object old = getInterpolation(); this.interpolation = value == null ? Interpolation.NearestNeighbor : value; if (old != value) setDirty(true); firePropertyChange("interpolation", old, getInterpolation()); }
/** * Sets a new value for the interpolation setting. This setting determines if interpolation * should be used when drawing scaled images. @see java.awt.RenderingHints.KEY_INTERPOLATION. * @param value the new interpolation setting */ public void setInterpolation(Interpolation value) { Object old = getInterpolation(); this.interpolation = value == null ? Interpolation.NearestNeighbor : value; if (old != value) setDirty(true); firePropertyChange("interpolation", old, getInterpolation()); }
/** * 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>Sets the visible property. This controls if the painter should * paint itself. It is true by default. Setting visible to false * is good when you want to temporarily turn off a painter. An example * of this is a painter that you only use when a button is highlighted.</p> * * @param visible New value of visible property. */ public void setVisible(boolean visible) { boolean old = isVisible(); this.visible = visible; if (old != visible) setDirty(true); //not the most efficient, but I must do this otherwise a CompoundPainter //or other aggregate painter won't know that it is now invalid //there might be a tricky solution but that is a performance optimization firePropertyChange("visible", old, isVisible()); }
/** * <p>Sets the visible property. This controls if the painter should * paint itself. It is true by default. Setting visible to false * is good when you want to temporarily turn off a painter. An example * of this is a painter that you only use when a button is highlighted.</p> * * @param visible New value of visible property. */ public void setVisible(boolean visible) { boolean old = isVisible(); this.visible = visible; if (old != visible) setDirty(true); //not the most efficient, but I must do this otherwise a CompoundPainter //or other aggregate painter won't know that it is now invalid //there might be a tricky solution but that is a performance optimization firePropertyChange("visible", old, isVisible()); }
/** * <p>Sets the visible property. This controls if the painter should * paint itself. It is true by default. Setting visible to false * is good when you want to temporarily turn off a painter. An example * of this is a painter that you only use when a button is highlighted.</p> * * @param visible New value of visible property. */ public void setVisible(boolean visible) { boolean old = isVisible(); this.visible = visible; if (old != visible) setDirty(true); //not the most efficient, but I must do this otherwise a CompoundPainter //or other aggregate painter won't know that it is now invalid //there might be a tricky solution but that is a performance optimization firePropertyChange("visible", old, isVisible()); }
@Override protected void setDirty(boolean d) { boolean old = super.isDirty(); boolean ours = isDirty(); super.setDirty(d); //must perform this check to ensure we do not double notify if (d != old && d == ours) { firePropertyChange("dirty", old, isDirty()); } }
/** * {@inheritDoc} */ @Override protected void setDirty(boolean d) { boolean old = super.isDirty(); boolean ours = isDirty(); super.setDirty(d); //must perform this check to ensure we do not double notify if (d != old && d == ours) { firePropertyChange("dirty", old, isDirty()); } }
/** * {@inheritDoc} */ @Override protected void setDirty(boolean d) { boolean old = super.isDirty(); boolean ours = isDirty(); super.setDirty(d); //must perform this check to ensure we do not double notify if (d != old && d == ours) { firePropertyChange("dirty", old, isDirty()); } }
/** * {@inheritDoc} */ @Override protected void setDirty(boolean d) { boolean old = super.isDirty(); boolean ours = isDirty(); super.setDirty(d); //must perform this check to ensure we do not double notify if (d != old && d == ours) { firePropertyChange("dirty", old, isDirty()); } }