Java Code Examples for java.awt.peer.MouseInfoPeer

The following are top voted examples for showing how to use java.awt.peer.MouseInfoPeer. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: openjdk-jdk10   File: PointerInfoCrashTest.java   View source code 7 votes vote down vote up
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();
    }
}
 
Example 2
Project: openjdk9   File: PointerInfoCrashTest.java   View source code 6 votes vote down vote up
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();
    }
}
 
Example 3
Project: javify   File: GtkToolkit.java   View source code 4 votes vote down vote up
protected MouseInfoPeer getMouseInfoPeer()
{
  return new GtkMouseInfoPeer();
}
 
Example 4
Project: jvm-stm   File: GtkToolkit.java   View source code 4 votes vote down vote up
protected MouseInfoPeer getMouseInfoPeer()
{
  return new GtkMouseInfoPeer();
}
 
Example 5
Project: cn1   File: Toolkit.java   View source code 4 votes vote down vote up
protected java.awt.peer.MouseInfoPeer getMouseInfoPeer() {
    return new MouseInfoPeer() {
    };
}
 
Example 6
Project: JamVM-PH   File: GtkToolkit.java   View source code 4 votes vote down vote up
protected MouseInfoPeer getMouseInfoPeer()
{
  return new GtkMouseInfoPeer();
}
 
Example 7
Project: GhostAWT   File: GhostToolkit.java   View source code 4 votes vote down vote up
@Override
protected MouseInfoPeer getMouseInfoPeer() {
    return new GMouseInfoPeer();
}
 
Example 8
Project: classpath   File: GtkToolkit.java   View source code 4 votes vote down vote up
protected MouseInfoPeer getMouseInfoPeer()
{
  return new GtkMouseInfoPeer();
}
 
Example 9
Project: freeVM   File: Toolkit.java   View source code 4 votes vote down vote up
protected java.awt.peer.MouseInfoPeer getMouseInfoPeer() {
    return new MouseInfoPeer() {
    };
}
 
Example 10
Project: freeVM   File: Toolkit.java   View source code 4 votes vote down vote up
protected java.awt.peer.MouseInfoPeer getMouseInfoPeer() {
    return new MouseInfoPeer() {
    };
}
 
Example 11
Project: javify   File: Toolkit.java   View source code 2 votes vote down vote up
/**
 * 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.");
}
 
Example 12
Project: jvm-stm   File: Toolkit.java   View source code 2 votes vote down vote up
/**
 * 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.");
}
 
Example 13
Project: JamVM-PH   File: Toolkit.java   View source code 2 votes vote down vote up
/**
 * 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.");
}
 
Example 14
Project: classpath   File: Toolkit.java   View source code 2 votes vote down vote up
/**
 * 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.");
}