Griffon Guide 0.9.5-rc2 - Reference Documentation

# attributeDelegates

## Purpose

Provide attributeDelegates to builders.

## Examples

    class SampleGriffonAddon {
        def attributeDelegates = [
            {builder, node, attributes ->
               if(attributes.remove('important')) {
                   node.foreground = java.awt.Color.RED
               }
            }
        ]
    }

## Description

Attribute delegates are builder strategies for fine tuning attributes before they are set on any node. Essentially you'll be able to add, remove, modify attributes for all nodes registered to a builder. You can intercept synthetic properties in this way, as the previous example shows with 'important'.