X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scenegraph%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Fg2d%2Fevents%2FEvent.java;h=a4aad2e437fae53bb7757cf5a013126f4b1f4147;hp=5c06ad4b38f01c0664bc5d5a38aece1d68095b4f;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/events/Event.java b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/events/Event.java index 5c06ad4b3..a4aad2e43 100644 --- a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/events/Event.java +++ b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/events/Event.java @@ -1,62 +1,62 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.scenegraph.g2d.events; - -import java.io.Serializable; - -import org.simantics.scenegraph.g2d.events.MouseEvent.MouseClickEvent; -import org.simantics.scenegraph.g2d.events.command.CommandEvent; - -/** - * @see EventTypes - * @see TimeEvent Time Heatbeat event - * @see CommandEvent Command event - * @see KeyEvent Keyboard events - * @see MouseClickEvent Mouse click event - * @see MouseEvent Other mouse event - * - * @author Toni Kalajainen - */ -public abstract class Event implements Cloneable, Serializable { - - private static final long serialVersionUID = -6939802269348658216L; - - /** - * Object describing the context of event occurrence. Usually an AWT UI - * component. - */ - public transient final Object context; - - /** - * Time when event occured. The value is relative; values are comparable - * only in the same domain of events (e.g. mouse or key events). The unit is - * millisecond. - * - * TODO MAKE BETTER SPECIFICATION - */ - public final long time; - - public Event(Object context, long time) { - this.context = context; - this.time = time; - } - - public Object getContext() { - return context; - } - - @Override - public String toString() { - return getClass().getSimpleName() + "[time=" + time + "]"; - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.scenegraph.g2d.events; + +import java.io.Serializable; + +import org.simantics.scenegraph.g2d.events.MouseEvent.MouseClickEvent; +import org.simantics.scenegraph.g2d.events.command.CommandEvent; + +/** + * @see EventTypes + * @see TimeEvent Time Heatbeat event + * @see CommandEvent Command event + * @see KeyEvent Keyboard events + * @see MouseClickEvent Mouse click event + * @see MouseEvent Other mouse event + * + * @author Toni Kalajainen + */ +public abstract class Event implements Cloneable, Serializable { + + private static final long serialVersionUID = -6939802269348658216L; + + /** + * Object describing the context of event occurrence. Usually an AWT UI + * component. + */ + public transient final Object context; + + /** + * Time when event occured. The value is relative; values are comparable + * only in the same domain of events (e.g. mouse or key events). The unit is + * millisecond. + * + * TODO MAKE BETTER SPECIFICATION + */ + public final long time; + + public Event(Object context, long time) { + this.context = context; + this.time = time; + } + + public Object getContext() { + return context; + } + + @Override + public String toString() { + return getClass().getSimpleName() + "[time=" + time + "]"; + } + +}