/* * [AmanuensisHead.java] * * Summary: Produce the header for an amanuensis type HTML. * * Copyright: (c) 1999-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.8 2009-02-06 include go package in ZIP bundle. */ package com.mindprod.htmlmacros.macro; import com.mindprod.htmlmacros.support.GoogleAdSense; import com.mindprod.htmlmacros.support.Indexing; import static java.lang.System.*; /** * Produce the header for an amanuensis type HTML. * * @author Roedy Green, Canadian Mind Products * @version 1.8 2009-02-06 include go package in ZIP bundle. * @since 1999 */ @SuppressWarnings( { "UnusedDeclaration" } ) public final class AmanuensisHead extends Head { /** * how to use the macro */ private static final String USAGE = "\nAmanuensisHead needs title, desc, keywords, [image]"; /** * Generate the header for an amanuensis html documents. * * @param parms parameters from macro command line. parm[0] = title of fragment. parm[1] = description * of fragment. parm[2] = keywords for fragment. parm[3] = gif (optional) * @param quiet true if want output suppressed. * @param verbose @return expanded macro HTML */ public String expandMacro( String[] parms, final boolean quiet, final boolean verbose ) { if ( !quiet ) { out.print( "A" ); } if ( !( 3 <= parms.length && parms.length <= 4 ) ) { throw new IllegalArgumentException( USAGE ); } String title = parms[ 0 ]; String description = parms[ 1 ]; String keywords = parms[ 2 ]; String image; if ( parms.length > 3 ) { image = parms[ 3 ]; } else { image = ""; } String icon16 = "icon16/applet.png"; String sectionFile = "jgloss/jgloss.html"; String sectionTitle = "Java Glossary"; String subSectionFile = "applet/applets.html"; String subSectionTitle = "Applets"; return generalHead( title, null, description, title, "applettitlesubsubsection", keywords, icon16, null, image, null, null, sectionFile, sectionTitle, subSectionFile, subSectionTitle, null, null, null, null, Indexing.NONE, GoogleAdSense.MEDIUM_RECTANGLE, null, null ); } }