Search in sources :

Example 1 with GlobalAttributed

use of edu.cmu.cs.hcii.cogtool.util.GlobalAttributed in project cogtool by cogtool.

the class AScriptStep method overrideAttribute.

public void overrideAttribute(IAttributed attributed, String attrName, Object value) {
    IAttributed override;
    if (attributed == getStepFocus()) {
        override = this;
    } else {
        if (overrides == null) {
            overrides = new HashMap<IAttributed, IAttributed>();
        }
        override = overrides.get(attributed);
        if (override == null) {
            override = new GlobalAttributed();
            overrides.put(attributed, override);
        }
    }
    override.setAttribute(attrName, value);
    attributed.raiseAlert(new OverrideChange(this, attrName, true));
}
Also used : IAttributed(edu.cmu.cs.hcii.cogtool.util.IAttributed) GlobalAttributed(edu.cmu.cs.hcii.cogtool.util.GlobalAttributed)

Aggregations

GlobalAttributed (edu.cmu.cs.hcii.cogtool.util.GlobalAttributed)1 IAttributed (edu.cmu.cs.hcii.cogtool.util.IAttributed)1