Line | Hits | Source |
---|---|---|
1 | /* | |
2 | * Copyright (c) 2005, the JUNG Project and the Regents of the University of | |
3 | * California All rights reserved. | |
4 | * | |
5 | * This software is open-source under the BSD license; see either "license.txt" | |
6 | * or http://jung.sourceforge.net/license.txt for a description. | |
7 | * | |
8 | * Created on Jul 6, 2005 | |
9 | */ | |
10 | ||
11 | package edu.uci.ics.jung.visualization.control; | |
12 | ||
13 | import java.awt.event.MouseAdapter; | |
14 | import java.awt.event.MouseEvent; | |
15 | ||
16 | /** | |
17 | * Simple extension of MouseAdapter that supplies modifier | |
18 | * checking | |
19 | * | |
20 | * @author Tom Nelson - RABA Technologies | |
21 | * | |
22 | */ | |
23 | public class GraphMouseAdapter extends MouseAdapter { | |
24 | ||
25 | protected int modifiers; | |
26 | ||
27 | 0 | public GraphMouseAdapter(int modifiers) { |
28 | 0 | this.modifiers = modifiers; |
29 | 0 | } |
30 | ||
31 | public int getModifiers() { | |
32 | 0 | return modifiers; |
33 | } | |
34 | ||
35 | public void setModifiers(int modifiers) { | |
36 | 0 | this.modifiers = modifiers; |
37 | 0 | } |
38 | ||
39 | protected boolean checkModifiers(MouseEvent e) { | |
40 | 0 | return e.getModifiers() == modifiers; |
41 | } | |
42 | } |
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |