/*
 * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 */

package com.sun.javafx.tk.quantum;

public class GlassPrismMouseEvent implements PrismEvent {
    ViewScene view;
    int type;
    int button;
    int x;
    int y;
    int xAbs;
    int yAbs;
    int clickCount;
    int modifiers;
    boolean isPopupTrigger;
    boolean isSynthesized;
    double wheelRotation;
    
    protected GlassPrismMouseEvent(final ViewScene view, final int type, final int button, 
                                   final int x, final int y, final int xAbs, final int yAbs,
                                   final int clickCount, final int modifiers, final boolean isPopupTrigger,
                                   final boolean isSynthesized, double wheelRotation) {
        this.view = view;
        this.type = type;
        this.button = button;
        this.x = x;
        this.y = y;
        this.xAbs = xAbs;
        this.yAbs = yAbs;
        this.clickCount = clickCount;
        this.modifiers = modifiers;
        this.isPopupTrigger = isPopupTrigger;
        this.wheelRotation = wheelRotation;
        this.isSynthesized = isSynthesized;
    }

    // Primarily used for synthetic DnD-related events
    protected GlassPrismMouseEvent(final ViewScene view, final int type, final int button, 
                                   final int x, final int y, final int xAbs, final int yAbs,
                                   final boolean isSynthesized) {
        this(view, type, button, x, y, xAbs, yAbs, 1, 0, false, isSynthesized, 0.0);
    }
    
    protected ViewScene view() {
        return this.view;
    }

    protected int type() {
        return this.type;
    }

    protected int button() {
        return this.button;
    }

    protected int x() {
        return this.x;
    }

    protected int y() {
        return this.y;
    }

    protected int xAbs() {
        return this.xAbs;
    }

    protected int yAbs() {
        return this.yAbs;
    }
    
    protected int clickCount() {
        return this.clickCount;
    }

    protected int modifiers() {
        return this.modifiers;
    }

    protected boolean isPopupTrigger() {
        return this.isPopupTrigger;
    }

    protected double wheelRotation() {
        return this.wheelRotation;
    }

    protected boolean isSynthesized() {
        return isSynthesized;
    }
}
