org.jbudget.gui.month
Class DefaultTableColumnSorter
java.lang.Object
org.jbudget.gui.month.TableColumnSorter
org.jbudget.gui.month.DefaultTableColumnSorter
public class DefaultTableColumnSorter
- extends TableColumnSorter
- Author:
- petrov
|
Field Summary |
private org.jbudget.Core.Budget |
cachedBudget
|
private java.util.List<org.jbudget.Core.MoneyPit> |
sortedPits
|
|
Method Summary |
int |
getInsertionPoint(org.jbudget.Core.MoneyPit item,
java.util.List<org.jbudget.Core.MoneyPit> otherItems)
Returns the index of the a given MoneyPit that should be
inserted in a given list of items. |
static DefaultTableColumnSorter |
getInstance(Element element)
Creates a new DefaultTableColumnSorter instance using the information
provided in a given JDOM Element. |
Element |
getXmlElement()
Returns the XML Element representing the
DefaultTableColumnSorter. |
private void |
updateList(org.jbudget.Core.Budget newBudget)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cachedBudget
private org.jbudget.Core.Budget cachedBudget
sortedPits
private java.util.List<org.jbudget.Core.MoneyPit> sortedPits
DefaultTableColumnSorter
public DefaultTableColumnSorter()
getInsertionPoint
public int getInsertionPoint(org.jbudget.Core.MoneyPit item,
java.util.List<org.jbudget.Core.MoneyPit> otherItems)
- Description copied from class:
TableColumnSorter
- Returns the index of the a given
MoneyPit that should be
inserted in a given list of items.
- Specified by:
getInsertionPoint in class TableColumnSorter
- Parameters:
item - MoneyPit that corresponds to the colum that is inserted in
table.otherItems - The list of MoneyPit objects that
correspond to the columns that already exist in the table.
- Returns:
- the index of the new column.
updateList
private void updateList(org.jbudget.Core.Budget newBudget)
getXmlElement
public Element getXmlElement()
- Returns the XML Element representing the
DefaultTableColumnSorter.
- Specified by:
getXmlElement in class TableColumnSorter
getInstance
public static DefaultTableColumnSorter getInstance(Element element)
throws JDOMException
- Creates a new DefaultTableColumnSorter instance using the information
provided in a given JDOM Element.
- Throws:
JDOMException - if there are parsing errors or the element does
not contain all necessary information.