Class MetisReportManager<F>
java.lang.Object
io.github.tonywasher.joceanus.metis.report.MetisReportManager<F>
- Type Parameters:
F- the filter type
- All Implemented Interfaces:
OceanusEventRegistrar.OceanusEventProvider<MetisReportEvent>
public class MetisReportManager<F>
extends Object
implements OceanusEventRegistrar.OceanusEventProvider<MetisReportEvent>
Provides functionality to hide and restore sections of an HTML document. This is useful for
displaying HTML documents in a jEditorPane, allowing a click to open/close sections of the
document.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfireActionEvent(F pFilter) fire action event.Format XML.Obtain the builder.Obtain registration object for listeners.protected StringhideSection(String pId) Hide section.protected booleanisHiddenId(String pId) check whether id is currently hidden.voidprocessReference(String pId, TethysUIHTMLManager pHTMLPane) Process link reference.(package private) StringrestoreSection(String pId) Restore section.voidsetDocument(Document pDocument) Set Document.voidsetReport(MetisReportBase<?, F> pReport) Set Report.
-
Constructor Details
-
MetisReportManager
Constructor.- Parameters:
pBuilder- the HTML builder- Throws:
OceanusException- on error
-
-
Method Details
-
getEventRegistrar
Description copied from interface:OceanusEventRegistrar.OceanusEventProviderObtain registration object for listeners.- Specified by:
getEventRegistrarin interfaceOceanusEventRegistrar.OceanusEventProvider<F>- Returns:
- the registrar
-
getBuilder
Obtain the builder.- Returns:
- the HTML builder
-
setReport
Set Report.- Parameters:
pReport- the report
-
setDocument
Set Document.- Parameters:
pDocument- the document
-
fireActionEvent
fire action event.- Parameters:
pFilter- the filter
-
isHiddenId
check whether id is currently hidden.- Parameters:
pId- the id to check- Returns:
- true/false
-
hideSection
Hide section.- Parameters:
pId- the id of the section to hide.- Returns:
- the modified text
- Throws:
OceanusException- on error
-
restoreSection
Restore section.- Parameters:
pId- the id of the section to restore.- Returns:
- the modified text
- Throws:
OceanusException- on error
-
formatXML
Format XML.- Returns:
- the formatted XML
- Throws:
OceanusException- on error
-
processReference
Process link reference.- Parameters:
pId- the id of the reference.pHTMLPane- the HTML pane
-