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

java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.pjsofts.eurobudget.beans.TransactionCustomizer
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.beans.Customizer, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
- Direct Known Subclasses:
- PaymentCustomizer, VersementCustomizer, VirementCustomizer
- public class TransactionCustomizer
- extends javax.swing.JPanel
- implements java.beans.Customizer
- extends javax.swing.JPanel
Customizer for a Transaction Will update immediatly all changes on the given bean
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| 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 Account |
account
The account on which we are creating this transaction, this is used only on complex transaction which need to know about it. |
private com.pjsofts.beans.AmountEditor |
amountEditor
amount editor |
private java.util.SortedMap |
categories
its own map of categories, given by the data model (see DataModel for format ) Used to update sub categories list |
private javax.swing.JPanel |
ctgPanel
|
private com.pjsofts.beans.DateEditor |
dateEditor
date editor |
private javax.swing.JScrollPane |
detailsScrollPane
|
private static boolean |
doAutoCompletion
flag for auto-completion of transaction : when writting in some special field (to/from), some solutions by completion are proposed (not yey implemented) |
protected static boolean |
doAutoEntry
flag for auto-entry (when entering amount, other fields are completed with same value as latest similar transaction ) of transaction |
private boolean |
doBeanChanges
flag to enable/disable bean changes, this allows to init gui without resetting the bean warning: this could breaks the rules that what is on screen is really bean's values. |
private javax.swing.JLabel |
flagsLabel
|
java.awt.Component |
focusRoot
focus cycle root for this container , date editor |
private static java.util.ResourceBundle |
i18n
|
private javax.swing.JComboBox |
jComboCtg
|
private javax.swing.JComboBox |
jComboCtg2
|
private javax.swing.JLabel |
jLabelAmount
|
private javax.swing.JLabel |
jLabelCtg
|
private javax.swing.JLabel |
jLabelCtgSpecial
|
private javax.swing.JLabel |
jLabelDate
|
private javax.swing.JLabel |
jLabelDetails
|
private javax.swing.JTextArea |
jTextAreaDetails
|
protected java.beans.PropertyChangeSupport |
support
manager property listeners for this customizer |
protected Transaction |
txnBean
warning will stay null as long as setObject is not called |
| 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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
TransactionCustomizer()
Creates a new instance of TransactionCustomizer, without category |
|
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
add a listener to any changes on this customizer. |
private void |
amountEditorChange(java.beans.PropertyChangeEvent evt)
|
private void |
dateEditorChange(java.beans.PropertyChangeEvent evt)
|
protected void |
doAutoEntryFromAmount()
implement auto entry from amount may be overriden (should be) by all subclasses |
protected void |
doAutoEntryFromDirection()
implement auto entry from amount may be overriden (should be) by all subclasses |
Account |
getAccount()
Getter for property account. |
java.util.SortedMap |
getCategories()
Getter for property categories. |
Transaction |
getObject()
use carefully |
private void |
initComponents()
This method is called from within the constructor to initialize the form. |
private void |
initTexts()
|
protected boolean |
isAutoEntryFromAmountPossible()
may be overriden (should be) by all subclasses |
protected boolean |
isAutoEntryFromDirectionPossible()
may be overriden (should be) by all subclasses |
private void |
jComboCtg2ActionPerformed(java.awt.event.ActionEvent evt)
|
private void |
jComboCtg2FocusLost(java.awt.event.FocusEvent evt)
t means todays, +/-/up/down slides date,PageUp/Down slides month |
private void |
jComboCtgActionPerformed(java.awt.event.ActionEvent evt)
|
private void |
jComboCtgFocusLost(java.awt.event.FocusEvent evt)
|
private void |
jTextAreaDetailsFocusLost(java.awt.event.FocusEvent evt)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
Remove a PropertyChangeListener. |
protected void |
resetComponents()
if no bean, then reset all gui component to sort of null or empty value |
void |
setAccount(Account account)
Setter for property account. |
void |
setCategories(java.util.SortedMap categories)
Setter for property categories. |
protected void |
setCategoryEnable(boolean b)
disabled all category Combo |
protected void |
setCategoryPair(CategoryPair pair)
update customizer with this value of category pair if SPECIAL CATEGORY, hide combo and put a label [category] |
void |
setEnabledAll(boolean b)
enable or disable all components |
void |
setObject(java.lang.Object obj)
Associate a bean with this customizer. |
void |
updateDataModel(com.pjsofts.eurobudget.DataModel dm,
java.lang.Object arg)
synch with a data model change , try to keep selection ... |
void |
updateSubCategoriesList(Category main)
fill the list of sub categories; select none (and put txn sub cat to null!!) |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
categories
private java.util.SortedMap categories
- its own map of categories, given by the data model (see DataModel for format )
Used to update sub categories list
account
private Account account
- The account on which we are creating this transaction,
this is used only on complex transaction which need to know about it.
(Virement, Actions ...)
Also used by auto-entry ..
doBeanChanges
private boolean doBeanChanges
- flag to enable/disable bean changes, this allows to init gui without resetting the bean
warning: this could breaks the rules that what is on screen is really bean's values.
but in the same time protects bean data from side-effects and bugs from gui initialization...
support
protected java.beans.PropertyChangeSupport support
- manager property listeners for this customizer
txnBean
protected Transaction txnBean
- warning will stay null as long as setObject is not called
dateEditor
private com.pjsofts.beans.DateEditor dateEditor
- date editor
amountEditor
private com.pjsofts.beans.AmountEditor amountEditor
- amount editor
focusRoot
public java.awt.Component focusRoot
- focus cycle root for this container , date editor
doAutoEntry
protected static boolean doAutoEntry
- flag for auto-entry (when entering amount, other fields are completed with same value as latest similar transaction )
of transaction
doAutoCompletion
private static boolean doAutoCompletion
- flag for auto-completion of transaction :
when writting in some special field (to/from), some solutions by completion are proposed
(not yey implemented)
jLabelCtgSpecial
private javax.swing.JLabel jLabelCtgSpecial
jLabelDate
private javax.swing.JLabel jLabelDate
detailsScrollPane
private javax.swing.JScrollPane detailsScrollPane
jLabelDetails
private javax.swing.JLabel jLabelDetails
jLabelCtg
private javax.swing.JLabel jLabelCtg
jLabelAmount
private javax.swing.JLabel jLabelAmount
flagsLabel
private javax.swing.JLabel flagsLabel
jComboCtg2
private javax.swing.JComboBox jComboCtg2
ctgPanel
private javax.swing.JPanel ctgPanel
jComboCtg
private javax.swing.JComboBox jComboCtg
jTextAreaDetails
private javax.swing.JTextArea jTextAreaDetails
i18n
private static final java.util.ResourceBundle i18n
| Constructor Detail |
TransactionCustomizer
public TransactionCustomizer()
- Creates a new instance of TransactionCustomizer, without category
| Method Detail |
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
- add a listener to any changes on this customizer.
act as a proxy on the bean ..
Changes are fired when customizer changes a bean value.
the source object will be the customizer
- Specified by:
addPropertyChangeListenerin interfacejava.beans.Customizer
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
- Description copied from interface:
java.beans.Customizer - Remove a PropertyChangeListener.
- Specified by:
removePropertyChangeListenerin interfacejava.beans.Customizer
setObject
public void setObject(java.lang.Object obj)
- Associate a bean with this customizer.
must reinitialize all gui components even if bean variables are null
Enable/disable the customizer depending of transaction(virement,verified..).
Warning: side-effect, setting object to this customizer cause customizer to change this object value !!
(this allows to see quickly bugs on screen (value disappearing) and a lazy implementation, but is quite tricky)
Another implementation could call an initGuiField method that doesn't do & fire property change on bean (but this reclaims twice as more methods, or to remove action listeners before and readding them after)
- Specified by:
setObjectin interfacejava.beans.Customizer
resetComponents
protected void resetComponents()
- if no bean, then reset all gui component to sort of null or empty value
setCategoryPair
protected void setCategoryPair(CategoryPair pair)
- update customizer with this value of category pair
if SPECIAL CATEGORY, hide combo and put a label [category]
getObject
public Transaction getObject()
- use carefully
updateDataModel
public void updateDataModel(com.pjsofts.eurobudget.DataModel dm, java.lang.Object arg)
- synch with a data model change , try to keep selection ...
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()
jComboCtg2FocusLost
private void jComboCtg2FocusLost(java.awt.event.FocusEvent evt)
- t means todays, +/-/up/down slides date,PageUp/Down slides month
jTextAreaDetailsFocusLost
private void jTextAreaDetailsFocusLost(java.awt.event.FocusEvent evt)
dateEditorChange
private void dateEditorChange(java.beans.PropertyChangeEvent evt)
amountEditorChange
private void amountEditorChange(java.beans.PropertyChangeEvent evt)
isAutoEntryFromAmountPossible
protected boolean isAutoEntryFromAmountPossible()
- may be overriden (should be) by all subclasses
doAutoEntryFromAmount
protected void doAutoEntryFromAmount()
- implement auto entry from amount
may be overriden (should be) by all subclasses
isAutoEntryFromDirectionPossible
protected boolean isAutoEntryFromDirectionPossible()
- may be overriden (should be) by all subclasses
doAutoEntryFromDirection
protected void doAutoEntryFromDirection()
- implement auto entry from amount
may be overriden (should be) by all subclasses
jComboCtgFocusLost
private void jComboCtgFocusLost(java.awt.event.FocusEvent evt)
jComboCtg2ActionPerformed
private void jComboCtg2ActionPerformed(java.awt.event.ActionEvent evt)
jComboCtgActionPerformed
private void jComboCtgActionPerformed(java.awt.event.ActionEvent evt)
updateSubCategoriesList
public void updateSubCategoriesList(Category main)
- fill the list of sub categories; select none (and put txn sub cat to null!!)
getCategories
public java.util.SortedMap getCategories()
- Getter for property categories.
setCategories
public void setCategories(java.util.SortedMap categories)
- Setter for property categories.
getAccount
public Account getAccount()
- Getter for property account.
setAccount
public void setAccount(Account account)
- Setter for property account.
setEnabledAll
public void setEnabledAll(boolean b)
- enable or disable all components
setCategoryEnable
protected void setCategoryEnable(boolean b)
- disabled all category Combo
|
|||||||||
| Home >> All >> com >> pjsofts >> eurobudget >> [ beans overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC