Package com.xpdustry.distributor.api.gui
Interface Action
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A function that is executed when an interaction occurs in a gui.
-
Method Summary
Modifier and TypeMethodDescriptionvoidExecutes the action.static ActionReturns an action mapping the viewer to anAudience.static Actionback()Returns an action that goes back to the previous window.static Actionback(int depth) Returns an action that goes back to the window at the given depth.static ActionReturns an action that invoke a command for the viewer.static ActionReturns an action composed of multiple actions.static ActionReturns an action composed of multiple actions.static <T> ActionReturns an action that computes a state entry if it exists.static <T> ActionReturns an action that computes a state entry.static ActionReturns an action using the result of the given delegate to run another action.static ActionhideAll()Returns an action that hides all windows in the hierarchy.static Actionnone()Returns an action that does nothing.static ActionReturns an action that runs the given runnable.static Actionshow(WindowManager manager) Returns an action that creates and shows a new window with the given manager and previous window.default ActionReturns a new action that first executes this action and then the given action.static <T> ActionReturns an action that sets a state entry with the given value.static ActionReturns an action that removes a state entry.
-
Method Details
-
none
Returns an action that does nothing. -
with
Returns an action that sets a state entry with the given value.- Type Parameters:
T- the type of the value- Parameters:
key- the keyvalue- the value- Returns:
- the action
-
compute
Returns an action that computes a state entry. If not present, the default value is used.- Type Parameters:
T- the type of the value- Parameters:
key- the keydef- the default valuefunction- the function to compute the value- Returns:
- the action
-
compute
Returns an action that computes a state entry if it exists.- Type Parameters:
T- the type of the value- Parameters:
key- the keyfunction- the function to compute the value- Returns:
- the action
-
without
Returns an action that removes a state entry.- Parameters:
key- the key- Returns:
- the action
-
back
Returns an action that goes back to the previous window. -
back
Returns an action that goes back to the window at the given depth.- Parameters:
depth- the depth- Returns:
- the action
-
hideAll
Returns an action that hides all windows in the hierarchy. -
audience
Returns an action mapping the viewer to anAudience.- Parameters:
consumer- the sub action running on the audience- Returns:
- the action
-
run
Returns an action that runs the given runnable.- Parameters:
runnable- the runnable- Returns:
- the action
-
command
Returns an action that invoke a command for the viewer.- Parameters:
name- the command namearguments- the command arguments- Returns:
- the action
-
show
Returns an action that creates and shows a new window with the given manager and previous window.- Parameters:
manager- the window manager- Returns:
- the action
-
delegate
Returns an action using the result of the given delegate to run another action.- Parameters:
delegate- the delegate- Returns:
- the action
-
compose
Returns an action composed of multiple actions.- Parameters:
actions- the actions- Returns:
- the action
-
compose
Returns an action composed of multiple actions.- Parameters:
actions- the actions- Returns:
- the action
-
act
Executes the action.- Parameters:
window- the window
-
then
Returns a new action that first executes this action and then the given action.- Parameters:
next- the action to execute after this action- Returns:
- the new action
-