/** * Sets if the clip should be preserved. * Normally the clip will be reset between each painter. Setting clipPreserved to * true can be used to let one painter mask other painters that come after it. * * @param shouldRestoreState new value of the clipPreserved property * @see #isClipPreserved() */ public void setClipPreserved(boolean shouldRestoreState) { boolean oldShouldRestoreState = isClipPreserved(); this.clipPreserved = shouldRestoreState; setDirty(true); firePropertyChange("clipPreserved",oldShouldRestoreState,shouldRestoreState); }
/** * Sets if the clip should be preserved. * Normally the clip will be reset between each painter. Setting clipPreserved to * true can be used to let one painter mask other painters that come after it. * * @param shouldRestoreState new value of the clipPreserved property * @see #isClipPreserved() */ public void setClipPreserved(boolean shouldRestoreState) { boolean oldShouldRestoreState = isClipPreserved(); this.clipPreserved = shouldRestoreState; setDirty(true); firePropertyChange("clipPreserved",oldShouldRestoreState,shouldRestoreState); }
/** * Sets if the clip should be preserved. * Normally the clip will be reset between each painter. Setting clipPreserved to * true can be used to let one painter mask other painters that come after it. * * @param shouldRestoreState new value of the clipPreserved property * @see #isClipPreserved() */ public void setClipPreserved(boolean shouldRestoreState) { boolean oldShouldRestoreState = isClipPreserved(); this.clipPreserved = shouldRestoreState; setDirty(true); firePropertyChange("clipPreserved",oldShouldRestoreState,shouldRestoreState); }
/** * Sets if the clip should be preserved. * Normally the clip will be reset between each painter. Setting clipPreserved to * true can be used to let one painter mask other painters that come after it. * * @param shouldRestoreState new value of the clipPreserved property * @see #isClipPreserved() */ public void setClipPreserved(boolean shouldRestoreState) { boolean oldShouldRestoreState = isClipPreserved(); this.clipPreserved = shouldRestoreState; setDirty(true); firePropertyChange("clipPreserved",oldShouldRestoreState,shouldRestoreState); }
/** * Sets if the clip should be preserved. * Normally the clip will be reset between each painter. Setting clipPreserved to * true can be used to let one painter mask other painters that come after it. * * @param shouldRestoreState new value of the clipPreserved property * @see #isClipPreserved() */ public void setClipPreserved(boolean shouldRestoreState) { boolean oldShouldRestoreState = isClipPreserved(); this.clipPreserved = shouldRestoreState; setDirty(true); firePropertyChange("clipPreserved", oldShouldRestoreState, shouldRestoreState); }
/** * {@inheritDoc} */ @Override protected void doPaint(Graphics2D g, T component, int width, int height) { for (Painter<T> p : getPainters()) { Graphics2D temp = (Graphics2D) g.create(); try { p.paint(temp, component, width, height); if(isClipPreserved()) { g.setClip(temp.getClip()); } } finally { temp.dispose(); } } }
/** * {@inheritDoc} */ @Override protected void doPaint(Graphics2D g, T component, int width, int height) { for (Painter<T> p : getPainters()) { Graphics2D temp = (Graphics2D) g.create(); try { p.paint(temp, component, width, height); if(isClipPreserved()) { g.setClip(temp.getClip()); } } finally { temp.dispose(); } } }
/** * {@inheritDoc} */ @Override protected void doPaint(Graphics2D g, T component, int width, int height) { for (Painter<T> p : getPainters()) { Graphics2D temp = (Graphics2D) g.create(); try { p.paint(temp, component, width, height); if(isClipPreserved()) { g.setClip(temp.getClip()); } } finally { temp.dispose(); } } }
/** * {@inheritDoc} */ @Override protected void doPaint(Graphics2D g, T component, int width, int height) { for (Painter p : getPainters()) { Graphics2D temp = (Graphics2D) g.create(); try { p.paint(temp, component, width, height); if(isClipPreserved()) { g.setClip(temp.getClip()); } } finally { temp.dispose(); } } }
@Override protected void doPaint(Graphics2D g, T component, int width, int height) { for (Painter<T> p : getPainters()) { Graphics2D temp = (Graphics2D) g.create(); try { p.paint(temp, component, width, height); if (isClipPreserved()) { g.setClip(temp.getClip()); } } finally { temp.dispose(); } } }
/** * {@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)); }