/** * Set the flag used by {@link #isDirty()} to check if the * child <code>Painter</code>s should be checked for their * <code>dirty</code> flag as part of processing. * * @see #isCheckingDirtyChildPainters() * @see #isDirty() */ public void setCheckingDirtyChildPainters(boolean b) { boolean old = isCheckingDirtyChildPainters(); this.checkForDirtyChildPainters = b; firePropertyChange("checkingDirtyChildPainters",old, isCheckingDirtyChildPainters()); }
/** * Set the flag used by {@link #isDirty()} to check if the * child <code>Painter</code>s should be checked for their * <code>dirty</code> flag as part of processing. * * @see #isCheckingDirtyChildPainters() * @see #isDirty() */ public void setCheckingDirtyChildPainters(boolean b) { boolean old = isCheckingDirtyChildPainters(); this.checkForDirtyChildPainters = b; firePropertyChange("checkingDirtyChildPainters",old, isCheckingDirtyChildPainters()); }
/** * Set the flag used by {@link #isDirty()} to check if the * child <code>Painter</code>s should be checked for their * <code>dirty</code> flag as part of processing. * * @see #isCheckingDirtyChildPainters() * @see #isDirty() */ public void setCheckingDirtyChildPainters(boolean b) { boolean old = isCheckingDirtyChildPainters(); this.checkForDirtyChildPainters = b; firePropertyChange("checkingDirtyChildPainters",old, isCheckingDirtyChildPainters()); }
/** * Set the flag used by {@link #isDirty()} to check if the * child <code>Painter</code>s should be checked for their * <code>dirty</code> flag as part of processing. * * @see #isCheckingDirtyChildPainters() * @see #isDirty() */ public void setCheckingDirtyChildPainters(boolean b) { boolean old = isCheckingDirtyChildPainters(); this.checkForDirtyChildPainters = b; firePropertyChange("checkingDirtyChildPainters",old, isCheckingDirtyChildPainters()); }
/** * Set the flag used by {@link #isDirty()} to check if the * child <code>Painter</code>s should be checked for their * <code>dirty</code> flag as part of processing. * @param b the dirty check flag * * @see #isCheckingDirtyChildPainters() * @see #isDirty() */ public void setCheckingDirtyChildPainters(boolean b) { boolean old = isCheckingDirtyChildPainters(); this.checkForDirtyChildPainters = b; firePropertyChange("checkingDirtyChildPainters", old, isCheckingDirtyChildPainters()); }
/** * {@inheritDoc} * * @impl This <code>CompoundPainter</code> is dirty if it, or (optionally) any of its children, * are dirty. If the super implementation returns <code>true</code>, we return * <code>true</code>. Otherwise, if {@link #isCheckingDirtyChildPainters()} is * <code>true</code>, we iterate over all child <code>Painter</code>s and query them to * see if they are dirty. If so, then <code>true</code> is returned. Otherwise, we return * <code>false</code>. * @see #isCheckingDirtyChildPainters() */ @Override protected boolean isDirty() { boolean dirty = super.isDirty(); if (dirty) { return true; } else if (isCheckingDirtyChildPainters()) { for (Painter<?> p : painters) { if (p instanceof AbstractPainter) { AbstractPainter<?> ap = (AbstractPainter<?>) p; if (ap.isDirty()) { return true; } } } } return false; }
/** * <p>This <code>CompoundPainter</code> is dirty if it, or (optionally) * any of its children, are dirty. If the super implementation returns * <code>true</code>, we return <code>true</code>. Otherwise, if * {@link #isCheckingDirtyChildPainters()} is <code>true</code>, we iterate * over all child <code>Painter</code>s and query them to see * if they are dirty. If so, then <code>true</code> is returned. * Otherwise, we return <code>false</code>.</p> * * {@inheritDoc} * {@see #isCheckingDirtyChildPainters()} */ @Override protected boolean isDirty() { boolean dirty = super.isDirty(); if (dirty) { return true; } else if (isCheckingDirtyChildPainters()) { for (Painter p : painters) { if (p instanceof AbstractPainter) { AbstractPainter ap = (AbstractPainter)p; if (ap.isDirty()) { return true; } } } } return false; }
/** * {@inheritDoc} * * @impl This <code>CompoundPainter</code> is dirty if it, or (optionally) any of its children, * are dirty. If the super implementation returns <code>true</code>, we return * <code>true</code>. Otherwise, if {@link #isCheckingDirtyChildPainters()} is * <code>true</code>, we iterate over all child <code>Painter</code>s and query them to * see if they are dirty. If so, then <code>true</code> is returned. Otherwise, we return * <code>false</code>. * @see #isCheckingDirtyChildPainters() */ @Override protected boolean isDirty() { boolean dirty = super.isDirty(); if (dirty) { return true; } else if (isCheckingDirtyChildPainters()) { for (Painter<?> p : painters) { if (p instanceof AbstractPainter) { AbstractPainter<?> ap = (AbstractPainter<?>) p; if (ap.isDirty()) { return true; } } } } return false; }
/** * {@inheritDoc} * * @impl This <code>CompoundPainter</code> is dirty if it, or (optionally) any of its children, * are dirty. If the super implementation returns <code>true</code>, we return * <code>true</code>. Otherwise, if {@link #isCheckingDirtyChildPainters()} is * <code>true</code>, we iterate over all child <code>Painter</code>s and query them to * see if they are dirty. If so, then <code>true</code> is returned. Otherwise, we return * <code>false</code>. * @see #isCheckingDirtyChildPainters() */ @Override protected boolean isDirty() { boolean dirty = super.isDirty(); if (dirty) { return true; } else if (isCheckingDirtyChildPainters()) { for (Painter<?> p : painters) { if (p instanceof AbstractPainter) { AbstractPainter<?> ap = (AbstractPainter<?>) p; if (ap.isDirty()) { return true; } } } } return false; }
/** * {@inheritDoc} * <p> * Overridden for CompoundPainter defaults. */ @Test @Override public void testDefaults() { //TODO replace with super.testDefaults() when corrected copyOfSuper_testDefaultsWithCorrectedValues(); // super.testDefaults(); CompoundPainter cp = (CompoundPainter) p; assertThat(cp.getPainters(), is(new Painter[0])); assertThat(cp.getTransform(), is(nullValue())); assertThat(cp.isCheckingDirtyChildPainters(), is(true)); assertThat(cp.isClipPreserved(), is(false)); }