public class PureWebMouseEventArgs extends PureWebInputEventArgs
PureWebMouseEventArgs
class represents the data defining
a mouse event.Constructor and Description |
---|
PureWebMouseEventArgs()
Constructs a new instance of the
PureWebMouseEventArgs class. |
PureWebMouseEventArgs(java.lang.String viewName,
MouseEventType eventType,
double x,
double y,
double delta,
MouseButtons changedButton,
java.util.EnumSet buttons,
java.util.EnumSet modifiers)
Constructs a new instance of the
PureWebMouseEventArgs class. |
PureWebMouseEventArgs(java.util.UUID sessionId,
java.lang.String viewName,
MouseEventType eventType,
double x,
double y,
double delta,
MouseButtons changedButton,
java.util.EnumSet buttons,
java.util.EnumSet modifiers)
Constructs a new instance of the
PureWebMouseEventArgs class. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Checks if the current instance is equal or not to the specified other
object.
|
java.util.EnumSet |
getButtons()
Returns an
EnumSet<MouseButtons> of the mouse button
that were pressed during the event. |
MouseButtons |
getChangedButton()
Returns the mouse button that changed during the event.
|
double |
getDelta()
Returns a signed count of the number of detents the mouse wheel
has rotated.
|
MouseEventType |
getEventType()
Returns the mouse event type.
|
java.util.List |
getFiltered()
Returns the list of mouse events of the same type as the current instance
that were filtered out of the message loop.
|
java.util.List |
getFilteredEventsBySession(java.util.UUID sessionId)
Returns a list of filtered events, where the events in the list originate from the specified session.
|
double |
getX()
Returns the X position of the mouse cursor relative to the view
client area.
|
double |
getY()
Returns the Y position of the mouse cursor relative to the view
client area.
|
int |
hashCode()
Returns this instance expressed as a hashcode.
|
void |
setButtons(java.util.EnumSet buttons)
Sets the
EnumSet<MouseButtons> of the mouse button that
were pressed during the event. |
void |
setChangedButton(MouseButtons changedButton)
Sets the mouse button that changed during the event.
|
void |
setDelta(double delta)
Sets a signed count of the number of detents the mouse wheel has rotated.
|
void |
setEventType(MouseEventType eventType)
Sets the mouse event type.
|
void |
setFiltered(java.util.List filtered)
Sets the list of mouse events of the same type as the current instance that
were filtered out of the message loop.
|
void |
setX(double x)
Sets the X position of the mouse cursor relative to the view client area.
|
void |
setY(double y)
Sets the Y position of the mouse cursor relative to the view client area.
|
getModifiers, getSessionId, getViewName, setHandled, setModifiers, wasHandled
public PureWebMouseEventArgs()
PureWebMouseEventArgs
class.public PureWebMouseEventArgs(java.util.UUID sessionId, java.lang.String viewName, MouseEventType eventType, double x, double y, double delta, MouseButtons changedButton, java.util.EnumSet buttons, java.util.EnumSet modifiers)
PureWebMouseEventArgs
class.sessionId
- The unique identifier of the originating session.viewName
- The name of the view where the event took place.eventType
- The type of mouse event.x
- The X position of the mouse cursor relative to the view client area.y
- The Y position of the mouse cursor relative to the view client area.delta
- A signed count of the number of detents the mouse wheel has rotated.changedButton
- The mouse button that changed during the event.buttons
- An EnumSet<MouseButtons>
of the mouse
button that were pressed during the event.modifiers
- The modifiers in effect at the time of the event.public PureWebMouseEventArgs(java.lang.String viewName, MouseEventType eventType, double x, double y, double delta, MouseButtons changedButton, java.util.EnumSet buttons, java.util.EnumSet modifiers)
PureWebMouseEventArgs
class.viewName
- The name of the view where the event took place.eventType
- The type of mouse event.x
- The X position of the mouse cursor relative to the view client area.y
- The Y position of the mouse cursor relative to the view client area.delta
- A signed count of the number of detents the mouse wheel has rotated.changedButton
- The mouse button that changed during the event.buttons
- An EnumSet<MouseButtons>
of the mouse
button that were pressed during the event.modifiers
- The modifiers in effect at the time of the event.public MouseEventType getEventType()
public void setEventType(MouseEventType eventType)
public double getX()
public void setX(double x)
public double getY()
public void setY(double y)
public double getDelta()
public void setDelta(double delta)
public MouseButtons getChangedButton()
public void setChangedButton(MouseButtons changedButton)
public java.util.EnumSet getButtons()
EnumSet<MouseButtons>
of the mouse button
that were pressed during the event.public void setButtons(java.util.EnumSet buttons)
EnumSet<MouseButtons>
of the mouse button that
were pressed during the event.public java.util.List getFiltered()
null
if no events were filtered.
The current instance will also appear as the last element in the list,
if it exists.
Currently, filtering is applied for mouse move and mouse wheel events.
(See DefaultCommandFilter
For mouse wheel events, the current instance delta will represent the cumulative delta of all the filtered wheel events in the list. The last element in the list, which corresponds to the current instance, will not have the cumulative delta value. Therefore, if an application needs to process the filtered list, it should ignore the current instance, and just process the events in the filtered list.
public void setFiltered(java.util.List filtered)
null
if no
events were filtered.public java.util.List getFilteredEventsBySession(java.util.UUID sessionId)
null
if no events
were filtered.public boolean equals(java.lang.Object obj)
true
if they are equal, otherwise returns
false
.equals
in class PureWebInputEventArgs
public int hashCode()
hashCode
in class PureWebInputEventArgs
© 2010 - 2018 Calgary Scientific Inc. All Rights Reserved.
This documentation shall not wholly or in part, in any form or by any means, electronic, mechanical, including photocopying, be reproduced or transmitted without the authorized, written consent of Calgary Scientific.