Package fr.soleil.salsa.client.entity.event

Examples of fr.soleil.salsa.client.entity.event.Config2DModel


     */
    public void startListening(IConfig<?> config) {
        if (config != null) {
            stopListening();

            Config2DModel config2DModel = (Config2DModel) config;
            config2DModel.addListener(listenerConfig2D);

            Dimension2DYModel dimension2DYModel = (Dimension2DYModel) config2DModel.getDimensionY();
            dimension2DYModel.addListener(listenerDimension2DY);

            for (IActuator actuator : dimension2DYModel.getActuatorsList()) {
                ((ActuatorModel) actuator).addListener(listenerActuator);
            }
View Full Code Here


    /**
     * Stop listening to a config and its elements.
     */
    public void stopListening() {
        if (config != null) {
            Config2DModel config2DModel = (Config2DModel) config;
            config2DModel.removeListener(listenerConfig2D);

            Dimension2DYModel dimension2DYModel = (Dimension2DYModel) config2DModel.getDimensionY();
            dimension2DYModel.removeListener(listenerDimension2DY);

            for (IActuator actuator : dimension2DYModel.getActuatorsList()) {
                ((ActuatorModel) actuator).removeListener(listenerActuator);
            }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.client.entity.event.Config2DModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.