X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Fdiagram%2Fparticipant%2Fpointertool%2FAbstractMode.java;h=cc910caf721deb493ff1dd10d04a995ea3887db7;hb=72542227673047d71c3c3f281e478c1bea82eb81;hp=ea1cc26bd1c092aa7cfaa3737921563a2f970a93;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/pointertool/AbstractMode.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/pointertool/AbstractMode.java index ea1cc26bd..cc910caf7 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/pointertool/AbstractMode.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/pointertool/AbstractMode.java @@ -1,44 +1,44 @@ -/******************************************************************************* - * 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.g2d.diagram.participant.pointertool; - -import org.simantics.g2d.diagram.participant.AbstractDiagramParticipant; -import org.simantics.scenegraph.g2d.events.MouseEvent; - -/** - * @author Toni Kalajainen - */ -public abstract class AbstractMode extends AbstractDiagramParticipant { - - /** - * ID of the mouse that is used for this mode participant. In a single-mouse - * setup it will be 0, but may be > 0 in a multi-mouse setup. - */ - protected int mouseId; - - public AbstractMode(int mouseId) { - this.mouseId = mouseId; - } - - public int getMouseId() { - return mouseId; - } - - public void setMouseId(int mouseId) { - this.mouseId = mouseId; - } - - protected boolean isModeMouse(MouseEvent e) { - return e.mouseId == mouseId; - } - -} +/******************************************************************************* + * 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.g2d.diagram.participant.pointertool; + +import org.simantics.g2d.diagram.participant.AbstractDiagramParticipant; +import org.simantics.scenegraph.g2d.events.MouseEvent; + +/** + * @author Toni Kalajainen + */ +public abstract class AbstractMode extends AbstractDiagramParticipant { + + /** + * ID of the mouse that is used for this mode participant. In a single-mouse + * setup it will be 0, but may be > 0 in a multi-mouse setup. + */ + protected int mouseId; + + public AbstractMode(int mouseId) { + this.mouseId = mouseId; + } + + public int getMouseId() { + return mouseId; + } + + public void setMouseId(int mouseId) { + this.mouseId = mouseId; + } + + protected boolean isModeMouse(MouseEvent e) { + return e.mouseId == mouseId; + } + +}