/** * Sets the path effects to be drawn on this painter. Set this to null in order to remove all installed effects. * @param areaEffects the effects to apply to this painter */ public void setAreaEffects(AreaEffect... areaEffects) { AreaEffect[] old = getAreaEffects(); this.areaEffects = new AreaEffect[areaEffects == null ? 0 : areaEffects.length]; if (areaEffects != null) { System.arraycopy(areaEffects, 0, this.areaEffects, 0, this.areaEffects.length); } setDirty(true); firePropertyChange("areaEffects", old, getAreaEffects()); }
/** * Sets the path effects to be drawn on this painter. Set this to null in order to remove all installed effects. * @param areaEffects the effects to apply to this painter */ public void setAreaEffects(AreaEffect... areaEffects) { AreaEffect[] old = getAreaEffects(); this.areaEffects = new AreaEffect[areaEffects == null ? 0 : areaEffects.length]; if (areaEffects != null) { System.arraycopy(areaEffects, 0, this.areaEffects, 0, this.areaEffects.length); } setDirty(true); firePropertyChange("areaEffects", old, getAreaEffects()); }
/** * Sets the path effects to be drawn on this painter. Set this to null in order to remove all installed effects. * @param areaEffects the effects to apply to this painter */ public void setAreaEffects(AreaEffect... areaEffects) { AreaEffect[] old = getAreaEffects(); this.areaEffects = new AreaEffect[areaEffects == null ? 0 : areaEffects.length]; if (areaEffects != null) { System.arraycopy(areaEffects, 0, this.areaEffects, 0, this.areaEffects.length); } setDirty(true); firePropertyChange("areaEffects", old, getAreaEffects()); }
/** * Sets the path effects to be drawn on this painter. Set this to null in order to remove all installed effects. * @param areaEffects the effects to apply to this painter */ public void setAreaEffects(AreaEffect... areaEffects) { AreaEffect[] old = getAreaEffects(); this.areaEffects = new AreaEffect[areaEffects == null ? 0 : areaEffects.length]; if (areaEffects != null) { System.arraycopy(areaEffects, 0, this.areaEffects, 0, this.areaEffects.length); } setDirty(true); firePropertyChange("areaEffects", old, getAreaEffects()); }
@Test @Override public void testDefaults() { super.testDefaults(); AbstractAreaPainter aap = (AbstractAreaPainter) p; assertThat(aap.getAreaEffects(), is(new AreaEffect[0])); assertThat(aap.getBorderPaint(), is(nullValue())); assertThat(aap.getBorderWidth(), is(0f)); assertThat(aap.getFillPaint(), CoreMatchers.<Paint>is(Color.RED)); assertThat(aap.getStyle(), is(AbstractAreaPainter.Style.BOTH)); } }
assertThat(aap.getAreaEffects(), is(new AreaEffect[0])); assertThat(aap.getBorderPaint(), is(nullValue())); assertThat(aap.getBorderWidth(), is(0f));
assertThat(aap.getAreaEffects(), is(new AreaEffect[0])); assertThat(aap.getBorderPaint(), CoreMatchers.<Paint>is(Color.BLACK)); assertThat(aap.getBorderWidth(), is(1f));