KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nightlabs > editor2d > viewer > IMouseManager


1 /* *****************************************************************************
2  * NightLabs Editor2D - Graphical editor framework *
3  * Copyright (C) 2004-2005 NightLabs - http://NightLabs.org *
4  * *
5  * This library is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU Lesser General Public *
7  * License as published by the Free Software Foundation; either *
8  * version 2.1 of the License, or (at your option) any later version. *
9  * *
10  * This library is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
13  * Lesser General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU Lesser General Public *
16  * License along with this library; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin St, Fifth Floor, *
19  * Boston, MA 02110-1301 USA *
20  * *
21  * Or get it online : *
22  * http://www.gnu.org/copyleft/lesser.html *
23  * *
24  * *
25  ******************************************************************************/

26
27 package org.nightlabs.editor2d.viewer;
28
29 import java.awt.Point JavaDoc;
30
31 import org.nightlabs.editor2d.viewer.event.IMouseChangedListener;
32 import org.nightlabs.editor2d.viewer.event.MouseListener;
33 import org.nightlabs.editor2d.viewer.event.MouseMoveListener;
34
35 public interface IMouseManager
36 {
37     /**
38      *
39      * @return the relative X-Position of the Mouse,
40      * based on the zoomFactor
41      * @see IZoomSupport
42      */

43     int getRelativeX();
44     
45     /**
46      *
47      * @return the relative Y-Position of the Mouse
48      * based on the zoomFactor
49      * @see IZoomSupport
50      *
51      */

52     int getRelativeY();
53     
54     /**
55      *
56      * @return the relative Point
57      */

58     Point JavaDoc getRelativePoint();
59     
60     /**
61      *
62      * @return the absolute X-Position of the Mouse
63      */

64     int getAbsoluteX();
65     
66     /**
67      *
68      * @return the absolute Y-Position of the Mouse
69      */

70     int getAbsoluteY();
71     
72     /**
73      *
74      * @return the Absolute Point
75      */

76     Point JavaDoc getAbsolutePoint();
77     
78 // /**
79
// *
80
// * @return the IZoomListener of the MouseManager
81
// */
82
// IZoomListener getZoomListener();
83

84     /**
85      * adds an IMouseChangedListener which will be notified of
86      * all mouseMovements
87      * @param l the IMouseChangedListener to add
88      *
89      */

90     void addMouseChangedListener(IMouseChangedListener l);
91     
92     /**
93      *
94      * @param l the IMouseChangedListener to remove
95      */

96     void removeMouseChangedListener(IMouseChangedListener l);
97     
98     /**
99      *
100      * @param l the MouseListener to add
101      * @see MouseListener
102      */

103     void addMouseListener(MouseListener l);
104     
105     /**
106      *
107      * @param l the MouseListener to remove
108      * @see MouseListener
109      */

110     void removeMouseListener(MouseListener l);
111     
112     /**
113      *
114      * @param l the MouseMoveListener to add
115      * @see MouseMoveListener
116      */

117     void addMouseMoveListener(MouseMoveListener l);
118     
119     /**
120      *
121      * @param l the MouseMoveListener to remove
122      * @see MouseMoveListener
123      */

124     void removeMouseMoveListener(MouseMoveListener l);
125     
126 // /**
127
// * called when the Mouse is moved
128
// * @param me the MouseEvent
129
// */
130
// void mouseMoved(MouseEvent me);
131
//
132
// /**
133
// * called when the mouse is pressed
134
// * @param me the MouseEvent
135
// */
136
// void mousePressed(MouseEvent me);
137
//
138
// /**
139
// * called when the mouse is released
140
// * @param me the MouseEvent
141
// */
142
// void mouseReleased(MouseEvent me);
143
}
144
Popular Tags