Class ToggleEvent
java.lang.Object
com.oorian.messaging.events.Event<ToggleListener>
com.oorian.messaging.events.client.ClientEvent<ToggleListener>
com.oorian.messaging.events.client.ToggleEvent
Represents a toggle event that occurs when a popover or details element is toggled.
This event provides the old and new states of the toggled element (e.g., "open" and "closed").
- Since:
- 2026
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionToggleEvent(String oldState, String newState) Constructs a new ToggleEvent with the specified old and new states. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchTo(ToggleListener listener) Dispatches this event to the specified listener for processing.Returns the new state of the toggled element.Returns the previous state of the toggled element.Methods inherited from class com.oorian.messaging.events.client.ClientEvent
getSource, getTarget, setSource, setTarget
-
Constructor Details
-
ToggleEvent
Constructs a new ToggleEvent with the specified old and new states.- Parameters:
oldState- the previous state of the element (e.g., "closed")newState- the new state of the element (e.g., "open")
-
-
Method Details
-
getOldState
Returns the previous state of the toggled element.- Returns:
- the old state
-
getNewState
Returns the new state of the toggled element.- Returns:
- the new state
-
dispatchTo
Dispatches this event to the specified listener for processing.- Specified by:
dispatchToin classEvent<ToggleListener>- Parameters:
listener- the listener to which this event should be dispatched
-