001/* [{ 002Copyright 2007, 2008 Nicolas Carranza <nicarran at gmail.com> 003 004This file is part of jpen. 005 006jpen is free software: you can redistribute it and/or modify 007it under the terms of the GNU Lesser General Public License as published by 008the Free Software Foundation, either version 3 of the License, 009or (at your option) any later version. 010 011jpen is distributed in the hope that it will be useful, 012but WITHOUT ANY WARRANTY; without even the implied warranty of 013MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014GNU Lesser General Public License for more details. 015 016You should have received a copy of the GNU Lesser General Public License 017along with jpen. If not, see <http://www.gnu.org/licenses/>. 018}] */ 019package jpen; 020 021import jpen.event.PenListener; 022 023public class PScrollEvent 024 extends PenEvent 025 implements java.io.Serializable { 026 public static final long serialVersionUID=1l; 027 028 public final PScroll scroll; 029 030 PScrollEvent(PenDevice device, long deviceTime, PScroll scroll) { 031 super(device, deviceTime); 032 this.scroll=scroll; 033 } 034 035 @Override 036 void copyTo(PenState penState){} 037 038 @Override 039 void dispatch() { 040 for(PenListener l:pen.getListenersArray()) 041 l.penScrollEvent(this); 042 } 043 044 @Override 045 public String toString(){ 046 return "[PScrollEvent: super="+super.toString()+", scroll="+scroll+"]"; 047 } 048}