Package VASSAL.counters
Class ActionButton.ButtonPusher
java.lang.Object
VASSAL.counters.ActionButton.ButtonPusher
- Enclosing class:
ActionButton
Registers mouse listeners with Maps and other components. Clicking the
mouse checks for pieces with an ActionButton trait and invokes them if the
click falls within the button's boundaries
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
Deprecated, for removal: This API element is subject to removal in a future version.protected class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Handle a mouse click on the given GamePiece at the given location (where 0,0 is the center of the piece).void
Deprecated, for removal: This API element is subject to removal in a future version.void
-
Constructor Details
-
ButtonPusher
protected ButtonPusher()
-
-
Method Details
-
register
-
register
@Deprecated(since="2020-10-26", forRemoval=true) public void register(Component obs, GamePiece piece, int x, int y) Deprecated, for removal: This API element is subject to removal in a future version. -
doClick
Handle a mouse click on the given GamePiece at the given location (where 0,0 is the center of the piece). Activate all Action Buttons in sequence that are not Masked or Hidden- Parameters:
p
- A function to determine the offset of the target piece. This callback is done for efficiency reasons, since computing the offset may be expensive (as in the case of a piece in an expanded stack on a map) and is only needed if the piece has the ActionButton trait
-