01: /*
02: * MouseTrackerListener.java
03: *
04: * Created on November 28, 2006, 7:50 AM
05: *
06: * Copyright 2006-2007 Nigel Hughes
07: *
08: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
09: * in compliance with the License. You may obtain a copy of the License at http://www.apache.org/
10: * licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12: * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
13: * governing permissions and limitations under the License.
14: */
15:
16: package com.blogofbug.swing.delegates;
17:
18: import java.awt.Point;
19:
20: /**
21: * Implemented by objects wanting to respond to mouse tracker events, the interface provides
22: * a lighter-weight version of the java mouse events.
23: * @author nigel
24: */
25: public interface MouseTrackerListener {
26:
27: /**
28: * Called by a mouse tracker when the mouse moves inside the associated component
29: *
30: * @param mouseEntered True if it's entering, false if it's leaving
31: */
32: public void mouseCrossThreshold(boolean mouseEntered);
33:
34: /**
35: * Called by a MouseTracker when the mouse moves, always in component local co-ordinates
36: *
37: * @param position The position the mouse is in relative to the component
38: */
39: public void mouseMoved(Point position);
40: }
|