jgnash.ui.components
Class AutoCompleteFactory.PayeeModel

java.lang.Object
  extended by jgnash.ui.components.autocomplete.DefaultAutoCompleteModel
      extended by jgnash.ui.components.AutoCompleteFactory.TransactionModel
          extended by jgnash.ui.components.AutoCompleteFactory.PayeeModel
All Implemented Interfaces:
MessageListener, AutoCompleteModel
Direct Known Subclasses:
AutoCompleteFactory.MemoModel, AutoCompleteFactory.PayeeAccountModel
Enclosing class:
AutoCompleteFactory

private static class AutoCompleteFactory.PayeeModel
extends AutoCompleteFactory.TransactionModel

This model stores the transaction with the payee field value. Split entries are filtered for now because duplicating one in a form would produce would only impact the parent split transaction.


Field Summary
(package private)  MultiHashMap<java.lang.String,Transaction> transactions
           
 
Fields inherited from class jgnash.ui.components.AutoCompleteFactory.TransactionModel
load
 
Constructor Summary
private AutoCompleteFactory.PayeeModel()
           
 
Method Summary
 java.lang.Object getExtraInfo(java.lang.String key)
          Returns extra information that might be stored with a found string returned by doLookAhead().
(package private)  void load(Transaction tran)
           
 void messagePosted(Message event)
           
(package private)  void removeExtraInfo(Transaction t)
          Removes the transaction associated with the payee.
 
Methods inherited from class jgnash.ui.components.AutoCompleteFactory.TransactionModel
load
 
Methods inherited from class jgnash.ui.components.autocomplete.DefaultAutoCompleteModel
addString, doLookAhead, purge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transactions

MultiHashMap<java.lang.String,Transaction> transactions
Constructor Detail

AutoCompleteFactory.PayeeModel

private AutoCompleteFactory.PayeeModel()
Method Detail

load

void load(Transaction tran)
Specified by:
load in class AutoCompleteFactory.TransactionModel

getExtraInfo

public java.lang.Object getExtraInfo(java.lang.String key)
Description copied from class: DefaultAutoCompleteModel
Returns extra information that might be stored with a found string returned by doLookAhead(). This information can be used to populate other fields based on matching the string key.

Specified by:
getExtraInfo in interface AutoCompleteModel
Overrides:
getExtraInfo in class DefaultAutoCompleteModel
Parameters:
key - The string key most likely returned from doLookAhead()
Returns:
null

removeExtraInfo

void removeExtraInfo(Transaction t)
Removes the transaction associated with the payee. This is done so that deleted transactions can be garbage collected.

Parameters:
t - transaction to remove

messagePosted

public void messagePosted(Message event)
Specified by:
messagePosted in interface MessageListener
Overrides:
messagePosted in class AutoCompleteFactory.TransactionModel