Module interacto.java.api
Package io.github.interacto.binding
Interface WidgetBinding<C extends Command>
-
- All Superinterfaces:
FSMHandler
- All Known Implementing Classes:
WidgetBindingImpl
public interface WidgetBinding<C extends Command> extends FSMHandler
The concept of widget binding and its related services.- Author:
- Arnaud BLOUIN
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancel()On cancellationvoidclearEvents()Stops the interaction and clears all its events waiting for a process.voidend()On endvoidendOrCancel()On end or cancellationvoidfirst()After being created by createCommand, the command can be initialised by this method.CgetCommand()InteractionImpl<?,?,?>getInteraction()longgetTimesCancelled()Information method.longgetTimesEnded()Information method.voidifCannotExecuteCmd()Called when an ongoing command cannot be executedvoidifCmdHadEffects()Called when an executed command had effectsvoidifCmdHadNoEffect()Called when an executed command did not had effectbooleanisActivated()booleanisContinuousCmdExec()booleanisRunning()booleanisStrictStart()io.reactivex.Observable<C>produces()voidsetActivated(boolean activated)Activates the widget binding.voidthen()Updates the current command.voiduninstallBinding()Uninstall the binding.booleanwhen()-
Methods inherited from interface io.github.interacto.fsm.FSMHandler
fsmCancels, fsmStarts, fsmStops, fsmUpdates
-
-
-
-
Method Detail
-
clearEvents
void clearEvents()
Stops the interaction and clears all its events waiting for a process.
-
first
void first()
After being created by createCommand, the command can be initialised by this method.
-
then
void then()
Updates the current command. To override.
-
end
void end()
On end
-
cancel
void cancel()
On cancellation
-
endOrCancel
void endOrCancel()
On end or cancellation
-
ifCmdHadNoEffect
void ifCmdHadNoEffect()
Called when an executed command did not had effect
-
ifCmdHadEffects
void ifCmdHadEffects()
Called when an executed command had effects
-
ifCannotExecuteCmd
void ifCannotExecuteCmd()
Called when an ongoing command cannot be executed
-
when
boolean when()
- Returns:
- True if the condition of the widget binding is respected.
-
getInteraction
InteractionImpl<?,?,?> getInteraction()
- Returns:
- The interaction.
-
getCommand
C getCommand()
- Returns:
- The command in progress or null.
-
isActivated
boolean isActivated()
- Returns:
- True if the widget binding is activated.
-
setActivated
void setActivated(boolean activated)
Activates the widget binding.- Parameters:
activated- True: the widget binding is activated. Otherwise, it is desactivated.
-
isRunning
boolean isRunning()
- Returns:
- True: if the widget binding is currently used.
-
isStrictStart
boolean isStrictStart()
- Returns:
- States whether the interaction must continue to run while the condition of the binding is not fulfilled at the interaction start.
-
isContinuousCmdExec
boolean isContinuousCmdExec()
- Returns:
- True: the command must be executed on each step of the interaction.
-
uninstallBinding
void uninstallBinding()
Uninstall the binding. The binding cannot be used after that.
-
produces
io.reactivex.Observable<C> produces()
- Returns:
- An RX observable objects that will provide the commands produced by the binding.
-
getTimesEnded
long getTimesEnded()
Information method.- Returns:
- The number of times the widget binding successfully ended (nevermind a command was created or not).
-
getTimesCancelled
long getTimesCancelled()
Information method.- Returns:
- The number of times the widget binding was cancelled (nevermind a command was created or not).
-
-