jgnash.ui.components
Class AccountListComboBox.AbstractModel
java.lang.Object
javax.swing.AbstractListModel
jgnash.ui.components.AccountListComboBox.AbstractModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.ComboBoxModel, javax.swing.ListModel
- Direct Known Subclasses:
- AccountListComboBox.AccountTypeModel, AccountListComboBox.ChildrenModel, AccountListComboBox.ChildrenTypeModel, AccountListComboBox.DefaultModel, AccountListComboBox.FullModel, AccountListComboBox.ParentTypeModel, FilteredAccountListComboBox.FilteredModel
- Enclosing class:
- AccountListComboBox
protected abstract static class AccountListComboBox.AbstractModel
- extends javax.swing.AbstractListModel
- implements javax.swing.ComboBoxModel
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.AbstractListModel |
listenerList |
| Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.ListModel |
addListDataListener, removeListDataListener |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
accounts
java.util.List<Account> accounts
baseAccount
Account baseAccount
selectedItem
java.lang.Object selectedItem
types
java.util.Set<AccountType> types
lock
private final java.lang.Object lock
AccountListComboBox.AbstractModel
public AccountListComboBox.AbstractModel()
AccountListComboBox.AbstractModel
public AccountListComboBox.AbstractModel(Account exclude,
java.util.Set<AccountType> types)
AccountListComboBox.AbstractModel
public AccountListComboBox.AbstractModel(Account exclude)
loadAccounts
protected void loadAccounts()
loadChildren
protected abstract void loadChildren(Account acc,
java.util.List<Account> array)
getElementAt
public java.lang.Object getElementAt(int index)
- Returns the value at the specified index.
- Specified by:
getElementAt in interface javax.swing.ListModel
- Parameters:
index - the requested index
- Returns:
- the value at
index
getSelectedItem
public java.lang.Object getSelectedItem()
- Returns the selected item
- Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel
- Returns:
- The selected item or
null if there is no selection
getSize
public int getSize()
- Returns the length of the list.
- Specified by:
getSize in interface javax.swing.ListModel
- Returns:
- the length of the list
setSelectedItem
public void setSelectedItem(java.lang.Object anItem)
- Set the selected item. The implementation of this method should notify all registered
ListDataListeners that the contents have changed.
- Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel
- Parameters:
anItem - the list object to select or null to clear the selection
clear
private void clear()
messagePosted
public void messagePosted(Message event)