Package org.cesilko.rachota.gui
Class InvoiceGenerator
java.lang.Object
org.cesilko.rachota.gui.InvoiceGenerator
Helper class for generation of HTML/TXT invoices.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classComparable object representing one project in the summary on invoice.(package private) classComparable object representing one task in the summary on invoice. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate VectorfilterTasks(Vector tasks) Filters given vector of tasks trough all used filters and returns vector of tasks satisfying all filters.(package private) voidGenerates invoice based on data provided in constructor of InvoiceGenerator class.private InvoiceGenerator.ProjectRow[]Processes all days in selected period and their tasks and for each non-idle, non-private (unless required) task calculates projects statistic (@see ProjectRow).private InvoiceGenerator.TaskRow[]Processes all days in selected period and their tasks and for each non-idle, non-private (unless required) task calculates its statistic (@see TaskRow).private voidwriteFooter(OutputStreamWriter writer) private voidwriteHeader(OutputStreamWriter writer) private voidwriteHTMLFooter(OutputStreamWriter writer) private voidwriteHTMLHeader(OutputStreamWriter writer) private voidprivate voidprivate voidwriteHTMLSubjects(OutputStreamWriter writer) private voidwriteHTMLTasks(OutputStreamWriter writer) private voidprivate voidwriteProjectsTasks(OutputStreamWriter writer) private voidwriteSubjects(OutputStreamWriter writer) private voidwriteTasks(OutputStreamWriter writer) private voidwriteTXTFooter(OutputStreamWriter writer) private voidwriteTXTHeader(OutputStreamWriter writer) private voidprivate voidprivate voidwriteTXTSubjects(OutputStreamWriter writer) private voidwriteTXTTasks(OutputStreamWriter writer)
-
Field Details
-
file
-
title
-
userDetails
-
customerDetails
-
paymentDetails
-
dueDays
-
price
-
currency
-
tax
-
rowsRepresent
-
days
-
selectFilters
-
-
Constructor Details
-
InvoiceGenerator
-
-
Method Details
-
generateInvoice
void generateInvoice()Generates invoice based on data provided in constructor of InvoiceGenerator class. -
writeHeader
- Throws:
IOException
-
writeSubjects
- Throws:
IOException
-
writeProjectsTasks
- Throws:
IOException
-
writeTasks
- Throws:
IOException
-
writePaymentDetails
- Throws:
IOException
-
writeHTMLHeader
- Throws:
IOException
-
writeHTMLSubjects
- Throws:
IOException
-
writeHTMLProjectsTasks
- Throws:
IOException
-
writeHTMLTasks
- Throws:
IOException
-
writeHTMLPaymentDetails
- Throws:
IOException
-
writeTXTHeader
- Throws:
IOException
-
writeTXTSubjects
- Throws:
IOException
-
writeTXTProjectsTasks
- Throws:
IOException
-
writeTXTPaymentDetails
- Throws:
IOException
-
writeTXTTasks
- Throws:
IOException
-
getProjectRows
Processes all days in selected period and their tasks and for each non-idle, non-private (unless required) task calculates projects statistic (@see ProjectRow). Finally, sorts all entries according to user's preference.- Returns:
- Sorted array of project rows to be included on the invoice.
-
getTaskRows
Processes all days in selected period and their tasks and for each non-idle, non-private (unless required) task calculates its statistic (@see TaskRow). Finally, sorts all entries according to user's preference.- Returns:
- Sorted array of task rows to be included on the invoice.
-
filterTasks
Filters given vector of tasks trough all used filters and returns vector of tasks satisfying all filters.- Parameters:
tasks- Vector of tasks to be filtered.- Returns:
- Vector of tasks that satisfied all filters.
-