Package adams.doc.latex.generator
Class NewSection
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.doc.latex.generator.AbstractCodeGenerator
-
- adams.doc.latex.generator.NewSection
-
- All Implemented Interfaces:
adams.core.AdditionalInformationHandler,adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.QuickInfoSupporter,adams.core.SizeOfHandler,CodeGenerator,adams.flow.core.FlowContextHandler,Serializable
public class NewSection extends AbstractCodeGenerator
Adds a new section to the document with an optional label for cross-referencing.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-no-var-expansion <boolean> (property: noVariableExpansion) If enabled, variable expansion gets skipped. default: false
-page-action <NONE|NEWPAGE|CLEARPAGE> (property: pageAction) The page action to insert. default: NONE
-type <PART|CHAPTER|SECTION|SUBSECTION|SUBSUBSECTION|PARAGRAPH|SUBPARAGRAPH> (property: type) The type of the section. default: SECTION
-title <java.lang.String> (property: title) The title of the section. default:
-label <java.lang.String> (property: label) The optional label of the section (for cross-referencing). default:
- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNewSection.PageActionThe page action.static classNewSection.SectionTypeThe types of sections.
-
Field Summary
Fields Modifier and Type Field Description protected Stringm_Labelthe (optional) label for the section.protected NewSection.PageActionm_PageActionthe page action.protected Stringm_Titlethe title of the section.protected NewSection.SectionTypem_Typethe type of section.-
Fields inherited from class adams.doc.latex.generator.AbstractCodeGenerator
m_FlowContext, m_NoVariableExpansion, m_Skip
-
-
Constructor Summary
Constructors Constructor Description NewSection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected StringdoGenerate()Generates the actual code.StringgetLabel()Returns the label.NewSection.PageActiongetPageAction()Returns the page action.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.String[]getRequiredPackages()Returns the list of required LaTeX packages for this code generator.StringgetTitle()Returns the title.NewSection.SectionTypegetType()Returns the type.StringglobalInfo()Returns a string describing the object.StringlabelTipText()Returns the tip text for this property.StringpageActionTipText()Returns the tip text for this property.voidsetLabel(String value)Sets the label.voidsetPageAction(NewSection.PageAction value)Sets the page action.voidsetTitle(String value)Sets the title.voidsetType(NewSection.SectionType value)Sets the type.StringtitleTipText()Returns the tip text for this property.StringtypeTipText()Returns the tip text for this property.-
Methods inherited from class adams.doc.latex.generator.AbstractCodeGenerator
check, ensureTrailingNewLine, ensureTrailingNewLine, escape, expand, expandEscape, generate, getAdditionalInformation, getFlowContext, getNoVariableExpansion, getSkip, noVariableExpansionTipText, setFlowContext, setNoVariableExpansion, setSkip, skipTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_PageAction
protected NewSection.PageAction m_PageAction
the page action.
-
m_Type
protected NewSection.SectionType m_Type
the type of section.
-
m_Title
protected String m_Title
the title of the section.
-
m_Label
protected String m_Label
the (optional) label for the section.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classAbstractCodeGenerator
-
setPageAction
public void setPageAction(NewSection.PageAction value)
Sets the page action.- Parameters:
value- the action
-
getPageAction
public NewSection.PageAction getPageAction()
Returns the page action.- Returns:
- the action
-
pageActionTipText
public String pageActionTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setType
public void setType(NewSection.SectionType value)
Sets the type.- Parameters:
value- the type
-
getType
public NewSection.SectionType getType()
Returns the type.- Returns:
- the type
-
typeTipText
public String typeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTitle
public void setTitle(String value)
Sets the title.- Parameters:
value- the title
-
getTitle
public String getTitle()
Returns the title.- Returns:
- the title
-
titleTipText
public String titleTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLabel
public void setLabel(String value)
Sets the label.- Parameters:
value- the label
-
getLabel
public String getLabel()
Returns the label.- Returns:
- the label
-
labelTipText
public String labelTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getRequiredPackages
public String[] getRequiredPackages()
Returns the list of required LaTeX packages for this code generator.- Specified by:
getRequiredPackagesin interfaceCodeGenerator- Specified by:
getRequiredPackagesin classAbstractCodeGenerator- Returns:
- the packages
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfoin interfaceCodeGenerator- Specified by:
getQuickInfoin interfaceadams.core.QuickInfoSupporter- Overrides:
getQuickInfoin classAbstractCodeGenerator- Returns:
- null if no info available, otherwise short string
-
doGenerate
protected String doGenerate()
Generates the actual code.- Specified by:
doGeneratein classAbstractCodeGenerator- Returns:
- the generated code
-
-