org.chorem.lima.ui.account
Class AccountTreeTableModel

java.lang.Object
  extended by org.jdesktop.swingx.treetable.AbstractTreeTableModel
      extended by org.chorem.lima.ui.account.AccountTreeTableModel
All Implemented Interfaces:
TreeModel, org.jdesktop.swingx.treetable.TreeTableModel

public class AccountTreeTableModel
extends org.jdesktop.swingx.treetable.AbstractTreeTableModel

Tree table model for account edition.

Version:
$Revision: 3257 $ Last update : $Date: 2011-08-10 13:38:02 +0200 (Wed, 10 Aug 2011) $ By : $Author: vsalaun $
Author:
ore, chatellier

Field Summary
protected  AccountServiceMonitorable accountService
          Account service.
 
Fields inherited from class org.jdesktop.swingx.treetable.AbstractTreeTableModel
modelSupport, root
 
Constructor Summary
AccountTreeTableModel()
          Model constructor.
 
Method Summary
 void addAccount(Account parentAccount, Account account)
          Add account
 void addSubLedger(Account parentAccount, Account account)
          Add account
 Object getChild(Object parent, int index)
           
 int getChildCount(Object node)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
 int getIndexOfChild(Object parent, Object child)
           
 Object getValueAt(Object node, int column)
           
 boolean isCellEditable(Object node, int column)
           
 boolean isLeaf(Object node)
           
 void refreshTree()
          Refresh accountschart.
 void removeAccount(TreePath path, Account account)
          Remove account.
 void updateAccount(Account account)
          Update account.
 
Methods inherited from class org.jdesktop.swingx.treetable.AbstractTreeTableModel
addTreeModelListener, getColumnClass, getHierarchicalColumn, getRoot, getTreeModelListeners, removeTreeModelListener, setValueAt, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

accountService

protected final AccountServiceMonitorable accountService
Account service.

Constructor Detail

AccountTreeTableModel

public AccountTreeTableModel()
Model constructor. Init account service used here.

Method Detail

getColumnCount

public int getColumnCount()

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface org.jdesktop.swingx.treetable.TreeTableModel
Overrides:
getColumnName in class org.jdesktop.swingx.treetable.AbstractTreeTableModel

getChildCount

public int getChildCount(Object node)

getChild

public Object getChild(Object parent,
                       int index)

getIndexOfChild

public int getIndexOfChild(Object parent,
                           Object child)

getValueAt

public Object getValueAt(Object node,
                         int column)

isCellEditable

public boolean isCellEditable(Object node,
                              int column)
Specified by:
isCellEditable in interface org.jdesktop.swingx.treetable.TreeTableModel
Overrides:
isCellEditable in class org.jdesktop.swingx.treetable.AbstractTreeTableModel

isLeaf

public boolean isLeaf(Object node)
Specified by:
isLeaf in interface TreeModel
Overrides:
isLeaf in class org.jdesktop.swingx.treetable.AbstractTreeTableModel

addAccount

public void addAccount(Account parentAccount,
                       Account account)
                throws LimaException
Add account

Parameters:
parentAccount -
account -
Throws:
LimaException

addSubLedger

public void addSubLedger(Account parentAccount,
                         Account account)
                  throws LimaException
Add account

Parameters:
parentAccount -
account -
Throws:
LimaException

updateAccount

public void updateAccount(Account account)
                   throws LimaException
Update account.

Parameters:
account -
Throws:
LimaException

refreshTree

public void refreshTree()
                 throws LimaException
Refresh accountschart.

Throws:
LimaException

removeAccount

public void removeAccount(TreePath path,
                          Account account)
                   throws LimaException
Remove account.

Parameters:
path -
account -
Throws:
LimaException


Copyright © 2008-2011 CodeLutin. All Rights Reserved.