Package uk.ac.starlink.ttools.build
Class PlotExample
java.lang.Object
uk.ac.starlink.ttools.build.PlotExample
Programmatically generates example text and images for STILTS plotting tasks.
Used in generating the documentation.
- Since:
- 9 Oct 2008
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionPlotExample
(String name, String taskName, String[] params, String[] comments) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic PlotExample[]
Returns a list of examples for the plot2d task.static PlotExample[]
Returns a list of examples for the plot3d task.static PlotExample[]
Returns a list of examples for the plothist task.static void
Writes example files ready for incorporation into documentation.Generates and outputs the image file showing the result of this example.void
writeXml
(PrintStream out) Outputs the XML for this example as a <dt><dd> element pair.
-
Constructor Details
-
PlotExample
public PlotExample(String name, String taskName, String[] params, String[] comments) throws uk.ac.starlink.task.TaskException, uk.ac.starlink.util.LoadException Constructor.- Parameters:
name
- example nametaskName
- name of the STILTS task being usedparams
- array of name=value pairs giving parameters; a null in the list signifies line break for formattingcomments
- array of lines consituting the example description; concatenated must form one or more XML <p> elements- Throws:
uk.ac.starlink.task.TaskException
uk.ac.starlink.util.LoadException
-
-
Method Details
-
writeXml
Outputs the XML for this example as a <dt><dd> element pair.- Parameters:
out
- destination stream- Throws:
IOException
-
writeImage
Generates and outputs the image file showing the result of this example.- Returns:
- name of the written file in the current directory
- Throws:
IOException
uk.ac.starlink.task.TaskException
-
createPlot2dExamples
public static PlotExample[] createPlot2dExamples() throws uk.ac.starlink.task.TaskException, uk.ac.starlink.util.LoadExceptionReturns a list of examples for the plot2d task.- Returns:
- example array
- Throws:
uk.ac.starlink.task.TaskException
uk.ac.starlink.util.LoadException
-
createPlot3dExamples
public static PlotExample[] createPlot3dExamples() throws uk.ac.starlink.task.TaskException, uk.ac.starlink.util.LoadExceptionReturns a list of examples for the plot3d task.- Returns:
- example array
- Throws:
uk.ac.starlink.task.TaskException
uk.ac.starlink.util.LoadException
-
createPlotHistExamples
public static PlotExample[] createPlotHistExamples() throws uk.ac.starlink.task.TaskException, uk.ac.starlink.util.LoadExceptionReturns a list of examples for the plothist task.- Returns:
- example array
- Throws:
uk.ac.starlink.task.TaskException
uk.ac.starlink.util.LoadException
-
main
Writes example files ready for incorporation into documentation.- Throws:
Exception
-