Record Class LobbyKeyDispatcher
java.lang.Object
java.lang.Record
megamek.client.ui.panels.phaseDisplay.lobby.LobbyKeyDispatcher
- All Implemented Interfaces:
KeyEventDispatcher
This key dispatcher catches Ctrl-C / Ctrl-V keypresses in the lobby to allow copy/pasting units without being
obstructed by focus. If not done in this way, a table such as the player table will catch these key events before the
Menubar can get them. Thus, the Menubar accelerators for Unit Copy/Paste are only for show, they do not actually
catch these keys.
-
Constructor Summary
ConstructorsConstructorDescriptionLobbyKeyDispatcher
(ChatLounge lobby) Creates an instance of aLobbyKeyDispatcher
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
dispatchKeyEvent
(KeyEvent evt) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.lobby()
Returns the value of thelobby
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
LobbyKeyDispatcher
Creates an instance of aLobbyKeyDispatcher
record class.- Parameters:
lobby
- the value for thelobby
record component
-
-
Method Details
-
dispatchKeyEvent
- Specified by:
dispatchKeyEvent
in interfaceKeyEventDispatcher
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
lobby
Returns the value of thelobby
record component.- Returns:
- the value of the
lobby
record component
-