package net.voxelindustry.brokkgui.behavior;

import net.voxelindustry.brokkgui.control.GuiControl;

public class GuiBehaviorBase<C extends GuiControl>
{
    private C model;

    public GuiBehaviorBase(final C model)
    {
        if (model == null)
            throw new IllegalArgumentException("Cannot pass a null model");
        this.model = model;

        this.model.getFocusedProperty().addListener(property -> this.onFocusChanged());
        this.model.getDisabledProperty().addListener(property -> this.onDisableChanged());
        this.model.getHoveredProperty().addListener(property -> this.onHoverChanged());
    }

    public void setModel(final C model)
    {
        this.model = model;
    }

    public C getModel()
    {
        return this.model;
    }

    /////////////////////
    // EVENTS HANDLING //
    /////////////////////

    protected void onFocusChanged()
    {
    }

    protected void onDisableChanged()
    {
    }

    protected void onHoverChanged()
    {
    }
}
@@ -352,648 +352,152 @@
 el;%0A
-%0A        this.model.getFocusedProperty().addListener(property -%3E this.onFocusChanged());%0A        this.model.getDisabledProperty().addListener(property -%3E this.onDisableChanged());%0A        this.model.getHoveredProperty().addListener(property -%3E this.onHoverChanged());%0A    %7D%0A%0A    public void setModel(final C model)%0A    %7B%0A        this.model = model;%0A    %7D%0A%0A    public C getModel()%0A    %7B%0A        return this.model;%0A    %7D%0A%0A    /////////////////////%0A    // EVENTS HANDLING //%0A    /////////////////////%0A%0A    protected void onFocusChanged()%0A    %7B%0A    %7D%0A%0A    protected void onDisableChanged()%0A    %7B%0A    %7D%0A%0A    protected void onHoverChanged()%0A    %7B
+    %7D%0A%0A    public void setModel(final C model)%0A    %7B%0A        this.model = model;%0A    %7D%0A%0A    public C getModel()%0A    %7B%0A        return this.model;
 %0A   

Remove useless behavior binding