private static void testMouseInfoPeer() { Toolkit toolkit = Toolkit.getDefaultToolkit(); if (toolkit instanceof ComponentFactory) { ComponentFactory componentFactory = (ComponentFactory) toolkit; MouseInfoPeer mouseInfoPeer = componentFactory.getMouseInfoPeer(); mouseInfoPeer.fillPointWithCoords(new Point()); Window win = new Window(null); win.setSize(300, 300); win.setVisible(true); mouseInfoPeer.isWindowUnderMouse(win); win.dispose(); } }
protected MouseInfoPeer getMouseInfoPeer() { return new GtkMouseInfoPeer(); }
protected java.awt.peer.MouseInfoPeer getMouseInfoPeer() { return new MouseInfoPeer() { }; }
@Override protected MouseInfoPeer getMouseInfoPeer() { return new GMouseInfoPeer(); }
/** * Returns a MouseInfoPeer. * The default implementation of this method throws * UnsupportedOperationException. * * Toolkit implementations should overload this if possible, however. */ protected MouseInfoPeer getMouseInfoPeer() { throw new UnsupportedOperationException("No mouse info peer."); }