edu.ucsb.nceas.morpho.plugins.printer
Class PrinterPlugin
java.lang.Object
edu.ucsb.nceas.morpho.plugins.printer.PrinterPlugin
- All Implemented Interfaces:
- PluginInterface, PrinterInterface, ServiceProvider
- public class PrinterPlugin
- extends java.lang.Object
- implements PrinterInterface, PluginInterface, ServiceProvider
Plugin that provides a display panel to display HTML or plain text and
allows the user to print the document
Method Summary |
void |
display(java.lang.String displayString,
java.lang.String contentType)
method to display a user-provided String and provide an option to print it. |
static java.awt.print.PageFormat |
getPageFormat()
|
void |
initialize(Morpho morpho)
Required by PluginInterface; called automatically at runtime |
void |
print(java.lang.String displayString,
java.lang.String contentType)
method to just print a user-provided String. |
static void |
setPageFormat(java.awt.print.PageFormat pf)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrinterPlugin
public PrinterPlugin()
initialize
public void initialize(Morpho morpho)
- Required by PluginInterface; called automatically at runtime
- Specified by:
initialize
in interface PluginInterface
- Parameters:
morpho
- a reference to the Morpho
display
public void display(java.lang.String displayString,
java.lang.String contentType)
- Description copied from interface:
PrinterInterface
- method to display a user-provided String and provide an option to print it.
The display string could be a html string or a plain text. The content type
of the display string is also provided by the caller.
- Specified by:
display
in interface PrinterInterface
- Parameters:
displayString
- the string to be displayed (html or plain text string)contentType
- the contentType of the display string
("text/html" or "text/plain")
print
public void print(java.lang.String displayString,
java.lang.String contentType)
- Description copied from interface:
PrinterInterface
- method to just print a user-provided String. The print string could be a html
string or a plain text. The content type of the print string is also provided
by the caller.
- Specified by:
print
in interface PrinterInterface
- Parameters:
displayString
- the string to be printed (html or plain text string)contentType
- the contentType of the print string
("text/html" or "text/plain")
setPageFormat
public static void setPageFormat(java.awt.print.PageFormat pf)
getPageFormat
public static java.awt.print.PageFormat getPageFormat()
Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.