|
|||||||||
| Home >> All >> com >> pjsofts >> eurobudget >> [ editors overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.pjsofts.eurobudget.editors
Class TxnEditor

java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JInternalFrame
com.pjsofts.eurobudget.editors.TxnEditor
- All Implemented Interfaces:
- javax.accessibility.Accessible, EBEditor, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.util.Observer, java.beans.PropertyChangeListener, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants
- public class TxnEditor
- extends javax.swing.JInternalFrame
- implements EBEditor, java.beans.PropertyChangeListener, java.util.Observer
- extends javax.swing.JInternalFrame
Editor of transactions quite complex ...
| Nested Class Summary | |
private class |
TxnEditor.ActionAutoResize
auto resize a column table |
private class |
TxnEditor.ActionConvert
Convert one transaction only into another kind one |
| Nested classes inherited from class javax.swing.JInternalFrame |
javax.swing.JInternalFrame.AccessibleJInternalFrame, javax.swing.JInternalFrame.JDesktopIcon |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class javax.swing.JInternalFrame |
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
TxnEditor()
Creates new form TxnEditor Depends of DataModel so it should be created before calling; |
|
| Method Summary | |
private void |
accountComboActionPerformed(java.awt.event.ActionEvent evt)
react on a change of account |
int |
addMenuItems(javax.swing.JMenuBar menuBar,
int index)
add custom menu items of the menu |
private void |
checkRowImpl(int row)
|
private void |
fillWithData(com.pjsofts.eurobudget.DataModel dataModel)
should be called once at the beginning of use of this editor In fact is called each time we call updateDataModel() |
private void |
formMouseClicked(java.awt.event.MouseEvent evt)
|
java.lang.String |
getEditorName()
name of this editor used in moveToFront method of EuroBudget |
private com.pjsofts.eurobudget.beans.Transaction |
getNewTransaction(int ind)
|
com.pjsofts.eurobudget.gui.PrintableComponent |
getPrintableComponent(java.awt.print.PageFormat pf)
|
private int |
getTabbedPaneIndex(com.pjsofts.eurobudget.beans.Transaction t)
reverse of getNewTransaction |
void |
goTo(com.pjsofts.eurobudget.beans.Account account,
com.pjsofts.eurobudget.beans.Transaction t)
go and select this transaction if contained in txn editor |
void |
goTo(com.pjsofts.eurobudget.beans.Transaction t)
go and select this transaction if contained in txn editor |
void |
initAccountMenu()
|
void |
initActions()
|
private void |
initComponents()
This method is called from within the constructor to initialize the form. |
private void |
initCustomizers()
init method may be called many times to reinitialize list of datas (entities, categories, account) |
void |
initCustomMenu()
|
void |
initMenu(javax.swing.JMenu menu)
|
void |
initMenu(javax.swing.JPopupMenu menu)
|
private void |
initTable()
|
private void |
initTexts()
set all text for gui as i18n |
void |
initTxnButtons()
|
private void |
jTabbedPaneStateChanged(javax.swing.event.ChangeEvent evt)
If not called from the program when a transaction is selected, but by the user clicking directly on tabs, then should create a new transaction |
void |
propertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
listens to change in customizers and synch other components.. |
void |
reinitializeData()
reinit all gui data model from current data model |
void |
removeMenuItems(javax.swing.JMenuBar menuBar)
remove custom menu items of the menu |
void |
saveColumnsPreferences()
save as preferences the current columns dispayed and their order |
private void |
setCustomizer(int ind,
com.pjsofts.eurobudget.beans.Transaction t)
set the current customizer variable,set the transaction as its bean,register propertychange listener Disable the customizer (ReadOnly) if t is Verified |
void |
showEditor()
put this editor to the front of the user interface Overriden to always update its account status (Ccy, initial date and initial amount) in synch. |
private void |
txnTableMouseClicked(java.awt.event.MouseEvent evt)
|
private void |
txnTableMousePressed(java.awt.event.MouseEvent evt)
|
void |
update(java.util.Observable o,
java.lang.Object arg)
Listens to change on DataModel This method is called whenever the observed object is changed. |
private void |
updateAccountRelated(com.pjsofts.eurobudget.beans.Account account)
should be called each time user change the account in the combo Change the table to reflect account's data. |
private void |
updateActionStatus()
update state of buttons (enabled or not) |
private void |
updateCurrentAccountDataChanges()
Update changes related to ccy, initial date and inital amount of an account. |
private void |
updateCustomizer(com.pjsofts.eurobudget.beans.Transaction t)
Update the customizer for the corresponding transaction in the table Called each time the transaction is selected in the table |
private void |
updateCustomizers(java.lang.Object arg)
to call each time data used by customizers changes ... |
private void |
updateDataModel(com.pjsofts.eurobudget.DataModel dataModel)
Refresh all data from Data Model and reselect first account |
private void |
updateLastCheckNb(com.pjsofts.eurobudget.DataModel dm)
retrieve the highest check number |
void |
updateMenu(javax.swing.JMenu menu,
com.pjsofts.eurobudget.beans.Transaction t)
update menu and popup menu with dynamic items |
void |
updateMenu(javax.swing.JPopupMenu menu,
com.pjsofts.eurobudget.beans.Transaction t)
update menu and popup menu with dynamic items |
private void |
updateTitle()
|
private void |
updateTotals()
compute the current total and display it |
private void |
updateTxnCount()
|
private void |
verifyRowImpl(int row)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
i8n
private static final java.util.ResourceBundle i8n
EB_TXN_COLUMNS
private static final java.lang.String EB_TXN_COLUMNS
- used to save prefs
- See Also:
- Constant Field Values
PANE_VERSEMENT
private static final int PANE_VERSEMENT
- See Also:
- Constant Field Values
PANE_VIREMENT
private static final int PANE_VIREMENT
- See Also:
- Constant Field Values
PANE_CHECK
private static final int PANE_CHECK
- See Also:
- Constant Field Values
PANE_PAYMENT
private static final int PANE_PAYMENT
- See Also:
- Constant Field Values
txnTable
private com.pjsofts.eurobudget.gui.TxnTable txnTable
txnModel
private com.pjsofts.eurobudget.model.AccountTxnTableModel txnModel
dataModel
private com.pjsofts.eurobudget.DataModel dataModel
currentAccount
private com.pjsofts.eurobudget.beans.Account currentAccount
- convenient variable; should be the same as AccountCombo.getSelectedItem()
pmTxnCustomizer
private com.pjsofts.eurobudget.beans.PaymentCustomizer pmTxnCustomizer
vmTxnCustomizer
private com.pjsofts.eurobudget.beans.VersementCustomizer vmTxnCustomizer
viTxnCustomizer
private com.pjsofts.eurobudget.beans.VirementCustomizer viTxnCustomizer
chTxnCustomizer
private com.pjsofts.eurobudget.beans.CheckCustomizer chTxnCustomizer
currentCustomizer
private com.pjsofts.eurobudget.beans.TransactionCustomizer currentCustomizer
- current one displayed :
lastTabbedPane
private int lastTabbedPane
- each time the program put a tabbed pane to front, should update this data,
see updateCustomizer
lastDate
private java.util.Date lastDate
- last date entered or modified
lastTransaction
private com.pjsofts.eurobudget.beans.Transaction lastTransaction
lastNewTransaction
private com.pjsofts.eurobudget.beans.Transaction lastNewTransaction
lastCheckNb
private java.lang.Long lastCheckNb
lastSelections
private int[] lastSelections
- remember last selections for each account , one per account
txnMenu
private javax.swing.JMenu txnMenu
accMenu
private javax.swing.JMenu accMenu
customMenu
private javax.swing.JMenu customMenu
popupMenu
private javax.swing.JPopupMenu popupMenu
- popup on table's cell
headerPopupMenu
private javax.swing.JPopupMenu headerPopupMenu
- popup on table's header
ccyFormat
private java.text.NumberFormat ccyFormat
- formatter used to display totals in account ccy
tableSelectionListener
private javax.swing.event.ListSelectionListener tableSelectionListener
- listener on table selection
ACTION_ACC_BALANCE
private final javax.swing.Action ACTION_ACC_BALANCE
ACTION_ACC_DETAILS
private final javax.swing.Action ACTION_ACC_DETAILS
ACTION_NEW
private final javax.swing.Action ACTION_NEW
- creates a new transaction
ACTION_NEW_PAYMENT
private final javax.swing.Action ACTION_NEW_PAYMENT
- creates a new transaction
ACTION_NEW_CHECK
private final javax.swing.Action ACTION_NEW_CHECK
- creates a new transaction
ACTION_NEW_VERSEMENT
private final javax.swing.Action ACTION_NEW_VERSEMENT
- creates a new transaction
ACTION_NEW_VIREMENT
private final javax.swing.Action ACTION_NEW_VIREMENT
- creates a new transaction
ACTION_AUTORESIZE_TABLE
private final javax.swing.Action ACTION_AUTORESIZE_TABLE
ACTION_DELETE
private final javax.swing.Action ACTION_DELETE
ACTION_CHECK
private final javax.swing.Action ACTION_CHECK
ACTION_VERIFY
private final javax.swing.Action ACTION_VERIFY
ACTION_GOTORELATED
private final javax.swing.Action ACTION_GOTORELATED
- go to related txn
ACTION_TXN_CUT
private final javax.swing.Action ACTION_TXN_CUT
ACTION_TXN_COPY
private final javax.swing.Action ACTION_TXN_COPY
ACTION_TXN_PASTE
private final javax.swing.Action ACTION_TXN_PASTE
ACTION_TXN_MODIFY
private final javax.swing.Action ACTION_TXN_MODIFY
- if in txn table go on txn customizer, else go on txn table
ACTION_TXN_PREVIOUS
private final javax.swing.Action ACTION_TXN_PREVIOUS
- select previous month transaction
ACTION_TXN_PREVIOUS_MONTH
private final javax.swing.Action ACTION_TXN_PREVIOUS_MONTH
- select previous month transaction
ACTION_TXN_NEXT
private final javax.swing.Action ACTION_TXN_NEXT
- select next transaction
ACTION_TXN_NEXT_MONTH
private final javax.swing.Action ACTION_TXN_NEXT_MONTH
- select next month transaction
ACTION_TXN_GROUP
private final javax.swing.Action ACTION_TXN_GROUP
- group command
ACTION_TXN_SPLIT
private final javax.swing.Action ACTION_TXN_SPLIT
- split command : show sub transaction in popup window
ACTION_TXN_REPEAT
private final javax.swing.Action ACTION_TXN_REPEAT
- split command : show sub transaction in popup window
accountCombo
private javax.swing.JComboBox accountCombo
jScrollPane1
private javax.swing.JScrollPane jScrollPane1
jPanelPayment
private javax.swing.JPanel jPanelPayment
jLabelTotalCredit
private javax.swing.JLabel jLabelTotalCredit
jLabelTodayCredit
private javax.swing.JLabel jLabelTodayCredit
jTabbedPane
private javax.swing.JTabbedPane jTabbedPane
jButtonNew
private javax.swing.JButton jButtonNew
jPanelCheck
private javax.swing.JPanel jPanelCheck
jButtonRemove
private javax.swing.JButton jButtonRemove
jLabelTotal
private javax.swing.JLabel jLabelTotal
txnCountLabel
private javax.swing.JLabel txnCountLabel
detailsPanel
private javax.swing.JPanel detailsPanel
jPanelVirement
private javax.swing.JPanel jPanelVirement
jPanelButtons
private javax.swing.JPanel jPanelButtons
jLabelTodayDebit
private javax.swing.JLabel jLabelTodayDebit
jLabelTotalToday
private javax.swing.JLabel jLabelTotalToday
jLabelTotalDebit
private javax.swing.JLabel jLabelTotalDebit
jPanelTotals
private javax.swing.JPanel jPanelTotals
accPanel
private javax.swing.JPanel accPanel
jPanelVersement
private javax.swing.JPanel jPanelVersement
balanceLabel
private javax.swing.JLabel balanceLabel
| Constructor Detail |
TxnEditor
public TxnEditor()
- Creates new form TxnEditor
Depends of DataModel so it should be created before calling;
| Method Detail |
getEditorName
public java.lang.String getEditorName()
- name of this editor
used in moveToFront method of EuroBudget
- Specified by:
getEditorNamein interfaceEBEditor
updateDataModel
private void updateDataModel(com.pjsofts.eurobudget.DataModel dataModel)
- Refresh all data from Data Model
and reselect first account
initTable
private void initTable()
initCustomizers
private void initCustomizers()
- init method
may be called many times to reinitialize list of datas (entities, categories, account)
updateCustomizers
private void updateCustomizers(java.lang.Object arg)
- to call each time data used by customizers changes ...
list of entities,ctg,accounts,...
initActions
public void initActions()
fillWithData
private void fillWithData(com.pjsofts.eurobudget.DataModel dataModel)
- should be called once at the beginning of use of this editor
In fact is called each time we call updateDataModel()
updateActionStatus
private void updateActionStatus()
- update state of buttons (enabled or not)
update
public void update(java.util.Observable o, java.lang.Object arg)
- Listens to change on DataModel
This method is called whenever the observed object is changed. An application calls an Observable object's notifyObservers method to have all the object's observers notified of the change.
Parameters:
o - the observable object.(a DataModel)
arg - an argument passed to the notifyObservers method.
- Specified by:
updatein interfacejava.util.Observer
updateLastCheckNb
private void updateLastCheckNb(com.pjsofts.eurobudget.DataModel dm)
- retrieve the highest check number
updateAccountRelated
private void updateAccountRelated(com.pjsofts.eurobudget.beans.Account account)
- should be called each time user change the account in the combo
Change the table to reflect account's data.
Select the last row.
update also customizers' account variable.
change title of the frame to display the account name
updateCurrentAccountDataChanges
private void updateCurrentAccountDataChanges()
- Update changes related to ccy, initial date and inital amount of an account.
(not new/remove account change)
updateTotals
private void updateTotals()
- compute the current total and display it
updateTxnCount
private void updateTxnCount()
updateTitle
private void updateTitle()
updateCustomizer
private void updateCustomizer(com.pjsofts.eurobudget.beans.Transaction t)
- Update the customizer for the corresponding transaction in the table
Called each time the transaction is selected in the table
getNewTransaction
private com.pjsofts.eurobudget.beans.Transaction getNewTransaction(int ind)
getTabbedPaneIndex
private int getTabbedPaneIndex(com.pjsofts.eurobudget.beans.Transaction t)
- reverse of getNewTransaction
setCustomizer
private void setCustomizer(int ind,
com.pjsofts.eurobudget.beans.Transaction t)
- set the current customizer variable,set the transaction as its bean,register propertychange listener
Disable the customizer (ReadOnly) if t is Verified
goTo
public void goTo(com.pjsofts.eurobudget.beans.Transaction t)
- go and select this transaction if contained in txn editor
goTo
public void goTo(com.pjsofts.eurobudget.beans.Account account, com.pjsofts.eurobudget.beans.Transaction t)
- go and select this transaction if contained in txn editor
initComponents
private void initComponents()
- This method is called from within the constructor to
initialize the form.
WARNING: Do NOT modify this code. The content of this method is
always regenerated by the Form Editor.
initTexts
private void initTexts()
- set all text for gui as i18n
txnTableMousePressed
private void txnTableMousePressed(java.awt.event.MouseEvent evt)
formMouseClicked
private void formMouseClicked(java.awt.event.MouseEvent evt)
txnTableMouseClicked
private void txnTableMouseClicked(java.awt.event.MouseEvent evt)
JAVADOC