public class PartyInvoiceApp
extends javafx.application.Application
| Modifier and Type | Class and Description |
|---|---|
static class |
PartyInvoiceApp.SelectedView
Enum for the selected right-side view in the main window.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
VIEW_ABOUT
Vioew for the about dialog.
|
static String |
VIEW_INVOICES
Right-side view "Invoices".
|
static String |
VIEW_MAIN
View with the contents of the main window.
|
static String |
VIEW_MESSAGE
View for the message box.
|
static String |
VIEW_PERSONS
Right-side view "Persons".
|
static String |
VIEW_RESULT
Right-side view "Result".
|
static String |
VIEW_ROOT
Root view for main window (including menu).
|
static String |
VIEW_SAVECONFIRM
View for the "Save?"
|
static String |
VIEW_WELCOME
Right-side view "Welcome".
|
| Constructor and Description |
|---|
PartyInvoiceApp() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInvoice(String title,
int paidBy)
Perform operation: add invoice.
|
void |
addItem(String title,
long price,
int quantity,
Integer paidBy,
Integer personToPay,
Integer groupToPay)
Perform operation: add item to selected invoice.
|
void |
addPerson(String name)
Perform operation: add person.
|
void |
changeInvoice(int id,
String newTitle,
int paidBy)
Perform operation: change invoice.
|
void |
changeItem(int id,
String title,
long price,
int quantity,
Integer paidBy,
Integer personToPay,
Integer groupToPay)
Perform operation: change item.
|
void |
changeLocale(Locale locale)
Change locale and reload UI.
|
void |
changePerson(int id,
String newName)
Perform operation: change person.
|
void |
deleteInvoice(int id)
Perform operation: delete invoice.
|
void |
deleteItem(int id)
Perform operation: delete item.
|
void |
deletePerson(int id)
Perform operation: delete person.
|
void |
followIllucitHyperlink()
Open the web browser and display the illucit.com website.
|
javafx.collections.ObservableList<InvoiceModel> |
getInvoiceList()
Get the observable list containing the invoice models of the current
project.
|
javafx.collections.ObservableList<ItemModel> |
getItemList()
Get the observable list containing the item models of the currently
selected invoice.
|
javafx.collections.ObservableList<PersonModel> |
getPersonList()
Get the observable list containing the persons of the current project.
|
javafx.collections.ObservableList<PersonListModel> |
getPersonNameList()
Get the observable list containing the person names of the current
project.
|
javafx.collections.ObservableList<PersonListModel> |
getPersonNameListNullable()
Get the observable list containing the person names of the current
project, include an empty entry which can be interpretet as null.
|
javafx.stage.Stage |
getPrimaryStage()
Returns the main stage.
|
javafx.collections.ObservableList<ResultModel> |
getResultList()
Get the observable list containing the result models of the current
project.
|
javafx.collections.ObservableList<ToPayModel> |
getToPayList()
Get the observable list containing the "to pay" models of the current
project:
Everybody
One model for each group
One model for each person
|
PartyInvoiceApp.SelectedView |
getView()
Get the active right side view.
|
void |
init()
Initialize JavaFX application.
|
boolean |
isChanged()
Check if current project was changed since the last save.
|
static void |
main(String[] args)
Start program.
|
void |
menuLoadProject()
Perform Menu Operation "Load Project".
|
void |
menuNewProject()
Perform Menu Operation "New Project".
|
void |
performOperation(Operation operation)
Perform any abstract operation to the current project state and then
reload the observable data.
|
void |
quit()
Quit program (and show "Save Confirmation" dialog is necessary).
|
void |
redo()
Forward project to the next redo step.
|
boolean |
saveAsProject()
Save project as new file.
|
boolean |
saveProject()
Save project.
|
void |
selectView(PartyInvoiceApp.SelectedView selectedView)
Select a view to be active.
|
void |
setSelectedInvoiceProperty(javafx.beans.property.ReadOnlyObjectProperty<InvoiceModel> selectedInvoiceProperty)
Set the object property binding for the currently selected invoice in the
PartyInvoiceApp.SelectedView.Invoices view. |
void |
showAboutDialog()
Show about dialog.
|
void |
start(javafx.stage.Stage primaryStage)
Start main window.
|
void |
undo()
Reset project to the latest undo step.
|
public static final String VIEW_ROOT
public static final String VIEW_MAIN
public static final String VIEW_MESSAGE
public static final String VIEW_SAVECONFIRM
public static final String VIEW_ABOUT
public static final String VIEW_WELCOME
public static final String VIEW_PERSONS
public static final String VIEW_INVOICES
public static final String VIEW_RESULT
public static void main(String[] args)
args - parameters from commandlinepublic void init()
throws Exception
init in class javafx.application.ApplicationExceptionpublic void start(javafx.stage.Stage primaryStage)
throws Exception
start in class javafx.application.ApplicationExceptionpublic void changeLocale(Locale locale)
locale - target localepublic void selectView(PartyInvoiceApp.SelectedView selectedView)
selectedView - right side view that should be activepublic PartyInvoiceApp.SelectedView getView()
public boolean isChanged()
public javafx.stage.Stage getPrimaryStage()
public javafx.collections.ObservableList<PersonModel> getPersonList()
public javafx.collections.ObservableList<PersonListModel> getPersonNameList()
public javafx.collections.ObservableList<PersonListModel> getPersonNameListNullable()
public javafx.collections.ObservableList<InvoiceModel> getInvoiceList()
public void setSelectedInvoiceProperty(javafx.beans.property.ReadOnlyObjectProperty<InvoiceModel> selectedInvoiceProperty)
PartyInvoiceApp.SelectedView.Invoices view. A change handler for the selected
invoice is added to refresh the data for the item list belonging to
current invoice.selectedInvoiceProperty - property for the selected invoicepublic javafx.collections.ObservableList<ItemModel> getItemList()
public javafx.collections.ObservableList<ToPayModel> getToPayList()
public javafx.collections.ObservableList<ResultModel> getResultList()
public void quit()
public void showAboutDialog()
public void followIllucitHyperlink()
public void menuNewProject()
public void menuLoadProject()
public boolean saveProject()
public boolean saveAsProject()
public void performOperation(Operation operation)
operation - operation to performpublic void undo()
public void redo()
public void addPerson(String name)
name - new namepublic void changePerson(int id,
String newName)
id - id of existing personnewName - new name of personpublic void deletePerson(int id)
id - id of existing personpublic void addInvoice(String title, int paidBy)
title - title of new invoicepaidBy - "paid by" person of new invoicepublic void changeInvoice(int id,
String newTitle,
int paidBy)
id - id of existing invoicenewTitle - new title of invoicepaidBy - new "paid by" person of invoicepublic void deleteInvoice(int id)
id - id of existing invoicepublic void addItem(String title, long price, int quantity, Integer paidBy, Integer personToPay, Integer groupToPay)
title - title of new itemprice - price of new itemquantity - quantity of new itempaidBy - "paid by" person of new itempersonToPay - "person to pay" person of new itemgroupToPay - "group to pay" group of new itempublic void changeItem(int id,
String title,
long price,
int quantity,
Integer paidBy,
Integer personToPay,
Integer groupToPay)
id - id of existing itemtitle - new title of itemprice - new price of itemquantity - new quantity of itempaidBy - new "paid by" person of itempersonToPay - new "person to pay" person of itemgroupToPay - new "group to pay" group of itempublic void deleteItem(int id)
id - id of existing itemCopyright © 2015 illucIT Software GmbH. All rights reserved.