/* * [FeedbackHead.java] * * Summary: Header for a section of feedback. * * Copyright: (c) 2004-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.*; /** * Header for a section of feedback. * * @author Roedy Green, Canadian Mind Products * @version 1.8 2009-02-06 include go package in ZIP bundle. * @since 2004 */ public final class FeedbackHead extends Head { /** * how to use the macro */ private static final String USAGE = "\nFeedbackHead macro needs title, keywords, subsectionfile, subsectiontitle"; /** * Generate the header for an amanuensis html documents. * * @param parms parameters from macro command line. parm[0] = title of fragment. parm[1] = keywords for * fragment. parm[2] = subSection file e.g. feedback/animals.html parm[3] = subsection * Title e.g. "feedback about animals" * @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( "F" ); } if ( parms.length != 4 ) { throw new IllegalArgumentException( USAGE ); } String title = parms[ 0 ]; String keywords = parms[ 1 ] + ", feedback, Roedy Green, Canadian Mind Products, feedback, responses, viewer mail, fan mail"; String icon = "icon16/feedback.png"; String image = "icon64/feedback.png"; String sectionFile = "feedback/feedback.html"; String sectionTitle = "feedback"; String subSectionFile = parms[ 2 ]; String subSectionTitle = parms[ 3 ]; return generalHead( title, null, title, title, "titlesubsubsection", keywords, icon, null, image, null, null, sectionFile, sectionTitle, subSectionFile, subSectionTitle, null, null, null, null, Indexing.NONE, GoogleAdSense.MEDIUM_RECTANGLE, null, null ); } }