/*
test %I% %E%
@bug 6315717
@summary verifies that MouseEvent could be constructed correctly for mouse extra buttons in regard to sun.awt.enableExtraMouseButtons property
@author Andrei Dmitriev : area=awt.event
@run main CTORRestrictions
*/
/*
* verify that user can create the MouseEvent? with button1|2|3|4|5|... when property "sun.awt.enableExtraMouseButtons" is true by default
*/
public class CTORRestrictions{
try {
} catch (AWTException ex) {
}
frame.setVisible(true);
System.out.println("sun.awt.enableExtraMouseButtons = "+Toolkit.getDefaultToolkit().getDesktopProperty("sun.awt.enableExtraMouseButtons"));
/*
* On Linux the native system count a wheel (both directions) as two more buttons on a mouse.
* So, MouseInfo.getNumberOfButtons() would report 5 buttons on a three-button mouse.
* On Windows it would still report that MouseInfo.getNumberOfButtons() == 3.
* We should handle XToolkit case and iterate through the buttons
* up to (MouseInfo.getNumberOfButtons() - 2) value.
*/
int numberOfButtons;
} else {
}
}
}
}
mousePosition.x, mousePosition.y,
1,
false, //popupTrigger
buttonId //button
);
}
mousePosition.x, mousePosition.y,
1,
false, //popupTrigger
buttonId //button
);
}
}