import java.awt.*; import java.awt.image.*; import java.net.*; // Freedom VR 2.0 // (C) 1997 Paul A. Houle (houle@msc.cornell.edu) // http://www.honeylocust.com/vr/ // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // (or see http://www.gnu.org/copyleft/gpl.html) public interface fvr2Hotspot { /** * * @param theApplet the fvr2 that I'm supposed to be attached to; I get * called immediately after an instance of the plug-in is constructed. * I would be in the constructor, except when a class is loaded dynamically * we're only allowed to construct with the null constructor. * */ public void attachApplet(fvr2 theApplet); /** * * This method is called by Freedom VR when it wants to know if a * particular point is inside the Hotspot. * * @param frame_i frame number in horizontal direction * @param frame_j frame number in vertical direction * @param x x coordinate of cursor * @param y y coordinate of cursor * @return true if mouse is over hotspot, false if not */ public boolean isMouseOver(int frame_i, int frame_j, int x, int y); /** * * This method is called by Freedom VR if it wants to know if the * Hotspot is in a particular frame or not; note that a single Hotspot * object is allowed to lie in more than one frame. * * @param frame_i frame number in horizontal direction * @param frame_j frame number in vertical direction * @return true if hotspot can be triggered in frame, false if not * */ public boolean isInFrame(int frame_i, int frame_j); /** * * This method will be called when fvr2 wants to notify the Hotspot * that the mouse has passed over it * */ public void mouseOver(); /** * * This method will be called when fvr2 wants to notify the Hostspot * that the mouse has moved away from it. * */ public void mouseOut(); /** * * This method will be called when the mouse button is depressed * when the mouse is over the hotspot. * * */ public void mouseDown(); /** * * This method will be called when the mouse button is released when * the mouse is over the hotspot. This is the method which should go * to a URL or otherwise perform an action. * * */ public void mouseUp(); /** * * This method draws the Hotspot. In many respects the Hotspot is a * lightweight component, just one that works with JDK 1.0.2 * */ public void paint(Graphics g); }