/* ZNewLightCls.java */
package javafx.org.scene;

import com.sun.javafx.org.annotations.ZAdded;
import com.sun.javafx.org.object.base.ZDisposeableITF;
import com.sun.javafx.scene.DirtyBits;
import com.sun.javafx.sg.prism.NGNode;
import javafx.scene.LightBase;
import javafx.scene.paint.Color;

/**
 * This abstract class is only used to be the root class for new light
 * classes.<br>
 *
 * @author ZZZ. No copyright(c). Public Domain.
 */
@ZAdded
public abstract class ZNewLightCls extends LightBase
        implements ZDisposeableITF {
    // No influencingBounds: use the scope or not at place...

    /**
     * Create a new instance.
     */
    protected ZNewLightCls() {
    }

    protected ZNewLightCls(Color color) {
        super(color);
    }

    protected ZNewLightCls(boolean lightOn, Color color) {
        super(color);
        this.setLightOn(lightOn);
    }

    @Override
    public void dispose() {
        //super.dispose();
    }

    // ========================================================================
    @Override
    @Deprecated
    protected abstract NGNode impl_createPeer();
    // ========================================================================

    /**
     * Set light position.
     *
     * @param x the new X position
     * @param y the new Y position
     */
    public void setPosition(float x, float y) {
        this.setTranslateX(x);
        this.setTranslateY(y);
    }

    /**
     * Set light position.
     *
     * @param x the new X position
     * @param y the new Y position
     * @param z the new Z position
     */
    public void setPosition(float x, float y, float z) {
        this.setTranslateX(x);
        this.setTranslateY(y);
        this.setTranslateZ(z);
    }

    //@Override
    protected void lightIsChanged() {
        impl_markDirty(DirtyBits.NODE_LIGHT);
    }

    //@Override
    protected boolean isLightChanged() {
        return (impl_isDirty(DirtyBits.NODE_LIGHT));
    }
    // ========================================================================
}
