/*
* [Win10Navigate.java]
*
* Summary: Generate instructions to navigate around Windows 10.
*
* Copyright: (c) 2016-2017 Roedy Green, Canadian Mind Products, http://mindprod.com
*
* Licence: This software may be copied and used freely for any purpose but military.
* http://mindprod.com/contact/nonmil.html
*
* Requires: JDK 1.8+
*
* Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/
*
* Version History:
* 1.0 2016-04-30 initial version
*/
package com.mindprod.htmlmacros.macro;
import static java.lang.System.*;
/**
* Generate instructions to navigate around Windows 10.
*
* @author Roedy Green, Canadian Mind Products
* @version 1.0 2016-04-30 initial version
* @since 2016-04-30
*/
public final class Win10Navigate extends Macro
{
/**
* how to use the macro
*/
private static final String USAGE = "\nWin10Navigate macro needs target";
/**
* guts to Generate reference Windows 10 instructions
*
* @param target where generate instructions to navigate to:
* @param description description of the bug
*
* @return expanded to reference sun bug database
*/
private static String expand( final String target )
{
//
...
provided by caller
switch ( target.toLowerCase() )
{
case "additionaltime":
return
"Right click the time in bottom right of screen.\n" +
"Click Date and Time settings.\n" +
"Under Related settings, click Additional date, time & regional\n" +
"settings.\n";
case "advanced":
return "Right click Start.\n" +
"Click Control Panel.\n" +
"Click System and Security.\n" +
"Click System.\n" +
"Click Advanced system settings on the left.\n";
case "appearance":
return "Right Click Start.\n" +
"Click Control Panel.\n" +
"Click Appearance and Personalisation.\n";
case "commandprompt":
return "Right click Start." +
"Type cmd into the search/Cortana box." +
"Click cmd. Optionally click cmd.exe run as administrator.";
case "cp":
return "Right click Start.\n" +
"Click Control Panel.\n";
case "desktop":
return "Right click on an empty part of the desktop.\n";
case "network":
return "Right click Start.\n" +
"Click Control Panel.\n" +
"Click Network and Internet.\n";
case "security":
return "Right click Start.\n" +
"Click Control Panel.\n" +
"Click System and Security.\n";
case "settings":
return "Left click Start.\n" +
"Click settings.\n";
case "start":
return "Right click Start.\n";
case "tools":
return "Right click Start.\n" +
"Click Control Panel.\n" +
"Click System and Security.\n" +
"Click Administrative Tools.";
default:
err.println( "unknown Win10Navigate target " + target );
return "Unknown target " + target + ".";
}
}
/**
* typical use:
*
* @param parms macro params
* @param quiet true if want output suppressed.
* @param verbose @return expanded macro HTML
*/
public String expandMacro( final String[] parms, final boolean quiet, final boolean verbose )
{
if ( !quiet )
{
out.print( "W" );
}
if ( parms.length != 1 )
{
throw new IllegalArgumentException( USAGE );
}
final String target = parms[ 0 ];
return expand( target );
}
}