Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.pjsofts.eurobudget.editors
Class TxnEditor  view TxnEditor download TxnEditor.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JInternalFrame
                  extended bycom.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

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
 
Field Summary
private  javax.swing.JMenu accMenu
           
private  javax.swing.JComboBox accountCombo
           
private  javax.swing.JPanel accPanel
           
private  javax.swing.Action ACTION_ACC_BALANCE
           
private  javax.swing.Action ACTION_ACC_DETAILS
           
private  javax.swing.Action ACTION_AUTORESIZE_TABLE
           
private  javax.swing.Action ACTION_CHECK
           
private  javax.swing.Action ACTION_DELETE
           
private  javax.swing.Action ACTION_GOTORELATED
          go to related txn
private  javax.swing.Action ACTION_NEW
          creates a new transaction
private  javax.swing.Action ACTION_NEW_CHECK
          creates a new transaction
private  javax.swing.Action ACTION_NEW_PAYMENT
          creates a new transaction
private  javax.swing.Action ACTION_NEW_VERSEMENT
          creates a new transaction
private  javax.swing.Action ACTION_NEW_VIREMENT
          creates a new transaction
private  javax.swing.Action ACTION_TXN_COPY
           
private  javax.swing.Action ACTION_TXN_CUT
           
private  javax.swing.Action ACTION_TXN_GROUP
          group command
private  javax.swing.Action ACTION_TXN_MODIFY
          if in txn table go on txn customizer, else go on txn table
private  javax.swing.Action ACTION_TXN_NEXT
          select next transaction
private  javax.swing.Action ACTION_TXN_NEXT_MONTH
          select next month transaction
private  javax.swing.Action ACTION_TXN_PASTE
           
private  javax.swing.Action ACTION_TXN_PREVIOUS
          select previous month transaction
private  javax.swing.Action ACTION_TXN_PREVIOUS_MONTH
          select previous month transaction
private  javax.swing.Action ACTION_TXN_REPEAT
          split command : show sub transaction in popup window
private  javax.swing.Action ACTION_TXN_SPLIT
          split command : show sub transaction in popup window
private  javax.swing.Action ACTION_VERIFY
           
private  javax.swing.JLabel balanceLabel
           
private  java.text.NumberFormat ccyFormat
          formatter used to display totals in account ccy
private  com.pjsofts.eurobudget.beans.CheckCustomizer chTxnCustomizer
           
private  com.pjsofts.eurobudget.beans.Account currentAccount
          convenient variable; should be the same as AccountCombo.getSelectedItem()
private  com.pjsofts.eurobudget.beans.TransactionCustomizer currentCustomizer
          current one displayed :
private  javax.swing.JMenu customMenu
           
private  com.pjsofts.eurobudget.DataModel dataModel
           
private  javax.swing.JPanel detailsPanel
           
private static java.lang.String EB_TXN_COLUMNS
          used to save prefs
private  javax.swing.JPopupMenu headerPopupMenu
          popup on table's header
private static java.util.ResourceBundle i8n
           
private  javax.swing.JButton jButtonNew
           
private  javax.swing.JButton jButtonRemove
           
private  javax.swing.JLabel jLabelTodayCredit
           
private  javax.swing.JLabel jLabelTodayDebit
           
private  javax.swing.JLabel jLabelTotal
           
private  javax.swing.JLabel jLabelTotalCredit
           
private  javax.swing.JLabel jLabelTotalDebit
           
private  javax.swing.JLabel jLabelTotalToday
           
private  javax.swing.JPanel jPanelButtons
           
private  javax.swing.JPanel jPanelCheck
           
private  javax.swing.JPanel jPanelPayment
           
private  javax.swing.JPanel jPanelTotals
           
private  javax.swing.JPanel jPanelVersement
           
private  javax.swing.JPanel jPanelVirement
           
private  javax.swing.JScrollPane jScrollPane1
           
private  javax.swing.JTabbedPane jTabbedPane
           
private  java.lang.Long lastCheckNb
           
private  java.util.Date lastDate
          last date entered or modified
private  com.pjsofts.eurobudget.beans.Transaction lastNewTransaction
           
private  int[] lastSelections
          remember last selections for each account , one per account
private  int lastTabbedPane
          each time the program put a tabbed pane to front, should update this data, see updateCustomizer
private  com.pjsofts.eurobudget.beans.Transaction lastTransaction
           
private static int PANE_CHECK
           
private static int PANE_PAYMENT
           
private static int PANE_VERSEMENT
           
private static int PANE_VIREMENT
           
private  com.pjsofts.eurobudget.beans.PaymentCustomizer pmTxnCustomizer
           
private  javax.swing.JPopupMenu popupMenu
          popup on table's cell
private  javax.swing.event.ListSelectionListener tableSelectionListener
          listener on table selection
private  javax.swing.JLabel txnCountLabel
           
private  javax.swing.JMenu txnMenu
           
private  com.pjsofts.eurobudget.model.AccountTxnTableModel txnModel
           
private  com.pjsofts.eurobudget.gui.TxnTable txnTable
           
private  com.pjsofts.eurobudget.beans.VirementCustomizer viTxnCustomizer
           
private  com.pjsofts.eurobudget.beans.VersementCustomizer vmTxnCustomizer
           
 
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 javax.swing.JInternalFrame
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
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:
getEditorName in interface EBEditor

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:
update in interface java.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)