Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4751457

java.awt.event.MouseWheelEvent: doc's unclear

XMLWordPrintable

    • b28
    • sparc
    • solaris_7

      Name: sdR10048 Date: 09/23/2002


      java.awt.event.MouseWheelEvent class doc should be updated:
      Here is what javadoc says (see problem points inline):
      > public MouseWheelEvent(Component source,
      > int id,
      > long when,
      > int modifiers,
      > int x,
      > int y,
      > int clickCount,
      > boolean popupTrigger,
      > int scrollType,
      > int scrollAmount,
      > int wheelRotation)
      >
      > Constructs a MouseWheelEvent object with the specified source
      > component, type, modifiers, coordinates, scroll type, scroll amount,
      > and wheel rotation.
      >
      > Note that passing in an invalid id results in unspecified behavior.

      (1) How "invalid id" looks like?
          Need to test this assertion.

      > Parameters:
      > source - the Component that originated the event
      > id - the integer that identifies the event
      > when - a long that gives the time the event occurred

      (2) no expected behaviour if 'when' is negative.

      > modifiers - the modifier keys down during event (shift, ctrl, alt,
      > meta)
      > x - the horizontal x coordinate for the mouse location
      > y - the vertical y coordinate for the mouse location
      > clickCount - the number of mouse clicks associated with event

      (3) no expected behaviour if 'x','y' and/or 'clickCount' are negative.

      > popupTrigger - a boolean, true if this event is a trigger for a
      > popup-menu
      > scrollType - the type of scrolling which should take place in response
      > to this event; valid values are WHEEL_UNIT_SCROLL and
      > WHEEL_BLOCK_SCROLL

      (4) no expected behaviour if 'scrollType' is invalid.

      > scrollAmount - for scrollType WHEEL_UNIT_SCROLL, the number of units
      > to be scrolled
      > wheelRotation - the amount that the mouse wheel was rotated (the
      > number of "clicks")
      > SeeAlso:
      > MouseEvent.MouseEvent(java.awt.Component, int, long, int, int, int, int, boolean)

      All four points go from
      http://java.sun.com/j2se/javadoc/writingapispecs/index.html#method
      ======================================================================

            dav Andrei Dmitriev (Inactive)
            dsvsunw Dsv Dsv (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: