Package adams.doc.latex.generator
Class Figure
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.doc.latex.generator.AbstractCodeGenerator
-
- adams.doc.latex.generator.AbstractMetaCodeGenerator
-
- adams.doc.latex.generator.Figure
-
- 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 Figure extends AbstractMetaCodeGenerator
Inserts a figure with the code generated by the base generator.
-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
-generator <adams.doc.latex.generator.CodeGenerator> (property: generator) Generates the code for the figure. default: adams.doc.latex.generator.Image
-options <java.lang.String> (property: options) The options for the figure. default:
-center <boolean> (property: center) Whether to center the figure. default: false
-caption <java.lang.String> (property: caption) The caption of the figure. default:
-label <java.lang.String> (property: label) The optional label of the figure (for cross-referencing). default:
- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringm_Captionthe caption of the section.protected booleanm_Centerwhether to center the figure.protected Stringm_Labelthe (optional) label for the section.protected Stringm_Optionsoptional parameters for the image.-
Fields inherited from class adams.doc.latex.generator.AbstractMetaCodeGenerator
m_Generator
-
Fields inherited from class adams.doc.latex.generator.AbstractCodeGenerator
m_FlowContext, m_NoVariableExpansion, m_Skip
-
-
Constructor Summary
Constructors Constructor Description Figure()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcaptionTipText()Returns the tip text for this property.StringcenterTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected StringdoGenerate()Generates the actual code.StringgeneratorTipText()Returns the tip text for this property.StringgetCaption()Returns the caption.booleangetCenter()Returns whether to center the figure.protected CodeGeneratorgetDefaultGenerator()Returns the default code generator to use.StringgetLabel()Returns the label.StringgetOptions()Returns the options to use for the figure.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.StringglobalInfo()Returns a string describing the object.StringlabelTipText()Returns the tip text for this property.StringoptionsTipText()Returns the tip text for this property.voidsetCaption(String value)Sets the caption.voidsetCenter(boolean value)Sets whether to center the figure.voidsetLabel(String value)Sets the label.voidsetOptions(String value)Sets the options to use for the figure.-
Methods inherited from class adams.doc.latex.generator.AbstractMetaCodeGenerator
getGenerator, setFlowContext, setGenerator
-
Methods inherited from class adams.doc.latex.generator.AbstractCodeGenerator
check, ensureTrailingNewLine, ensureTrailingNewLine, escape, expand, expandEscape, generate, getAdditionalInformation, getFlowContext, getNoVariableExpansion, getSkip, noVariableExpansionTipText, 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
-
-
-
-
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 classAbstractMetaCodeGenerator
-
getDefaultGenerator
protected CodeGenerator getDefaultGenerator()
Returns the default code generator to use.- Specified by:
getDefaultGeneratorin classAbstractMetaCodeGenerator- Returns:
- the default
-
generatorTipText
public String generatorTipText()
Returns the tip text for this property.- Specified by:
generatorTipTextin classAbstractMetaCodeGenerator- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOptions
public void setOptions(String value)
Sets the options to use for the figure.- Parameters:
value- the options
-
getOptions
public String getOptions()
Returns the options to use for the figure.- Returns:
- the options
-
optionsTipText
public String optionsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setCenter
public void setCenter(boolean value)
Sets whether to center the figure.- Parameters:
value- true if to center
-
getCenter
public boolean getCenter()
Returns whether to center the figure.- Returns:
- true if to center
-
centerTipText
public String centerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setCaption
public void setCaption(String value)
Sets the caption.- Parameters:
value- the caption
-
getCaption
public String getCaption()
Returns the caption.- Returns:
- the caption
-
captionTipText
public String captionTipText()
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 classAbstractMetaCodeGenerator- 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
-
-