Class OpenWebPage

  • All Implemented Interfaces:
    Command

    public class OpenWebPage
    extends CommandImpl
    This command opens an URI in the default browser.
    Author:
    Arnaud BLOUIN
    • Field Detail

      • uri

        protected URI uri
        The URI to open.
      • browsed

        protected boolean browsed
    • Constructor Detail

      • OpenWebPage

        public OpenWebPage()
        Creates the command.
    • Method Detail

      • flush

        public void flush()
        Description copied from interface: Command
        Flushes the command. Can be useful to close streams, free objects, etc. A command should flushed manually only when it is not managed by the cmd registry of the application. When a command is gathered and managed by a command registry, it is automatically flushed when the command registry removes the cmd.
        Specified by:
        flush in interface Command
        Overrides:
        flush in class CommandImpl
      • doCmdBody

        protected void doCmdBody()
        Description copied from class: CommandImpl
        This method contains the statements to execute the command. This method is automatically called by DoIt and must not be called explicitly.
        Specified by:
        doCmdBody in class CommandImpl
      • canDo

        public boolean canDo()
        Description copied from interface: Command
        Checks whether the command can be executed.
        Specified by:
        canDo in interface Command
        Overrides:
        canDo in class CommandImpl
        Returns:
        True if the command can be executed.
      • hadEffect

        public boolean hadEffect()
        Description copied from interface: Command
        State whether the execution of this command has effects on the system.
        Specified by:
        hadEffect in interface Command
        Overrides:
        hadEffect in class CommandImpl
        Returns:
        True: the command has effects on the system.
      • setUri

        public void setUri​(URI newURI)
        Parameters:
        newURI - The URI to open.