--- old/src/java.desktop/share/classes/java/awt/event/MouseEvent.java 2015-08-11 19:35:54.067331392 +0400 +++ new/src/java.desktop/share/classes/java/awt/event/MouseEvent.java 2015-08-11 19:35:53.903331399 +0400 @@ -78,26 +78,26 @@ * * *
- * A MouseEvent
object is passed to every
- * MouseListener
- * or MouseAdapter
object which is registered to receive
+ * A {@code MouseEvent} object is passed to every
+ * {@code MouseListener}
+ * or {@code MouseAdapter} object which is registered to receive
* the "interesting" mouse events using the component's
- * addMouseListener
method.
- * (MouseAdapter
objects implement the
- * MouseListener
interface.) Each such listener object
- * gets a MouseEvent
containing the mouse event.
+ * {@code addMouseListener} method.
+ * ({@code MouseAdapter} objects implement the
+ * {@code MouseListener} interface.) Each such listener object
+ * gets a {@code MouseEvent} containing the mouse event.
*
- * A MouseEvent
object is also passed to every
- * MouseMotionListener
or
- * MouseMotionAdapter
object which is registered to receive
+ * A {@code MouseEvent} object is also passed to every
+ * {@code MouseMotionListener} or
+ * {@code MouseMotionAdapter} object which is registered to receive
* mouse motion events using the component's
- * addMouseMotionListener
- * method. (MouseMotionAdapter
objects implement the
- * MouseMotionListener
interface.) Each such listener object
- * gets a MouseEvent
containing the mouse motion event.
+ * {@code addMouseMotionListener}
+ * method. ({@code MouseMotionAdapter} objects implement the
+ * {@code MouseMotionListener} interface.) Each such listener object
+ * gets a {@code MouseEvent} containing the mouse motion event.
*
* When a mouse button is clicked, events are generated and sent to the
- * registered MouseListener
s.
+ * registered {@code MouseListener}s.
* The state of modal keys can be retrieved using {@link InputEvent#getModifiers}
* and {@link InputEvent#getModifiersEx}.
* The button mask returned by {@link InputEvent#getModifiers} reflects
@@ -111,31 +111,31 @@
*
* For example, if the first mouse button is pressed, events are sent in the * following order: - *
- * id modifiers button - *+ *MOUSE_PRESSED
:BUTTON1_MASK
BUTTON1
- *MOUSE_RELEASED
:BUTTON1_MASK
BUTTON1
- *MOUSE_CLICKED
:BUTTON1_MASK
BUTTON1
- *
+ * id modifiers button{@code + * MOUSE_PRESSED: BUTTON1_MASK BUTTON1 + * MOUSE_RELEASED: BUTTON1_MASK BUTTON1 + * MOUSE_CLICKED: BUTTON1_MASK BUTTON1 + * }* When multiple mouse buttons are pressed, each press, release, and click * results in a separate event. *
* For example, if the user presses button 1 followed by * button 2, and then releases them in the same order, * the following sequence of events is generated: - *
- * id modifiers button - *+ *MOUSE_PRESSED
:BUTTON1_MASK
BUTTON1
- *MOUSE_PRESSED
:BUTTON2_MASK
BUTTON2
- *MOUSE_RELEASED
:BUTTON1_MASK
BUTTON1
- *MOUSE_CLICKED
:BUTTON1_MASK
BUTTON1
- *MOUSE_RELEASED
:BUTTON2_MASK
BUTTON2
- *MOUSE_CLICKED
:BUTTON2_MASK
BUTTON2
- *
+ * id modifiers button{@code + * MOUSE_PRESSED: BUTTON1_MASK BUTTON1 + * MOUSE_PRESSED: BUTTON2_MASK BUTTON2 + * MOUSE_RELEASED: BUTTON1_MASK BUTTON1 + * MOUSE_CLICKED: BUTTON1_MASK BUTTON1 + * MOUSE_RELEASED: BUTTON2_MASK BUTTON2 + * MOUSE_CLICKED: BUTTON2_MASK BUTTON2 + * }* If button 2 is released first, the - *
MOUSE_RELEASED
/MOUSE_CLICKED
pair
- * for BUTTON2_MASK
arrives first,
- * followed by the pair for BUTTON1_MASK
.
+ * {@code MOUSE_RELEASED}/{@code MOUSE_CLICKED} pair
+ * for {@code BUTTON2_MASK} arrives first,
+ * followed by the pair for {@code BUTTON1_MASK}.
*
* Some extra mouse buttons are added to extend the standard set of buttons
* represented by the following constants:{@code BUTTON1}, {@code BUTTON2}, and {@code BUTTON3}.
@@ -154,20 +154,20 @@
* Drag&Drop operation.
*
* In a multi-screen environment mouse drag events are delivered to the
- * Component
even if the mouse position is outside the bounds of the
- * GraphicsConfiguration
associated with that
- * Component
. However, the reported position for mouse drag events
+ * {@code Component} even if the mouse position is outside the bounds of the
+ * {@code GraphicsConfiguration} associated with that
+ * {@code Component}. However, the reported position for mouse drag events
* in this case may differ from the actual mouse position:
*
GraphicsConfiguration
associated with
- * the Component
.
+ * bounds of the {@code GraphicsConfiguration} associated with
+ * the {@code Component}.
* Component
.
+ * bounds of the virtual device associated with the {@code Component}.
*
* An unspecified behavior will be caused if the {@code id} parameter
@@ -200,51 +200,51 @@
public static final int MOUSE_LAST = 507;
/**
- * The "mouse clicked" event. This MouseEvent
+ * The "mouse clicked" event. This {@code MouseEvent}
* occurs when a mouse button is pressed and released.
*/
public static final int MOUSE_CLICKED = MOUSE_FIRST;
/**
- * The "mouse pressed" event. This MouseEvent
+ * The "mouse pressed" event. This {@code MouseEvent}
* occurs when a mouse button is pushed down.
*/
public static final int MOUSE_PRESSED = 1 + MOUSE_FIRST; //Event.MOUSE_DOWN
/**
- * The "mouse released" event. This MouseEvent
+ * The "mouse released" event. This {@code MouseEvent}
* occurs when a mouse button is let up.
*/
public static final int MOUSE_RELEASED = 2 + MOUSE_FIRST; //Event.MOUSE_UP
/**
- * The "mouse moved" event. This MouseEvent
+ * The "mouse moved" event. This {@code MouseEvent}
* occurs when the mouse position changes.
*/
public static final int MOUSE_MOVED = 3 + MOUSE_FIRST; //Event.MOUSE_MOVE
/**
- * The "mouse entered" event. This MouseEvent
+ * The "mouse entered" event. This {@code MouseEvent}
* occurs when the mouse cursor enters the unobscured part of component's
* geometry.
*/
public static final int MOUSE_ENTERED = 4 + MOUSE_FIRST; //Event.MOUSE_ENTER
/**
- * The "mouse exited" event. This MouseEvent
+ * The "mouse exited" event. This {@code MouseEvent}
* occurs when the mouse cursor exits the unobscured part of component's
* geometry.
*/
public static final int MOUSE_EXITED = 5 + MOUSE_FIRST; //Event.MOUSE_EXIT
/**
- * The "mouse dragged" event. This MouseEvent
+ * The "mouse dragged" event. This {@code MouseEvent}
* occurs when the mouse position changes while a mouse button is pressed.
*/
public static final int MOUSE_DRAGGED = 6 + MOUSE_FIRST; //Event.MOUSE_DRAG
/**
- * The "mouse wheel" event. This is the only MouseWheelEvent
.
+ * The "mouse wheel" event. This is the only {@code MouseWheelEvent}.
* It occurs when a mouse equipped with a wheel has its wheel rotated.
* @since 1.4
*/
@@ -320,10 +320,10 @@
* Indicates the number of quick consecutive clicks of
* a mouse button.
* clickCount will be valid for only three mouse events :
- * MOUSE_CLICKED
,
- * MOUSE_PRESSED
and
- * MOUSE_RELEASED
.
- * For the above, the clickCount
will be at least 1.
+ * {@code MOUSE_CLICKED},
+ * {@code MOUSE_PRESSED} and
+ * {@code MOUSE_RELEASED}.
+ * For the above, the {@code clickCount} will be at least 1.
* For all other events the count will be 0.
*
* @serial
@@ -365,8 +365,8 @@
/**
* A property used to indicate whether a Popup Menu
* should appear with a certain gestures.
- * If popupTrigger
= false
,
- * no popup menu should appear. If it is true
+ * If {@code popupTrigger} = {@code false},
+ * no popup menu should appear. If it is {@code true}
* then a popup menu should appear.
*
* @serial
@@ -415,7 +415,7 @@
* Otherwise, these coordinates are relative to the coordinate system
* associated with the Component's GraphicsConfiguration.
*
- * @return a Point
object containing the absolute x
+ * @return a {@code Point} object containing the absolute x
* and y coordinates.
*
* @see java.awt.GraphicsConfiguration
@@ -460,7 +460,7 @@
}
/**
- * Constructs a MouseEvent
object with the
+ * Constructs a {@code MouseEvent} object with the
* specified source component,
* type, time, modifiers, coordinates, click count, popupTrigger flag,
* and button number.
@@ -469,19 +469,19 @@
* as by using more than one of the old _MASKs, or modifier/button
* values which don't match) results in unspecified behavior.
* An invocation of the form
- * MouseEvent(source, id, when, modifiers, x, y, clickCount, popupTrigger, button)
+ * {@code MouseEvent(source, id, when, modifiers, x, y, clickCount, popupTrigger, button)}
* behaves in exactly the same way as the invocation
- * {@link #MouseEvent(Component, int, long, int, int, int,
- * int, int, int, boolean, int) MouseEvent}(source, id, when, modifiers,
- * x, y, xAbs, yAbs, clickCount, popupTrigger, button)
+ * {@link #MouseEvent(Component, int, long, int, int, int,
+ * int, int, int, boolean, int) MouseEvent(source, id, when, modifiers,
+ * x, y, xAbs, yAbs, clickCount, popupTrigger, button)}
* where xAbs and yAbs defines as source's location on screen plus
* relative coordinates x and y.
* xAbs and yAbs are set to zero if the source is not showing.
* This method throws an
- * IllegalArgumentException
if source
- * is null
.
+ * {@code IllegalArgumentException} if {@code source}
+ * is {@code null}.
*
- * @param source The Component
that originated the event
+ * @param source The {@code Component} that originated the event
* @param id An integer indicating the type of event.
* For information on allowable values, see
* the class description for {@link MouseEvent}
@@ -527,16 +527,16 @@
* if the mouse has more than three buttons.
*
* @throws IllegalArgumentException if {@code button} is less then zero
- * @throws IllegalArgumentException if source
is null
+ * @throws IllegalArgumentException if {@code source} is null
* @throws IllegalArgumentException if {@code button} is greater then BUTTON3 and the support for extended mouse buttons is
* {@link Toolkit#areExtraMouseButtonsEnabled() disabled} by Java
* @throws IllegalArgumentException if {@code button} is greater then the
* {@link java.awt.MouseInfo#getNumberOfButtons() current number of buttons} and the support
* for extended mouse buttons is {@link Toolkit#areExtraMouseButtonsEnabled() enabled}
* by Java
- * @throws IllegalArgumentException if an invalid button
+ * @throws IllegalArgumentException if an invalid {@code button}
* value is passed in
- * @throws IllegalArgumentException if source
is null
+ * @throws IllegalArgumentException if {@code source} is null
* @see #getSource()
* @see #getID()
* @see #getWhen()
@@ -565,22 +565,22 @@
}
/**
- * Constructs a MouseEvent
object with the
+ * Constructs a {@code MouseEvent} object with the
* specified source component,
* type, modifiers, coordinates, click count, and popupTrigger flag.
* An invocation of the form
- * MouseEvent(source, id, when, modifiers, x, y, clickCount, popupTrigger)
+ * {@code MouseEvent(source, id, when, modifiers, x, y, clickCount, popupTrigger)}
* behaves in exactly the same way as the invocation
- * {@link #MouseEvent(Component, int, long, int, int, int,
- * int, int, int, boolean, int) MouseEvent}(source, id, when, modifiers,
- * x, y, xAbs, yAbs, clickCount, popupTrigger, MouseEvent.NOBUTTON)
+ * {@link #MouseEvent(Component, int, long, int, int, int,
+ * int, int, int, boolean, int) MouseEvent(source, id, when, modifiers,
+ * x, y, xAbs, yAbs, clickCount, popupTrigger, MouseEvent.NOBUTTON)}
* where xAbs and yAbs defines as source's location on screen plus
* relative coordinates x and y.
* xAbs and yAbs are set to zero if the source is not showing.
- * This method throws an IllegalArgumentException
- * if source
is null
.
+ * This method throws an {@code IllegalArgumentException}
+ * if {@code source} is {@code null}.
*
- * @param source The Component
that originated the event
+ * @param source The {@code Component} that originated the event
* @param id An integer indicating the type of event.
* For information on allowable values, see
* the class description for {@link MouseEvent}
@@ -605,7 +605,7 @@
* is not recommended
* @param popupTrigger A boolean that equals {@code true} if this event
* is a trigger for a popup menu
- * @throws IllegalArgumentException if source
is null
+ * @throws IllegalArgumentException if {@code source} is null
* @see #getSource()
* @see #getID()
* @see #getWhen()
@@ -637,7 +637,7 @@
}
/**
- * Constructs a MouseEvent
object with the
+ * Constructs a {@code MouseEvent} object with the
* specified source component,
* type, time, modifiers, coordinates, absolute coordinates, click count, popupTrigger flag,
* and button number.
@@ -649,10 +649,10 @@
* passed to the constructor, the mouse event instance is still
* created and no exception is thrown.
* This method throws an
- * IllegalArgumentException
if source
- * is null
.
+ * {@code IllegalArgumentException} if {@code source}
+ * is {@code null}.
*
- * @param source The Component
that originated the event
+ * @param source The {@code Component} that originated the event
* @param id An integer indicating the type of event.
* For information on allowable values, see
* the class description for {@link MouseEvent}
@@ -702,16 +702,16 @@
* if the mouse has more than three buttons.
*
* @throws IllegalArgumentException if {@code button} is less then zero
- * @throws IllegalArgumentException if source
is null
+ * @throws IllegalArgumentException if {@code source} is null
* @throws IllegalArgumentException if {@code button} is greater then BUTTON3 and the support for extended mouse buttons is
* {@link Toolkit#areExtraMouseButtonsEnabled() disabled} by Java
* @throws IllegalArgumentException if {@code button} is greater then the
* {@link java.awt.MouseInfo#getNumberOfButtons() current number of buttons} and the support
* for extended mouse buttons is {@link Toolkit#areExtraMouseButtonsEnabled() enabled}
* by Java
- * @throws IllegalArgumentException if an invalid button
+ * @throws IllegalArgumentException if an invalid {@code button}
* value is passed in
- * @throws IllegalArgumentException if source
is null
+ * @throws IllegalArgumentException if {@code source} is null
* @see #getSource()
* @see #getID()
* @see #getWhen()
@@ -803,7 +803,7 @@
/**
* Returns the x,y position of the event relative to the source component.
*
- * @return a Point
object containing the x and y coordinates
+ * @return a {@code Point} object containing the x and y coordinates
* relative to the source component
*
*/
@@ -819,7 +819,7 @@
/**
* Translates the event's coordinates to a new position
- * by adding specified x
(horizontal) and y
+ * by adding specified {@code x} (horizontal) and {@code y}
* (vertical) offsets.
*
* @param x the horizontal x value to add to the current x
@@ -901,9 +901,9 @@
* Returns whether or not this mouse event is the popup menu
* trigger event for the platform.
*
Note: Popup menus are triggered differently
- * on different systems. Therefore, isPopupTrigger
- * should be checked in both mousePressed
- * and mouseReleased
+ * on different systems. Therefore, {@code isPopupTrigger}
+ * should be checked in both {@code mousePressed}
+ * and {@code mouseReleased}
* for proper cross-platform functionality.
*
* @return boolean, true if this event is the popup menu trigger
@@ -914,16 +914,16 @@
}
/**
- * Returns a String
instance describing the modifier keys and
+ * Returns a {@code String} instance describing the modifier keys and
* mouse buttons that were down during the event, such as "Shift",
* or "Ctrl+Shift". These strings can be localized by changing
- * the awt.properties
file.
+ * the {@code awt.properties} file.
*
- * Note that the InputEvent.ALT_MASK
and
- * InputEvent.BUTTON2_MASK
have equal values,
+ * Note that the {@code InputEvent.ALT_MASK} and
+ * {@code InputEvent.BUTTON2_MASK} have equal values,
* so the "Alt" string is returned for both modifiers. Likewise,
- * the InputEvent.META_MASK
and
- * InputEvent.BUTTON3_MASK
have equal values,
+ * the {@code InputEvent.META_MASK} and
+ * {@code InputEvent.BUTTON3_MASK} have equal values,
* so the "Meta" string is returned for both modifiers.
*
* Note that passing negative parameter is incorrect,