All Downloads are FREE. Search and download functionalities are using the official Maven repository.

griffon.pivot.support.adapters.ActionClassAdapter Maven / Gradle / Ivy

There is a newer version: 2.16.0
Show newest version
/*
 * Copyright 2008-2017 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package griffon.pivot.support.adapters;

import griffon.core.CallableWithArgs;

/**
 * @author Andres Almiray
 * @since 2.0.0
 */
public class ActionClassAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.ActionClassListener {
    private CallableWithArgs actionAdded;
    private CallableWithArgs actionUpdated;
    private CallableWithArgs actionRemoved;

    public CallableWithArgs getActionAdded() {
        return this.actionAdded;
    }

    public CallableWithArgs getActionUpdated() {
        return this.actionUpdated;
    }

    public CallableWithArgs getActionRemoved() {
        return this.actionRemoved;
    }


    public void setActionAdded(CallableWithArgs actionAdded) {
        this.actionAdded = actionAdded;
    }

    public void setActionUpdated(CallableWithArgs actionUpdated) {
        this.actionUpdated = actionUpdated;
    }

    public void setActionRemoved(CallableWithArgs actionRemoved) {
        this.actionRemoved = actionRemoved;
    }


    public void actionAdded(java.lang.String arg0) {
        if (actionAdded != null) {
            actionAdded.call(arg0);
        }
    }

    public void actionUpdated(java.lang.String arg0, org.apache.pivot.wtk.Action arg1) {
        if (actionUpdated != null) {
            actionUpdated.call(arg0, arg1);
        }
    }

    public void actionRemoved(java.lang.String arg0, org.apache.pivot.wtk.Action arg1) {
        if (actionRemoved != null) {
            actionRemoved.call(arg0, arg1);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy