Actionevent в java это

Содержание
  1. Actionevent в java это
  2. Field Summary
  3. Fields inherited from class javafx.event.Event
  4. Fields inherited from class java.util.EventObject
  5. Constructor Summary
  6. Method Summary
  7. Methods inherited from class javafx.event.Event
  8. Methods inherited from class java.util.EventObject
  9. Methods inherited from class java.lang.Object
  10. Field Detail
  11. ACTION
  12. ANY
  13. Constructor Detail
  14. ActionEvent
  15. ActionEvent
  16. Method Detail
  17. copyFor
  18. getEventType
  19. Actionevent в java это
  20. Field Summary
  21. Fields inherited from class java.awt.AWTEvent
  22. Fields inherited from class java.util.EventObject
  23. Constructor Summary
  24. Method Summary
  25. Methods inherited from class java.awt.AWTEvent
  26. Methods inherited from class java.util.EventObject
  27. Methods inherited from class java.lang.Object
  28. Field Detail
  29. SHIFT_MASK
  30. CTRL_MASK
  31. META_MASK
  32. ALT_MASK
  33. ACTION_FIRST
  34. ACTION_LAST
  35. ACTION_PERFORMED
  36. Constructor Detail
  37. ActionEvent
  38. ActionEvent
  39. ActionEvent
  40. Method Detail
  41. getActionCommand
  42. getWhen
  43. getModifiers
  44. paramString
  45. Actionevent в java это
  46. Field Summary
  47. Fields declared in class java.awt.AWTEvent
  48. Fields declared in class java.util.EventObject
  49. Constructor Summary
  50. Method Summary
  51. Methods declared in class java.awt.AWTEvent
  52. Methods declared in class java.util.EventObject
  53. Methods declared in class java.lang.Object
  54. Field Detail
  55. SHIFT_MASK
  56. CTRL_MASK
  57. META_MASK
  58. ALT_MASK
  59. ACTION_FIRST
  60. ACTION_LAST
  61. ACTION_PERFORMED
  62. Constructor Detail
  63. ActionEvent
  64. ActionEvent
  65. ActionEvent
  66. Method Detail
  67. getActionCommand
  68. getWhen
  69. getModifiers
  70. paramString
  71. AWT ActionEvent Class
  72. Class declaration
  73. Field
  74. Class constructors
  75. Class methods
  76. Methods inherited

Actionevent в java это

An Event representing some type of action. This event type is widely used to represent a variety of things, such as when a Button has been fired, when a KeyFrame has finished, and other such usages.

Field Summary

Fields inherited from class javafx.event.Event

Fields inherited from class java.util.EventObject

Constructor Summary

Method Summary

Methods inherited from class javafx.event.Event

Methods inherited from class java.util.EventObject

Methods inherited from class java.lang.Object

Field Detail

ACTION

ANY

Constructor Detail

ActionEvent

Creates a new ActionEvent with an event type of ACTION . The source and target of the event is set to NULL_SOURCE_TARGET .

ActionEvent

public ActionEvent(Object source, EventTarget target)

Construct a new ActionEvent with the specified event source and target. If the source or target is set to null , it is replaced by the NULL_SOURCE_TARGET value. All ActionEvents have their type set to ACTION .

Method Detail

copyFor

public ActionEvent copyFor(Object newSource, EventTarget newTarget)

Creates and returns a copy of this event with the specified event source and target. If the source or target is set to null , it is replaced by the NULL_SOURCE_TARGET value.

getEventType

Gets the event type of this event. Objects of the same Event class can have different event types. These event types further specify what kind of event occurred.

Источник

Actionevent в java это

A semantic event which indicates that a component-defined action occurred. This high-level event is generated by a component (such as a Button ) when the component-specific action occurs (such as being pressed). The event is passed to every ActionListener object that registered to receive such events using the component’s addActionListener method. Note: To invoke an ActionEvent on a Button using the keyboard, use the Space bar. The object that implements the ActionListener interface gets this ActionEvent when the event occurs. The listener is therefore spared the details of processing individual mouse movements and mouse clicks, and can instead process a «meaningful» (semantic) event like «button pressed». An unspecified behavior will be caused if the id parameter of any particular ActionEvent instance is not in the range from ACTION_FIRST to ACTION_LAST .

Читайте также:  Разработка seo на php

Field Summary

Fields inherited from class java.awt.AWTEvent

Fields inherited from class java.util.EventObject

Constructor Summary

Method Summary

Methods inherited from class java.awt.AWTEvent

Methods inherited from class java.util.EventObject

Methods inherited from class java.lang.Object

Field Detail

SHIFT_MASK

public static final int SHIFT_MASK

CTRL_MASK

public static final int CTRL_MASK

META_MASK

public static final int META_MASK

ALT_MASK

public static final int ALT_MASK

ACTION_FIRST

public static final int ACTION_FIRST

ACTION_LAST

public static final int ACTION_LAST

ACTION_PERFORMED

@Native public static final int ACTION_PERFORMED

Constructor Detail

ActionEvent

public ActionEvent(Object source, int id, String command)

Constructs an ActionEvent object. This method throws an IllegalArgumentException if source is null . A null command string is legal, but not recommended.

ActionEvent

public ActionEvent(Object source, int id, String command, int modifiers)

Constructs an ActionEvent object with modifier keys. This method throws an IllegalArgumentException if source is null . A null command string is legal, but not recommended.

ActionEvent

public ActionEvent(Object source, int id, String command, long when, int modifiers)

Constructs an ActionEvent object with the specified modifier keys and timestamp. This method throws an IllegalArgumentException if source is null . A null command string is legal, but not recommended.

Method Detail

getActionCommand

Returns the command string associated with this action. This string allows a «modal» component to specify one of several commands, depending on its state. For example, a single button might toggle between «show details» and «hide details». The source object and the event would be the same in each case, but the command string would identify the intended action. Note that if a null command string was passed to the constructor for this ActionEvent , this this method returns null .

getWhen

Returns the timestamp of when this event occurred. Because an ActionEvent is a high-level, semantic event, the timestamp is typically the same as an underlying InputEvent.

getModifiers

paramString

Returns a parameter string identifying this action event. This method is useful for event-logging and for debugging.

Читайте также:  Java get futuretask concurrent util

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Источник

Actionevent в java это

A semantic event which indicates that a component-defined action occurred. This high-level event is generated by a component (such as a Button ) when the component-specific action occurs (such as being pressed). The event is passed to every ActionListener object that registered to receive such events using the component’s addActionListener method. Note: To invoke an ActionEvent on a Button using the keyboard, use the Space bar. The object that implements the ActionListener interface gets this ActionEvent when the event occurs. The listener is therefore spared the details of processing individual mouse movements and mouse clicks, and can instead process a «meaningful» (semantic) event like «button pressed». An unspecified behavior will be caused if the id parameter of any particular ActionEvent instance is not in the range from ACTION_FIRST to ACTION_LAST .

Field Summary

Fields declared in class java.awt.AWTEvent

Fields declared in class java.util.EventObject

Constructor Summary

Method Summary

Methods declared in class java.awt.AWTEvent

Methods declared in class java.util.EventObject

Methods declared in class java.lang.Object

Field Detail

SHIFT_MASK

public static final int SHIFT_MASK

CTRL_MASK

public static final int CTRL_MASK

META_MASK

public static final int META_MASK

ALT_MASK

public static final int ALT_MASK

ACTION_FIRST

public static final int ACTION_FIRST

ACTION_LAST

public static final int ACTION_LAST

ACTION_PERFORMED

@Native public static final int ACTION_PERFORMED

Constructor Detail

ActionEvent

public ActionEvent​(Object source, int id, String command)

Constructs an ActionEvent object. This method throws an IllegalArgumentException if source is null . A null command string is legal, but not recommended.

ActionEvent

public ActionEvent​(Object source, int id, String command, int modifiers)

Constructs an ActionEvent object with modifier keys. This method throws an IllegalArgumentException if source is null . A null command string is legal, but not recommended.

ActionEvent

public ActionEvent​(Object source, int id, String command, long when, int modifiers)

Constructs an ActionEvent object with the specified modifier keys and timestamp. This method throws an IllegalArgumentException if source is null . A null command string is legal, but not recommended.

Method Detail

getActionCommand

Returns the command string associated with this action. This string allows a «modal» component to specify one of several commands, depending on its state. For example, a single button might toggle between «show details» and «hide details». The source object and the event would be the same in each case, but the command string would identify the intended action. Note that if a null command string was passed to the constructor for this ActionEvent , this this method returns null .

Читайте также:  Python websockets send ping

getWhen

Returns the timestamp of when this event occurred. Because an ActionEvent is a high-level, semantic event, the timestamp is typically the same as an underlying InputEvent.

getModifiers

paramString

Returns a parameter string identifying this action event. This method is useful for event-logging and for debugging.

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

Источник

AWT ActionEvent Class

This class is defined in java.awt.event package. The ActionEvent is generated when button is clicked or the item of a list is double clicked.

Class declaration

Following is the declaration for java.awt.event.ActionEvent class:

public class ActionEvent extends AWTEvent

Field

Following are the fields for java.awt.event.ActionEvent class:

  • static int ACTION_FIRST — The first number in the range of ids used for action events.
  • static int ACTION_LAST — The last number in the range of ids used for action events.
  • static int ACTION_PERFORMED — This event id indicates that a meaningful action occured.
  • static int ALT_MASK — The alt modifier.
  • static int CTRL_MASK — The control modifier.
  • static int META_MASK — The meta modifier.
  • static int SHIFT_MASK — The shift modifier.

Class constructors

ActionEvent(java.lang.Object source, int id, java.lang.String command)

Constructs an ActionEvent object.

ActionEvent(java.lang.Object source, int id, java.lang.String command, int modifiers)

Constructs an ActionEvent object with modifier keys.

ActionEvent(java.lang.Object source, int id, java.lang.String command, long when, int modifiers)

Constructs an ActionEvent object with the specified modifier keys and timestamp.

Class methods

java.lang.String getActionCommand()

Returns the command string associated with this action.

Returns the modifier keys held down during this action event.

Returns the timestamp of when this event occurred.

java.lang.String paramString()

Returns a parameter string identifying this action event.

Methods inherited

This class inherits methods from the following classes:

Источник

Оцените статью