- java.lang.Object
-
- io.github.interacto.command.CommandImpl
-
- io.github.interacto.command.library.OpenWebPage
-
- All Implemented Interfaces:
Command
public class OpenWebPage extends CommandImpl
This command opens an URI in the default browser.- Author:
- Arnaud BLOUIN
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.github.interacto.command.Command
Command.CmdStatus, Command.RegistrationPolicy
-
-
Constructor Summary
Constructors Constructor Description OpenWebPage(Desktop desktop, URI uri)Creates the command.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanDo()Checks whether the command can be executed.protected voiddoCmdBody()This method contains the statements to execute the command.booleanhadEffect()State whether the execution of this command has effects on the system.-
Methods inherited from class io.github.interacto.command.CommandImpl
cancel, createMemento, doIt, done, flush, getRegistrationPolicy, getStatus, isDone, toString, unregisteredBy
-
-
-
-
Method Detail
-
doCmdBody
protected void doCmdBody()
Description copied from class:CommandImplThis method contains the statements to execute the command. This method is automatically called by DoIt and must not be called explicitly.- Specified by:
doCmdBodyin classCommandImpl
-
canDo
public boolean canDo()
Description copied from interface:CommandChecks whether the command can be executed.- Specified by:
canDoin interfaceCommand- Overrides:
canDoin classCommandImpl- Returns:
- True if the command can be executed.
-
hadEffect
public boolean hadEffect()
Description copied from interface:CommandState whether the execution of this command has effects on the system.- Specified by:
hadEffectin interfaceCommand- Overrides:
hadEffectin classCommandImpl- Returns:
- True: the command has effects on the system.
-
-