After using my brain for half a second we have:
For a more complicated thing - that is still in the style package:
    public void setFill(Fill fill) {
        if( this.fill == fill ) return;
        if( this.fill != null ){
            fireChildRemoved( fill );
        }
        this.fill = fill;
        if( fill != null ){
            fireChildAdded( fill );
        }            }
public void setFill(Fill fill) {
   if( this.fill == fill ) return;
   fireChildRemoved( this.fill );
   this.fill = fill;
   fireChildAdded( fill );
}

Which is a lot more maintainable.
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to