org.jbudget.gui.trans
Class TransactionEditor.TransferComponents

java.lang.Object
  extended by org.jbudget.gui.trans.TransactionEditor.TransferComponents
Enclosing class:
TransactionEditor

private class TransactionEditor.TransferComponents
extends java.lang.Object

Container class that stores the GUI components for rendering Transfers.


Field Summary
(package private)  org.jbudget.gui.components.TitledTextField amountField
           
(package private)  javax.swing.JComboBox fromSelector
           
private  java.awt.Color invalidEntryColor
          Color for highlighting invalid fields
(package private)  int mode
          Are we editing Transactions or Allocations?
(package private)  javax.swing.JComboBox toSelector
           
 
Constructor Summary
TransactionEditor.TransferComponents(int mode)
           
 
Method Summary
 boolean checkAmount()
          Check amount.
 org.jbudget.Core.Transaction.Transfer getTransfer()
           
 long readAmount()
          Reads information from the amount field.
 void setAmount(long amount, boolean update)
          Changes the amount for this transfer.
 void setBudget(org.jbudget.Core.Budget budget)
          Initializes the fromSelector and toSelector from a given budget.
 void setTransfer(org.jbudget.Core.Transaction.Transfer transfer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fromSelector

final javax.swing.JComboBox fromSelector

toSelector

final javax.swing.JComboBox toSelector

amountField

final org.jbudget.gui.components.TitledTextField amountField

mode

final int mode
Are we editing Transactions or Allocations?


invalidEntryColor

private java.awt.Color invalidEntryColor
Color for highlighting invalid fields

Constructor Detail

TransactionEditor.TransferComponents

public TransactionEditor.TransferComponents(int mode)
Method Detail

setBudget

public void setBudget(org.jbudget.Core.Budget budget)
Initializes the fromSelector and toSelector from a given budget. This method must be called before the getTransfer method is called.


setTransfer

public void setTransfer(org.jbudget.Core.Transaction.Transfer transfer)

getTransfer

public org.jbudget.Core.Transaction.Transfer getTransfer()
                                                  throws java.text.ParseException,
                                                         org.jbudget.exceptions.InvalidSrcDestEx
Throws:
java.text.ParseException
org.jbudget.exceptions.InvalidSrcDestEx

readAmount

public long readAmount()
                throws java.text.ParseException
Reads information from the amount field.

Throws:
java.text.ParseException

setAmount

public void setAmount(long amount,
                      boolean update)
Changes the amount for this transfer.


checkAmount

public boolean checkAmount()
Check amount.