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

      • desktop

        protected final Desktop desktop
      • uri

        protected final URI uri
        The URI to open.
      • browsed

        protected boolean browsed
    • Constructor Detail

      • OpenWebPage

        public OpenWebPage​(Desktop desktop,
                           URI uri)
        Creates the command.
        Parameters:
        desktop - The desktop to use
        uri - The URI to open
    • Method Detail

      • 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.