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) class
Comparable object representing one project in the summary on invoice.(package private) class
Comparable object representing one task in the summary on invoice. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Vector
filterTasks
(Vector tasks) Filters given vector of tasks trough all used filters and returns vector of tasks satisfying all filters.(package private) void
Generates 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 void
writeFooter
(OutputStreamWriter writer) private void
writeHeader
(OutputStreamWriter writer) private void
writeHTMLFooter
(OutputStreamWriter writer) private void
writeHTMLHeader
(OutputStreamWriter writer) private void
private void
private void
writeHTMLSubjects
(OutputStreamWriter writer) private void
writeHTMLTasks
(OutputStreamWriter writer) private void
private void
writeProjectsTasks
(OutputStreamWriter writer) private void
writeSubjects
(OutputStreamWriter writer) private void
writeTasks
(OutputStreamWriter writer) private void
writeTXTFooter
(OutputStreamWriter writer) private void
writeTXTHeader
(OutputStreamWriter writer) private void
private void
private void
writeTXTSubjects
(OutputStreamWriter writer) private void
writeTXTTasks
(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.
-