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: 3051 $ Last update : $Date: 2010-11-29 15:57:16 +0100 (lun., 29 nov. 2010) $ By : $Author: echatellier $
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(TreePath path, Account account)
          Add account (path can be null).
 void addSubLedger(TreePath path, Account account)
          Add account (path can be null).
 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(TreePath path, 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(TreePath path,
                       Account account)
                throws LimaException
Add account (path can be null).

Parameters:
path -
account -
Throws:
LimaException

addSubLedger

public void addSubLedger(TreePath path,
                         Account account)
                  throws LimaException
Add account (path can be null).

Parameters:
path -
account -
Throws:
LimaException

updateAccount

public void updateAccount(TreePath path,
                          Account account)
                   throws LimaException
Update account.

Parameters:
path -
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.