r3353 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-business/src/main/java/org/chorem/lima/business/ejbinterface lima-swing/src/main/java/org/chorem/lima lima-swing/src/main/java/org/chorem/lima/ui lima-swing/src/main/java/org/chorem/lima/ui/account lima-swing/src/main/java/org/chorem/lima/ui/entrybook lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart lima-swing/src/main/java/org/chorem/lima/ui/importexport lima-swing/src/main/java/org/chorem/lima
Author: echatellier Date: 2012-04-05 12:58:58 +0200 (Thu, 05 Apr 2012) New Revision: 3353 Url: http://chorem.org/repositories/revision/lima/3353 Log: Add add/update/delete account code Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableModel.java Removed: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTable.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateSubLedgerForm.jaxx Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java trunk/lima-swing/src/main/java/org/chorem/lima/LimaContext.java trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountImportForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableRenderer.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateAccountForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties trunk/lima-swing/src/main/resources/log4j.properties Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -84,9 +84,11 @@ * Create new account with existing transaction. */ @Override - public void createAccountWithTransaction(Account account, + public Account createAccountWithTransaction(Account account, TopiaContext topiaContext) throws LimaException { + Account result = null; + try { // force uppercase account number account.setAccountNumber(account.getAccountNumber().toUpperCase()); @@ -104,12 +106,14 @@ } //create it - accountDAO.create(account); + result = accountDAO.create(account); commitTransaction(topiaContext); } catch (TopiaException ex) { doCatch(topiaContext, ex); } + + return result; } @@ -123,12 +127,13 @@ * @throws LimaException */ @Override - public void createAccount(Account account) throws LimaException { + public Account createAccount(Account account) throws LimaException { // check rules before create the account AccountingRules accountingRules = LimaConfig.getInstance().getAccountingRules(); accountingRules.createAccountRules(account); + Account result = null; TopiaContext transaction = beginTransaction(rootContext); try { @@ -142,12 +147,13 @@ account.getAccountNumber())); } - createAccountWithTransaction(account, transaction); + result = createAccountWithTransaction(account, transaction); } catch (Exception ex) { doCatch(transaction, ex); } finally { doFinally(transaction); } + return result; } /** Permer d'obtenir la liste des comptes à partir d'une de ses propriétés */ @@ -309,15 +315,9 @@ /** Get list of all subaccount and ledger of an account */ @Override - public List<Account> getAllChildrenAccounts(Account masterAccount, - List<Account> accounts) throws LimaException { + public List<Account> getAllChildrenAccounts(Account masterAccount) throws LimaException { - List<Account> childAccounts = getChildrenAccounts(masterAccount); - accounts.addAll(childAccounts); - for (Account account : childAccounts) { - getAllChildrenAccounts(account, accounts); - } - return accounts; + return null; } /** @@ -335,32 +335,16 @@ AccountingRules accountingRules = LimaConfig.getInstance().getAccountingRules(); try { - AccountDAO accountDAO = - LimaCallaoDAOHelper.getAccountDAO(transaction); // Check rules for account if have entries accountingRules.removeAccountRules(account, transaction); // remove account + AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(transaction); Account accountToDelete = accountDAO.findByTopiaId(account.getTopiaId()); - - //get all subaccounts - List<Account> accounts = - getAllChildrenAccounts(accountToDelete, new ArrayList<Account>()); - //if account have sub accounts - if (accounts.size() > 0) { - for (Account subAccount : accounts) { - // Check rules for subaccount if have entries - accountingRules.removeAccountRules(subAccount, transaction); - Account subAccountToDelete = - accountDAO.findByTopiaId(subAccount.getTopiaId()); - accountDAO.delete(subAccountToDelete); - } - } - accountDAO.delete(accountToDelete); - //commit commitTransaction(transaction); + } catch (Exception ex) { doCatch(transaction, ex); } finally { @@ -378,7 +362,7 @@ /** - * Permet de modifier un compte sur son label et son compte père. + * Permet de modifier un compte sur son label. * <p/> * Il n'est pas possible de modifier un numéro de compte. * Si le compte n'existe pas, il envoie alors un message d'avertissement. @@ -387,23 +371,25 @@ * @throws LimaException */ @Override - public void updateAccount(Account account) throws LimaException { + public Account updateAccount(Account account) throws LimaException { TopiaContext transaction = beginTransaction(rootContext); AccountingRules accountingRules = LimaConfig.getInstance().getAccountingRules(); + Account result = null; try { // DAO AccountDAO accountDAO = LimaCallaoDAOHelper.getAccountDAO(transaction); - Account subAccount = accountDAO.findByTopiaId(account.getTopiaId()); accountingRules.updateAccountRules(account); - accountDAO.update(subAccount); + result = accountDAO.update(account); commitTransaction(transaction); } catch (Exception ex) { doCatch(transaction, ex); } finally { doFinally(transaction); } + + return result; } } \ No newline at end of file Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -83,20 +83,18 @@ * Create new account. If {@code masterAccount} is not null, {@code account} * is added in {@code masterAccount}'s subAccounts. * - * @param masterAccount master account (can be null) * @param account account * @throws LimaException */ - void createAccount(Account account) throws LimaException; + Account createAccount(Account account) throws LimaException; - void updateAccount(Account account) throws LimaException; + Account updateAccount(Account account) throws LimaException; void removeAccount(Account account) throws LimaException; void removeAllAccount() throws LimaException; - List<Account> getAllChildrenAccounts(Account masterAccount, - List<Account> accounts) throws LimaException; + List<Account> getAllChildrenAccounts(Account masterAccount) throws LimaException; List<Account> getChildrenAccounts(Account masterAccount) throws LimaException; } Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -43,6 +43,6 @@ @Local public interface AccountServiceLocal extends AccountService { - void createAccountWithTransaction(Account account, TopiaContext topiaContext) throws LimaException; + Account createAccountWithTransaction(Account account, TopiaContext topiaContext) throws LimaException; } \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaContext.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/LimaContext.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaContext.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -5,7 +5,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2008 - 2010 CodeLutin + * Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as @@ -25,9 +25,12 @@ package org.chorem.lima; +import java.util.Locale; + import jaxx.runtime.JAXXUtil; import jaxx.runtime.context.DefaultApplicationContext; import jaxx.runtime.context.JAXXContextEntryDef; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.ui.LimaDecoratorProvider; @@ -35,15 +38,10 @@ import org.chorem.lima.ui.MainViewHandler; import org.nuiton.i18n.I18n; import org.nuiton.i18n.init.DefaultI18nInitializer; -import org.nuiton.i18n.init.UserI18nInitializer; -import org.nuiton.util.FileUtil; +import org.nuiton.i18n.init.I18nInitializer; import org.nuiton.util.StringUtil; import org.nuiton.util.decorator.DecoratorProvider; -import java.io.File; -import java.io.IOException; -import java.util.Locale; - /** @author chemit */ public class LimaContext extends DefaultApplicationContext { @@ -116,34 +114,13 @@ I18n.close(); - File i18nDirectory = config.getI18nDirectory(); - - if (log.isInfoEnabled()) { - log.info("I18n directory : " + i18nDirectory); - } - try { - //create directory to store i18n files - FileUtil.createDirectoryIfNecessary(i18nDirectory); - } catch (IOException eee) { - throw new RuntimeException( - "Could not create directory " + - i18nDirectory.getParentFile(), eee); - } - UserI18nInitializer i18nInitializer = - new UserI18nInitializer( - i18nDirectory, - new DefaultI18nInitializer("lima") - ); - + I18nInitializer i18nInitializer = new DefaultI18nInitializer("lima"); Locale locale = config.getLocale(); - I18n.init(i18nInitializer, locale); // Default Locale for DatePicker Locale.setDefault(locale); - getDecoratorProvider().reload(); - long t00 = System.nanoTime(); if (log.isDebugEnabled()) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -31,7 +31,6 @@ import org.chorem.lima.business.ejbinterface.AccountService; import org.chorem.lima.business.monitorable.AccountServiceMonitorable; import org.chorem.lima.business.monitorable.HttpServerServiceMonitorable; -import org.chorem.lima.entity.Account; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.MainView; import org.chorem.lima.ui.MainViewHandler; @@ -41,7 +40,6 @@ import javax.swing.SwingUtilities; import java.util.Arrays; import java.util.Date; -import java.util.List; import static org.nuiton.i18n.I18n._; @@ -115,17 +113,19 @@ // see if this can be dangerous (should not be since jnlp is signed ?) // moreover it speeds up the loading :) System.setSecurityManager(null); - Runtime.getRuntime().addShutdownHook(new ShutdownHook()); // init root context LimaContext context = LimaContext.init(); LimaConfig config = context.getConfig(); config.parse(args); - - LimaServiceFactory.initFactory(config); context.initI18n(config); + return context; + } + + protected static void launch(LimaContext context) throws Exception { + // prepare ui look&feel and load ui properties try { SwingUtil.initNimbusLoookAndFeel(); @@ -135,13 +135,10 @@ log.warn(_("lima.warning.nimbus.landf")); } } - return context; - } - protected static void launch(LimaContext context) throws Exception { - splash.drawVersion(config.getVersion()); splash.updateProgression(0.1, _("lima.splash.1")); + LimaServiceFactory.initFactory(config); // do init ui MainViewHandler uiHandler = context.getContextValue(MainViewHandler.class); @@ -182,17 +179,6 @@ }); } - /*protected static void saveTraces(File file) { - String stats = NuitonTrace.getStatisticsCSVAndClear(); - try { - FileUtil.writeString(file, stats, "utf-8"); - } catch (IOException e) { - if (log.isErrorEnabled()) { - log.error("Could not save traces to file " + file, e); - } - } - }*/ - public static class ShutdownHook extends Thread { public ShutdownHook() { @@ -202,14 +188,6 @@ @Override public void run() { try { - super.run(); - /*File file = new File("lima-trace.csv"); - saveTraces(file); - String stats = NuitonTrace.getStatisticsCSVAndClear(); - if (log.isInfoEnabled()) { - log.info(stats); - }*/ - LimaContext.get().close(); LimaServiceFactory.destroy(); // force to kill main thread Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -458,7 +458,7 @@ public void showImportExportView(JAXXContext rootContext, ImportExportEnum type) { MainView mainView = getUI(rootContext); - ImportExport importExport = ImportExport.getInstance(mainView); + ImportExport importExport = new ImportExport(mainView); importExport.importExport(type, "", true); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx 2012-04-05 10:58:58 UTC (rev 3353) @@ -5,7 +5,7 @@ $Id$ $HeadURL$ %% - Copyright (C) 2008 - 2010 CodeLutin + Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -23,28 +23,21 @@ #L% --> -<JDialog modal="true" defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" - onWindowClosing="dispose()"> +<JDialog title="lima.ui.account.addaccounttitle" modal="true" + defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="dispose()"> <import> javax.swing.text.Document org.chorem.lima.entity.Account </import> - <AccountViewHandler id='handler' - initializer='getContextValue(AccountView.class,JAXXUtil.PARENT).getHandler()'/> + <AccountViewHandler id='handler' initializer='getContextValue(AccountView.class,JAXXUtil.PARENT).getHandler()'/> - <Account id="account" javaBean='null'/> + <Account id="account" javaBean='new org.chorem.lima.entity.AccountImpl()'/> <script> <![CDATA[ getRootPane().setDefaultButton(ok); - - @Override - public void dispose() { - setAccount(null); - super.dispose(); - } ]]> </script> @@ -78,7 +71,7 @@ <JPanel layout='{new GridLayout(1,0)}'> <JButton text="lima.common.cancel" onActionPerformed="dispose()"/> <JButton id="ok" text="lima.common.ok" - onActionPerformed="handler.doAddAccount(this)"/> + onActionPerformed="handler.addAccount(this)"/> </JPanel> </cell> </row> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountImportForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountImportForm.jaxx 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountImportForm.jaxx 2012-04-05 10:58:58 UTC (rev 3353) @@ -5,7 +5,7 @@ $Id$ $HeadURL$ %% - Copyright (C) 2008 - 2010 CodeLutin + Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -28,18 +28,17 @@ onWindowClosing="performCancel();"> <import> - jaxx.runtime.swing.JAXXButtonGroup org.chorem.lima.enums.AccountsChartEnum </import> - <JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/> - <Boolean id="addState" javaBean='true'/> + <javax.swing.ButtonGroup id="buttonGroup" /> + <Boolean id="addState" javaBean='true' /> <script> <![CDATA[ getRootPane().setDefaultButton(ok); protected void performCancel() { - getRadioButtons().setSelectedValue(null); + buttonGroup.setSelectedValue(null); dispose(); } ]]> @@ -53,41 +52,41 @@ </row> <row> <cell> - <JRadioButton text='lima.charts.account.shortened' + <JRadioButton text='lima.ui.account.shortened' value='{AccountsChartEnum.SHORTENED}' - buttonGroup="{getRadioButtons()}" + buttonGroup="{buttonGroup}" selected='true'/> </cell> </row> <row> <cell> - <JRadioButton text='lima.charts.account.base' + <JRadioButton text='lima.ui.account.base' value='{AccountsChartEnum.BASE}' - buttonGroup="{getRadioButtons()}" + buttonGroup="{buttonGroup}" selected='true'/> </cell> </row> <row> <cell> - <JRadioButton text='lima.charts.account.developed' + <JRadioButton text='lima.ui.account.developed' value='{AccountsChartEnum.DEVELOPED}' - buttonGroup="{getRadioButtons()}" + buttonGroup="{buttonGroup}" selected='true'/> </cell> </row> <row> <cell> - <JRadioButton text='lima.importexport.importcsv' + <JRadioButton text='lima.ui.importexport.importcsv' value='{AccountsChartEnum.IMPORT}' - buttonGroup="{getRadioButtons()}" + buttonGroup="{buttonGroup}" selected='true'/> </cell> </row> <row> <cell> - <JRadioButton text='lima.importexport.importebp' + <JRadioButton text='lima.ui.importexport.importebp' value='{AccountsChartEnum.IMPORTEBP}' - buttonGroup="{getRadioButtons()}" + buttonGroup="{buttonGroup}" selected='true'/> </cell> </row> @@ -96,11 +95,11 @@ <Table> <row> <cell fill="none"> - <JButton text="lima.common.cancel" + <JButton text="lima.ui.common.cancel" onActionPerformed="performCancel()"/> </cell> <cell fill="none"> - <JButton id="ok" text="lima.common.ok" + <JButton id="ok" text="lima.ui.common.ok" onActionPerformed="dispose()"/> </cell> </row> Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTable.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTable.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTable.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -1,103 +0,0 @@ -/* - * #%L - * Lima :: Swing - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2008 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ -package org.chorem.lima.ui.account; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.jdesktop.swingx.JXTreeTable; - -import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; - -@Deprecated -public class AccountTreeTable extends JXTreeTable - implements KeyListener, MouseListener { - - /** serialVersionUID. */ - private static final long serialVersionUID = 1092873442245932784L; - - /** log. */ - private static final Log log = LogFactory - .getLog(AccountTreeTable.class); - - protected AccountViewHandler handler; - - public AccountTreeTable(AccountViewHandler handler) { - - this.handler = handler; - - addKeyListener(this); - addMouseListener(this); - - } - - @Override - public void mouseClicked(MouseEvent e) { - } - - @Override - public void mousePressed(MouseEvent e) { - if (rowAtPoint(e.getPoint()) == -1) { - clearSelection(); - } - } - - @Override - public void mouseReleased(MouseEvent e) { - } - - @Override - public void mouseEntered(MouseEvent e) { - } - - @Override - public void mouseExited(MouseEvent e) { - } - - @Override - public void keyTyped(KeyEvent e) { - } - - /** - * for each action combination key are think - * for extend keyboard and laptop keyboard - */ - @Override - public void keyPressed(KeyEvent e) { - // clear row selection with the key: escape - if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { - if (!isEditing()) { - clearSelection(); - } - } - } - - @Override - public void keyReleased(KeyEvent e) { - } - -} Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableModel.java (rev 0) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableModel.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -0,0 +1,67 @@ +/* + * #%L + * + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 Codelutin, Chatellier Eric + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +package org.chorem.lima.ui.account; + +import org.chorem.lima.entity.Account; +import org.jdesktop.swingx.treetable.DefaultTreeTableModel; +import org.jdesktop.swingx.treetable.MutableTreeTableNode; +import org.jdesktop.swingx.treetable.TreeTableNode; + +/** + * Account tree table model redefining get value at for column. + * + * @author chatellier + * @version $Revision$ + * + * Last update : $Date$ + * By : $Author$ + */ +public class AccountTreeTableModel extends DefaultTreeTableModel { + + /** + * Creates a new {@code DefaultTreeTableModel} with the specified + * {@code root}. + * + * @param root the root node of the tree + */ + public AccountTreeTableModel(TreeTableNode root) { + super(root); + } + + @Override + public Object getValueAt(Object node, int column) { + MutableTreeTableNode treenode = (MutableTreeTableNode)node; + Account account = (Account)treenode.getUserObject(); + + Object result = null; + if (account != null && column == 1) { + result = account.getLabel(); + } + + return result; + } + +} Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableModel.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableRenderer.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableRenderer.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableRenderer.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -28,9 +28,9 @@ import java.awt.Component; import javax.swing.JTree; +import javax.swing.tree.DefaultTreeCellRenderer; import org.chorem.lima.entity.Account; -import org.jdesktop.swingx.renderer.DefaultTreeRenderer; import org.jdesktop.swingx.treetable.MutableTreeTableNode; /** @@ -42,7 +42,7 @@ * Last update : $Date$ * By : $Author$ */ -public class AccountTreeTableRenderer extends DefaultTreeRenderer { +public class AccountTreeTableRenderer extends DefaultTreeCellRenderer { /** serialVersionUID. */ private static final long serialVersionUID = -3249368726501873583L; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2012-04-05 10:58:58 UTC (rev 3353) @@ -46,40 +46,34 @@ <JXTreeTable id="accountsTreeTable" selectionMode="{ListSelectionModel.SINGLE_SELECTION}" treeCellRenderer="{new AccountTreeTableRenderer()}" - highlighters="{HighlighterFactory.createSimpleStriping(new java.awt.Color(222,222,222))}"/> + highlighters="{HighlighterFactory.createSimpleStriping(new java.awt.Color(233,233,233))}"/> <ListSelectionModel initializer='accountsTreeTable.getSelectionModel()' onValueChanged="setSelectedRow(accountsTreeTable.getSelectedRow() != -1)"/> </JScrollPane> </cell> <cell fill="horizontal"> - <JButton id="addButton" text="lima.charts.account.addAccount" - onActionPerformed="handler.launchAddAccountForm()"/> + <JButton id="addButton" text="lima.ui.account.addAccount" + onActionPerformed="handler.addAccount()"/> </cell> </row> <row> <cell fill="horizontal"> - <JButton id="addSubLedger" text="lima.charts.account.addSubLedger" - onActionPerformed="/*handler.launchAddSubLedgerForm()*/"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="updateButton" text="lima.common.update" - onActionPerformed="handler.launchUpdateAccountForm()" + <JButton id="updateButton" text="lima.ui.common.update" + onActionPerformed="handler.updateAccount()" enabled="{isSelectedRow()}"/> </cell> </row> <row> <cell fill="horizontal"> - <JButton id="removeButton" text="lima.common.remove" - onActionPerformed="handler.doRemoveAccount()" + <JButton id="removeButton" text="lima.ui.common.remove" + onActionPerformed="handler.removeAccount()" enabled="{isSelectedRow()}"/> </cell> </row> <row> <cell fill="horizontal"> - <JButton id="importButton" text="lima.importexport.import" - onActionPerformed="handler.doImportAccountsChart()"/> + <JButton id="importButton" text="lima.iu.importexport.import" + onActionPerformed="handler.importAccountsChart()"/> </cell> </row> </Table> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -31,6 +31,7 @@ import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; @@ -52,15 +53,14 @@ import org.chorem.lima.business.monitorable.AccountServiceMonitorable; import org.chorem.lima.business.monitorable.ImportServiceMonitorable; import org.chorem.lima.entity.Account; -import org.chorem.lima.entity.AccountImpl; import org.chorem.lima.enums.AccountsChartEnum; import org.chorem.lima.enums.ImportExportEnum; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.importexport.ImportExport; -import org.chorem.lima.util.ErrorHelper; import org.jdesktop.swingx.JXTreeTable; import org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode; import org.jdesktop.swingx.treetable.DefaultTreeTableModel; +import org.jdesktop.swingx.treetable.MutableTreeTableNode; import org.jdesktop.swingx.treetable.TreeTableNode; /** @@ -94,6 +94,9 @@ return result; } }; + /** + * Sort Account number by lenght in reverse order. + */ protected static Comparator<String> reverseAccountLengthComparator = new Comparator<String>() { @Override public int compare(String o1, String o2) { @@ -104,7 +107,7 @@ return result; } }; - + public AccountViewHandler(AccountView view) { this.view = view; // Gets factory service @@ -112,6 +115,9 @@ accountService = LimaServiceFactory.getService(AccountServiceMonitorable.class); } + /** + * Init initialized view by loading account data from service. + */ public void init() { JXTreeTable table = view.getAccountsTreeTable(); table.addKeyListener(new KeyAdapter() { @@ -151,6 +157,9 @@ // default data load List<Account> accounts = accountService.getAllAccounts(); Collections.sort(accounts, accountLengthComparator); + if (log.isDebugEnabled()) { + log.debug(String.format("Loaded %d accounts from service", accounts.size())); + } // render in tree node hierarchy for DefaultTreeTableModel SortedMap<String, DefaultMutableTreeTableNode> nodeCache = new TreeMap<String, DefaultMutableTreeTableNode>(reverseAccountLengthComparator); @@ -174,9 +183,10 @@ nodeCache.put(account.getAccountNumber(), node); } - DefaultTreeTableModel model = new DefaultTreeTableModel(root); - model.setColumnIdentifiers(Arrays.asList(_("lima.table.number"), - _("lima.table.label"))); + + // refreshing tree's model + DefaultTreeTableModel model = new AccountTreeTableModel(root); + model.setColumnIdentifiers(Arrays.asList(_("lima.table.number"), _("lima.table.label"))); JXTreeTable table = view.getAccountsTreeTable(); table.setTreeTableModel(model); } catch (LimaException ex) { @@ -184,25 +194,11 @@ } } - public void launchAddAccountForm() { - Account newAccount = new AccountImpl(); - AccountForm accountForm = new AccountForm(view); - accountForm.setAccount(newAccount); - // jaxx constructor don't call super() ? - accountForm.setLocationRelativeTo(view); - accountForm.setVisible(true); - } - /** - * Open update account (or subledger) form with selected account - * from the tree. + * Display add account view */ - public void launchUpdateAccountForm() { - Account selectedObject = getSelectedAccount(); - - UpdateAccountForm accountForm = new UpdateAccountForm(view); - accountForm.setAccount(selectedObject); - // jaxx constructor don't call super() ? + public void addAccount() { + AccountForm accountForm = new AccountForm(view); accountForm.setLocationRelativeTo(view); accountForm.setVisible(true); } @@ -212,115 +208,121 @@ * * @param dialog the account form */ - public void doAddAccount(AccountForm dialog) { + public void addAccount(AccountForm dialog) { try { + Account newAccount = dialog.getAccount(); + newAccount = accountService.createAccount(newAccount); - Account masterAccount = null; + // update tree + JXTreeTable treeTable = view.getAccountsTreeTable(); + DefaultTreeTableModel model = (DefaultTreeTableModel)treeTable.getTreeTableModel(); + DefaultMutableTreeTableNode node = (DefaultMutableTreeTableNode)findParentNode(model.getRoot(), newAccount.getAccountNumber()); + DefaultMutableTreeTableNode newNode = new DefaultMutableTreeTableNode(newAccount); - if (newAccount.getAccountNumber().length() > 1) { - - // a master account is required - masterAccount = getMasterAccount(newAccount); - - if (masterAccount == null) { - - // bye-bye :( - return; - } + List<MutableTreeTableNode> nodesToMove = findSubNodes(node, newAccount.getAccountNumber()); + for (MutableTreeTableNode nodeToMove : nodesToMove) { + model.removeNodeFromParent((MutableTreeTableNode)nodeToMove); + newNode.add(nodeToMove); } - // add it - /*try { - getTreeTableModel().addAccount(masterAccount, newAccount); - } catch (LimaException ex) { - if (log.isErrorEnabled()) { - log.error("Can't add account", ex); - } - ErrorHelper.showErrorDialog(view, _("lima.account.addaccounterror"), ex); - }*/ + model.insertNodeInto(newNode, node, node.getChildCount()); + treeTable.expandPath(new TreePath(model.getPathToRoot(node))); + } catch (LimaException ex) { + throw new LimaRuntimeException("Can't add account", ex); } finally { dialog.dispose(); } } - /*public void doAddSubLedger(SubLedgerForm dialog) { + /** + * Find potential parent node for account number. + * + * @param currentNode node + * @param accountNumber node label to search parent + * @return found parent (can't be null) + */ + protected TreeTableNode findParentNode(TreeTableNode currentNode, + String accountNumber) { - try { - Account newAccount = dialog.getAccount(); + TreeTableNode result = null; + Account account = (Account)currentNode.getUserObject(); - Account masterAccount = null; - - if (newAccount.getAccountNumber().length() > 1) { - - // a master account is required - masterAccount = getMasterAccount(newAccount); - - if (masterAccount == null) { - - // bye-bye :( - return; - } + if (account == null || accountNumber.startsWith(account.getAccountNumber())) { + for (int childIndex = 0; childIndex < currentNode.getChildCount() && result == null; childIndex++) { + TreeTableNode child = currentNode.getChildAt(childIndex); + result = findParentNode(child, accountNumber); } - // add it - try { - getTreeTableModel().addSubLedger(masterAccount, newAccount); - } catch (LimaException eee) { - if (log.isErrorEnabled()) { - log.error("Can't add subledger", eee); - } - ErrorHelper.showErrorDialog(view, "Can't add subledger", eee); + if (result == null) { + result = currentNode; } - } finally { - dialog.dispose(); } - }*/ - public void doUpdateAccount(UpdateAccountForm dialog) { + return result; + } - Account account = dialog.getAccount(); - - /*String newMasterAccountNumber = - dialog.getMasterAccountTextField().getText(); - String newLabel = dialog.getDescriptionTextField().getText(); - - boolean hasChanged = - updateMasterAccount(account, newMasterAccountNumber); - hasChanged |= updateLabel(account, newLabel);*/ - - try { - //if (hasChanged) { - - // can update account - updateAccount(account); - //} - - } finally { - - // close dialog - dialog.dispose(); + /** + * Find all subnodes in currentNode with account label starting with accountNumber. + * + * @param currentNode currentNode to search into + * @param accountNumber accountNumber number to search + * @return node list + */ + protected List<MutableTreeTableNode> findSubNodes(TreeTableNode currentNode, String accountNumber) { + List<MutableTreeTableNode> nodes = new ArrayList<MutableTreeTableNode>(); + for (int childIndex = 0; childIndex < currentNode.getChildCount(); childIndex++) { + MutableTreeTableNode child = (MutableTreeTableNode)currentNode.getChildAt(childIndex); + Account account = (Account)child.getUserObject(); + if (account.getAccountNumber().startsWith(accountNumber)) { + nodes.add(child); + } } + return nodes; } - public void doUpdateSubLedger(UpdateSubLedgerForm dialog) { + /** + * Open update account (or subledger) form with selected account + * from the tree. + */ + public void updateAccount() { + JXTreeTable treeTable = view.getAccountsTreeTable(); - Account account = dialog.getAccount(); + // get selected account + int selectedRow = treeTable.getSelectedRow(); + TreePath treePath = treeTable.getPathForRow(selectedRow); + TreeTableNode lastPathComponent = (TreeTableNode) treePath.getLastPathComponent(); + Account selectedAccount = (Account)lastPathComponent.getUserObject(); - /*String newMasterAccountNumber = - dialog.getMasterAccountTextField().getText(); - String newLabel = dialog.getDescriptionTextField().getText(); - String newThirdParty = dialog.getThirdPartyTextField().getText(); + // display edit form + UpdateAccountForm accountForm = new UpdateAccountForm(view); + accountForm.setAccount(selectedAccount); + accountForm.setLocationRelativeTo(view); + accountForm.setVisible(true); + } - boolean hasChanged = updateMasterAccount(account, - newMasterAccountNumber); - hasChanged |= updateLabel(account, newLabel); - hasChanged |= updateThirdParty(account, newThirdParty);*/ + /** + * Perform update account to service. + * + * @param dialog dialog containing account + */ + public void updateAccount(UpdateAccountForm dialog) { try { - // can update subLedger - updateAccount(account); + Account account = dialog.getAccount(); + account = accountService.updateAccount(account); + + // update tree + JXTreeTable treeTable = view.getAccountsTreeTable(); + DefaultTreeTableModel model = (DefaultTreeTableModel)treeTable.getTreeTableModel(); + int selectedRow = treeTable.getSelectedRow(); + TreePath treePath = treeTable.getPathForRow(selectedRow); + //TreeTableNode lastPathComponent = (TreeTableNode) treePath.getLastPathComponent(); + //lastPathComponent.setUserObject(account); + model.valueForPathChanged(treePath, account); + } catch (LimaException ex) { + throw new LimaRuntimeException("Can't update account", ex); } finally { // close dialog @@ -328,47 +330,52 @@ } } - /** Ask for user to remove for selected account, and remove it if confirmed. */ - public void doRemoveAccount() { + /** + * Ask for user to remove for selected account, and remove it if confirmed. + */ + public void removeAccount() { // maybe this code can be factorised JXTreeTable treeTable = view.getAccountsTreeTable(); - - // Any row selected int selectedRow = treeTable.getSelectedRow(); - if (selectedRow != -1) { - int n = JOptionPane.showConfirmDialog(view, - _("lima.charts.account.question.remove"), - _("lima.common.question"), - JOptionPane.YES_NO_OPTION, - JOptionPane.QUESTION_MESSAGE); - if (n == JOptionPane.YES_OPTION) { - // update view of treetable - TreePath treePath = - treeTable.getPathForRow(selectedRow); + TreePath treePath = treeTable.getPathForRow(selectedRow); + MutableTreeTableNode lastNode = (MutableTreeTableNode)treePath.getLastPathComponent(); + Account account = (Account)lastNode.getUserObject(); - /*try { - getTreeTableModel().removeAccount(treePath); - } catch (LimaException eee) { - if (log.isErrorEnabled()) { - log.error("Can't delete account", eee); - } - DialogHelper.showErrorMessageDialog(view, eee); - }*/ + int response = JOptionPane.showConfirmDialog(view, + _("lima.ui.account.removeaccountconfirm", account.getAccountNumber()), + _("lima.ui.account.removeaccounttitle"), + JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); + + if (response == JOptionPane.YES_OPTION) { + try { + accountService.removeAccount(account); + + // add all sub accounts to parent + DefaultTreeTableModel model = (DefaultTreeTableModel)treeTable.getTreeTableModel(); + MutableTreeTableNode parent = (MutableTreeTableNode)lastNode.getParent(); + for (int childIndex = lastNode.getChildCount() -1 ; childIndex >= 0 ; childIndex--) { + MutableTreeTableNode child = (MutableTreeTableNode)lastNode.getChildAt(childIndex); + model.insertNodeInto(child, parent, parent.getChildCount()); + } + + // remove node + model.removeNodeFromParent(lastNode); + } catch (LimaException ex) { + throw new LimaRuntimeException("Can't remove account", ex); } } } - public void doImportAccountsChart() { + public void importAccountsChart() { - AccountImportForm form = new AccountImportForm(); - // + AccountImportForm form = new AccountImportForm(view); form.setLocationRelativeTo(view); form.setVisible(true); - ImportExport importExport = ImportExport.getInstance(view); + ImportExport importExport = new ImportExport(view); - Object value = form.getRadioButtons().getSelectedValue(); + Object value = form.getButtonGroup().getSelectedValue(); // if action confirmed if (value != null) { AccountsChartEnum defaultAccountsChartEnum = @@ -388,127 +395,25 @@ } } + /** + * Called when import methods are called on services. + */ @Override - public void notifyMethod(String serviceName, String methodeName) { + public void notifyMethod(String serviceName, String methodName) { - if (methodeName.contains("importAccounts") || - methodeName.contains("importAll") || - methodeName.contains("importAsCSV")) { - - // refresh model - //getTreeTableModel().refreshTree(); - - //FIXME tchemit-2011-09-23 Should never do this... refresh view - view.repaint(); - } - } - - /*protected boolean updateMasterAccount(Account account, - String newMasterAccountNumber) { - boolean hasChanged = false; - String oldMasterAccountNumber = account.getMasterAccount() == null ? - "" : - account.getMasterAccount().getAccountNumber(); - - if (ObjectUtils.notEqual(oldMasterAccountNumber, newMasterAccountNumber)) { - - // master account has changed - hasChanged = true; - - // obtain new master account - try { - if (log.isInfoEnabled()) { - log.info("setMaster : " - + newMasterAccountNumber + " to : " - + account.getAccountNumber()); - } - Account masterAccount = accountService - .getAccountByNumber(newMasterAccountNumber); - account.setMasterAccount(masterAccount); - } catch (LimaException eee) { - log.debug("Can't search account for update : " - + newMasterAccountNumber, eee); + if (methodName.contains("importAccounts") || + methodName.contains("importAll") || + methodName.contains("importAsCSV")) { + + if (log.isInfoEnabled()) { + log.info(String.format("Service notification %s, reloading accounts", methodName)); } - } - return hasChanged; - } - protected boolean updateLabel(Account account, String newLabel) { - boolean hasChanged = false; - String oldLabel = account.getLabel(); - if (ObjectUtils.notEqual(oldLabel, newLabel)) { - - // label has changed - hasChanged = true; - account.setLabel(newLabel); - } - return hasChanged; - } - - protected boolean updateThirdParty(Account account, String newThirdParty) { - boolean hasChanged = false; - String oldThirdParty = account.getThirdParty(); - if (ObjectUtils.notEqual(oldThirdParty, newThirdParty)) { - - // thirdparty has changed - hasChanged = true; - account.setThirdParty(newThirdParty); - } - - return hasChanged; - }*/ - - protected void updateAccount(Account selectedObject) { - /*try { - getTreeTableModel().updateAccount(selectedObject); - } catch (LimaException eee) { - if (log.isErrorEnabled()) { - log.error("Can't add update", eee); + loadAllAccounts(); + } else { + if (log.isDebugEnabled()) { + log.debug("Ignoring service notification " + serviceName + ":" + methodName); } - DialogHelper.showErrorMessageDialog(view, eee); - }*/ - } - - protected Account getMasterAccount(Account account) { - - String number = account.getAccountNumber(); - - Account masterAccount; - - - //search for the nearest account from the one been created - //e.g.: for 41019 search for 4, 41, 410, 4101 - //and stop when the account doesn't exist, use last account found instead - try { - - masterAccount = accountService.getMasterAccount(number); - - } catch (LimaException eee) { - if (log.isErrorEnabled()) { - log.error("Can't obtain master account for account number " + number, eee); - } - ErrorHelper.showErrorDialog(view, "Can't obtain master account for account number " + number, eee); - return null; } - - if (masterAccount == null) { - ErrorHelper.showErrorDialog(_("lima.error.no.masteraccount", number)); - return null; - } - return masterAccount; } - - protected Account getSelectedAccount() { - - JXTreeTable table = view.getAccountsTreeTable(); - - Account selectedObject = null; - int selectedRow = table.getSelectedRow(); - if (selectedRow > -1) { - TreePath treePath = table.getPathForRow(selectedRow); - TreeTableNode lastPathComponent = (TreeTableNode) treePath.getLastPathComponent(); - selectedObject = (Account)lastPathComponent.getUserObject(); - } - return selectedObject; - } } Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx 2012-04-05 10:58:58 UTC (rev 3353) @@ -1,98 +0,0 @@ -<!-- - #%L - Lima Swing - - $Id$ - $HeadURL$ - %% - Copyright (C) 2008 - 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> - -<JDialog modal="true" defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" - onWindowClosing="dispose()"> - - <import> - javax.swing.text.Document - org.chorem.lima.entity.Account - </import> - - <AccountViewHandler id='handler' - initializer='getContextValue(AccountView.class,JAXXUtil.PARENT).getHandler()'/> - - <Account id="account" javaBean='null'/> - - <script> - <![CDATA[ - getRootPane().setDefaultButton(ok); - - @Override - public void dispose() { - setAccount(null); - super.dispose(); - } - ]]> - </script> - - <Table> - <row> - <cell fill="horizontal"> - <JLabel text="lima.common.code" labelFor='{numberTextField}'/> - </cell> - <cell fill="horizontal"> - <JTextField id="numberTextField" - text="{account.getAccountNumber()}"/> - <Document initializer="numberTextField.getDocument()" - onInsertUpdate='account.setAccountNumber(numberTextField.getText())' - onRemoveUpdate='account.setAccountNumber(numberTextField.getText())'/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.common.label" labelFor='{descriptionTextField}'/> - </cell> - <cell fill="horizontal"> - <JTextField id="descriptionTextField" text="{account.getLabel()}"/> - <Document initializer="descriptionTextField.getDocument()" - onInsertUpdate='account.setLabel(descriptionTextField.getText())' - onRemoveUpdate='account.setLabel(descriptionTextField.getText())'/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.identity.contact" labelFor='{thirdPartyTextField}'/> - </cell> - <cell fill="horizontal"> - <JTextField id="thirdPartyTextField" - text="{account.getThirdParty()}"/> - <Document - javaBean="thirdPartyTextField.getDocument()" - onInsertUpdate='account.setThirdParty(thirdPartyTextField.getText())' - onRemoveUpdate='account.setThirdParty(thirdPartyTextField.getText())'/> - </cell> - </row> - <row> - <cell columns="2"> - <JPanel layout='{new GridLayout(1,0)}'> - <JButton text="lima.common.cancel" onActionPerformed="dispose()"/> - <JButton id="ok" text="lima.common.ok" - onActionPerformed="/*handler.doAddSubLedger(this)*/"/> - </JPanel> - </cell> - </row> - </Table> -</JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateAccountForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateAccountForm.jaxx 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateAccountForm.jaxx 2012-04-05 10:58:58 UTC (rev 3353) @@ -5,7 +5,7 @@ $Id$ $HeadURL$ %% - Copyright (C) 2008 - 2011 CodeLutin + Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -22,26 +22,22 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> -<JDialog modal="true" defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" - onWindowClosing="dispose()"> +<JDialog title="lima.ui.account.updateaccounttitle" modal="true" + defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="dispose()"> <import> + javax.swing.text.Document org.chorem.lima.entity.Account </import> - <Account id="account" javaBean='null'/> - <AccountViewHandler id='handler' initializer='getContextValue(AccountView.class,JAXXUtil.PARENT).getHandler()'/> + + <Account id="account" javaBean='null'/> + <script> <![CDATA[ - getRootPane().setDefaultButton(ok); - - @Override - public void dispose() { - setAccount(null); - super.dispose(); - } + getRootPane().setDefaultButton(okButton); ]]> </script> @@ -49,7 +45,7 @@ <row> <cell fill="horizontal"> - <JLabel text="lima.charts.account.number" labelFor='{numberTextField}'/> + <JLabel text="lima.ui.account.number" labelFor='{numberTextField}'/> </cell> <cell fill="horizontal"> <JTextField id="numberTextField" editable='{false}' @@ -58,28 +54,21 @@ </row> <row> <cell fill="horizontal"> - <JLabel text="lima.common.label" labelFor='{descriptionTextField}'/> + <JLabel text="lima.ui.account.label" labelFor='{descriptionTextField}'/> </cell> <cell fill="horizontal"> <JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/> + <Document initializer="descriptionTextField.getDocument()" + onInsertUpdate='account.setLabel(descriptionTextField.getText())' + onRemoveUpdate='account.setLabel(descriptionTextField.getText())'/> </cell> </row> - <!-- <row> - <cell fill="horizontal"> - <JLabel text="lima.common.masteraccount" - labelFor='{masterAccountTextField}'/> - </cell> - <cell fill="horizontal"> - <JTextField id="masterAccountTextField" - text="{getAccount().getMasterAccount().getAccountNumber()}"/> - </cell> - </row> --> <row> <cell columns="2"> <JPanel layout='{new GridLayout(1,0)}'> - <JButton text="lima.common.cancel" onActionPerformed="dispose()"/> - <JButton id="ok" text="lima.common.ok" - onActionPerformed="handler.doUpdateAccount(this)"/> + <JButton text="lima.ui.common.cancel" onActionPerformed="dispose()"/> + <JButton id="okButton" text="lima.ui.common.ok" + onActionPerformed="handler.updateAccount(this)"/> </JPanel> </cell> </row> Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateSubLedgerForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateSubLedgerForm.jaxx 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateSubLedgerForm.jaxx 2012-04-05 10:58:58 UTC (rev 3353) @@ -1,96 +0,0 @@ -<!-- - #%L - Lima :: Swing - - $Id$ - $HeadURL$ - %% - Copyright (C) 2008 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> -<JDialog modal="true" defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" - onWindowClosing="dispose()"> - - <import> - org.chorem.lima.entity.Account - </import> - - <Account id="account" javaBean='null'/> - - <AccountViewHandler id='handler' - initializer='getContextValue(AccountView.class,JAXXUtil.PARENT).getHandler()'/> - - <script> - <![CDATA[ - getRootPane().setDefaultButton(ok); - - @Override - public void dispose() { - setAccount(null); - super.dispose(); - } - ]]> - </script> - - <Table> - <row> - <cell fill="horizontal"> - <JLabel text="lima.common.code" labelFor='{numberTextField}'/> - </cell> - <cell fill="horizontal"> - <JTextField id="numberTextField" editable='{false}' - text="{account.getAccountNumber()}"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.common.label" labelFor='{descriptionTextField}'/> - </cell> - <cell fill="horizontal"> - <JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/> - </cell> - </row> - <!-- Lien Fiche contact--> - <row> - <cell fill="horizontal"> - <JLabel text="lima.identity.contact" labelFor='{thirdPartyTextField}'/> - </cell> - <cell fill="horizontal"> - <JTextField id="thirdPartyTextField" text="{getAccount().getThirdParty()}"/> - </cell> - </row> - <!-- <row> - <cell fill="horizontal"> - <JLabel text="lima.common.masteraccount" - labelFor='{masterAccountTextField}'/> - </cell> - <cell fill="horizontal"> - <JTextField id="masterAccountTextField" - text="{getAccount().getMasterAccount().getAccountNumber()}"/> - </cell> - </row> --> - <row> - <cell columns="2"> - <JPanel layout='{new GridLayout(1,0)}'> - <JButton text="lima.common.cancel" onActionPerformed="dispose()"/> - <JButton id="ok" text="lima.common.ok" - onActionPerformed="handler.doUpdateSubLedger(this)"/> - </JPanel> - </cell> - </row> - </Table> -</JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -168,7 +168,7 @@ if (value != null) { EntryBooksChartEnum defaultEntryBooksEnum = (EntryBooksChartEnum) value; - ImportExport importExport = ImportExport.getInstance(view); + ImportExport importExport = new ImportExport(view); importExport.importExport(ImportExportEnum.CSV_ENTRYBOOKS_IMPORT, defaultEntryBooksEnum.getFilePath(), true); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -293,7 +293,7 @@ } FinancialStatementsChartEnum defaultFinancialStatementsEnum = (FinancialStatementsChartEnum) value; - ImportExport importExport = ImportExport.getInstance(view); + ImportExport importExport = new ImportExport(view); importExport.importExport(ImportExportEnum.CSV_FINANCIALSTATEMENTS_IMPORT, defaultFinancialStatementsEnum.getFilePath(), true); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -65,11 +65,9 @@ public class ImportExport { - private static ImportExport exchanger; - private static final Log log = LogFactory.getLog(AccountViewHandler.class); - protected static Component viewComponent; + protected Component viewComponent; protected EncodingEnum encodingEnum; @@ -343,14 +341,4 @@ return sw.toString(); } - - public static ImportExport getInstance(Component view) { - if (exchanger == null) { - exchanger = new ImportExport(view); - } else { - viewComponent = view; - } - return exchanger; - } - } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -86,7 +86,7 @@ } public void next() { - ImportExport importExport = ImportExport.getInstance(view); + ImportExport importExport = new ImportExport(view); JPanel panel = view.getPanel(); panel.removeAll(); switch (step) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java 2012-04-05 10:58:58 UTC (rev 3353) @@ -193,7 +193,7 @@ } VatStatementsChartEnum defaultVatStatementsEnum = (VatStatementsChartEnum) value; - ImportExport importExport = ImportExport.getInstance(view); + ImportExport importExport = new ImportExport(view); importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, defaultVatStatementsEnum.getFilePath(), true); refresh(); Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties =================================================================== --- trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2012-04-05 10:58:58 UTC (rev 3353) @@ -1,5 +1,4 @@ = -lima.account.addaccounterror=Can't add account lima.accountsreports.listerror=Can't get entries list lima.action.commandline.help=Show help in console lima.action.fullscreen=Full screen @@ -11,7 +10,6 @@ lima.balance.listerror=Can't get entries list lima.charts.account=Accounts chart lima.charts.account.addAccount=Add account -lima.charts.account.addSubLedger=Add thirdpart account lima.charts.account.base=Base accountchart lima.charts.account.developed=Developped accountchart lima.charts.account.number=Account Number @@ -70,7 +68,6 @@ lima.common.globalexception=Global lima exception lima.common.info=Information lima.common.label=Label -lima.common.masteraccount=Master account lima.common.movmentedfilter=Accounts filtered lima.common.next=Next lima.common.ok=OK @@ -95,16 +92,13 @@ lima.config.decimalseparator.description= lima.config.host.adress=Host adress lima.config.i18n.dir.description= -lima.config.i18ndir=Directory used for i18n files lima.config.locale.description=Localization used by LIMA lima.config.resources.dir.description= -lima.config.resourcesdir=Directory used for Lima resources lima.config.scale.description= lima.config.ui.flaunchui.description= lima.config.ui.fullscreen.description=FullScreen lima.daily=Daily lima.documents=Documents… -lima.documents.error=Can't create document on an open fiscal year lima.entries=Entries lima.entries.addEntry=Add entry lima.entries.addTransaction=Add transaction @@ -123,9 +117,6 @@ lima.enum.comboboxaccount.account=Account lima.enum.comboboxaccount.accountlist=Account list lima.enum.comboboxaccount.allaccount=All accounts -lima.enum.comboboxamount.both=Both -lima.enum.comboboxamount.credit=Credit -lima.enum.comboboxamount.debit=Debit lima.enum.comboboxentrybook.all=All entrybooks lima.enum.comboboxentrybook.select_one=EntryBook lima.enum.comboboxletter.all=All letters @@ -142,7 +133,6 @@ lima.enum.comboboxperiod.fiscalperiod=Fiscal period lima.enum.comboboxperiod.period=Period lima.error.errorpane.htmlmessage=<html><body><b>An application error happened</b>\:<br/>%s</body></html> -lima.error.no.masteraccount=there is no master account for account with number %s lima.financialstatement.accounts=Account list on debit and on credit lima.financialstatement.addfinancialStatementHeadererror=Can't add financialStatementHeader lima.financialstatement.check=Check accounts passing to movement @@ -187,7 +177,6 @@ lima.identity.businessNumber=Business number lima.identity.city=City lima.identity.classificationCode=Classification code -lima.identity.contact=Contact lima.identity.description=Description lima.identity.email=Email lima.identity.name=Name @@ -214,12 +203,12 @@ lima.importexport.wait=Job in progress… lima.init.closed=Lima closed at %1$s lima.init.errorclosing=Error during Lima close +lima.iu.importexport.import= lima.ledger.documentcreationerror=Enable to create document lima.lettering.listerror=Can't get entries list lima.menu.file=File lima.menu.help=Help lima.menu.help.about=About -lima.menu.help.help=Help lima.menu.help.i18n=Language lima.menu.help.i18n.fr=French lima.menu.help.i18n.uk=English @@ -250,16 +239,12 @@ lima.tab.home=Home lima.table.account=Account lima.table.balance=Balance -lima.table.begin.credit=Beginning Balance Credit -lima.table.begin.debit=Beginning Balance Debit lima.table.closure=Closed lima.table.code=Code -lima.table.collectedvat=Collected VAT lima.table.credit=Credit lima.table.date=Date lima.table.debit=Debit lima.table.debitcredit=Debit and credit -lima.table.deductiblevat=Deductible VAT lima.table.description=Description lima.table.entrybook=EntryBook lima.table.fiscalperiod=Fiscalperiod @@ -272,21 +257,31 @@ lima.table.number=Account Number lima.table.period=Period lima.table.provisiondeprecationamount=Provision & Deprecation -lima.table.remainingcredit=Remaining credit -lima.table.repayments=Repayments lima.table.solde=Solder lima.table.solde.credit=Credit solde lima.table.solde.debit=Debit solde -lima.table.vatcredit=VAT credit -lima.table.vatdue=Due VAT -lima.table.vatpaid=VAT paid -lima.table.vatpayable=VAT payable lima.table.voucher=Voucher lima.title=Lutin Invoice Monitoring and Accounting lima.title.about=About Lima... lima.title.about.description=Open sources accounting software lima.tooltip.filter=<html>Regular expression \:<br/>- accounts interval i..j <br/>- accounts list i,j,k <br/>- Exclude an account -i</html> lima.tooltip.lettering=<html>Add a letter on many entries <br/>Select many rows with combination ctrl + click</html> +lima.ui.account.addAccount= +lima.ui.account.addaccounttitle= +lima.ui.account.base= +lima.ui.account.developed= +lima.ui.account.label= +lima.ui.account.number= +lima.ui.account.removeaccountconfirm= +lima.ui.account.removeaccounttitle= +lima.ui.account.shortened= +lima.ui.account.updateaccounttitle= +lima.ui.common.cancel= +lima.ui.common.ok= +lima.ui.common.remove= +lima.ui.common.update= +lima.ui.importexport.importcsv= +lima.ui.importexport.importebp= lima.vatreport.listerror=Can't get entries list lima.vatstatement.accounts=List of accounts lima.vatstatement.boxname=PDF BoxName Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties =================================================================== --- trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2012-04-05 10:58:58 UTC (rev 3353) @@ -1,5 +1,4 @@ = -lima.account.addaccounterror=Erreur lors de l'ajout d'un compte lima.accountsreports.listerror=Erreur lors de la récupération des données de la liste lima.action.commandline.help=Afficher l'aide en console lima.action.fullscreen=Plein Ecran @@ -11,7 +10,6 @@ lima.balance.listerror=Erreur lors de la récupération des données de la liste lima.charts.account=Plan comptable lima.charts.account.addAccount=Ajout Compte Général -lima.charts.account.addSubLedger=Ajouter Compte Tiers lima.charts.account.base=Plan comptable de base lima.charts.account.developed=Plan comptable développé lima.charts.account.number=Numéro de compte @@ -70,7 +68,6 @@ lima.common.globalexception=Global lima exception lima.common.info=Information lima.common.label=Libellé -lima.common.masteraccount=Compte parent lima.common.movmentedfilter=Comptes mouvementés lima.common.next=Suivant lima.common.ok=OK @@ -95,16 +92,13 @@ lima.config.decimalseparator.description= lima.config.host.adress=Adresse du serveur distant lima.config.i18n.dir.description= -lima.config.i18ndir=Répertoire utilisée pour stocker les fichiers i18n lima.config.locale.description=Locale utilisée par l'application lima.config.resources.dir.description= -lima.config.resourcesdir=Répertoire utilisée pour stocker les ressources lima.config.scale.description= lima.config.ui.flaunchui.description= lima.config.ui.fullscreen.description=Plein écran lima.daily=Quotidien lima.documents=Documents… -lima.documents.error=Impossible de créer un document lorsque l'exercice est ouvert lima.entries=Traitement lima.entries.addEntry=Ajouter entrée lima.entries.addTransaction=Ajouter transaction @@ -123,9 +117,6 @@ lima.enum.comboboxaccount.account=Compte lima.enum.comboboxaccount.accountlist=Liste de comptes lima.enum.comboboxaccount.allaccount=Tous les comptes -lima.enum.comboboxamount.both=Les deux -lima.enum.comboboxamount.credit=Crédit -lima.enum.comboboxamount.debit=Débit lima.enum.comboboxentrybook.all=Tous les journaux lima.enum.comboboxentrybook.select_one=Journal lima.enum.comboboxletter.all=Toutes les lettres @@ -142,7 +133,6 @@ lima.enum.comboboxperiod.fiscalperiod=Exercice lima.enum.comboboxperiod.period=Période lima.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html> -lima.error.no.masteraccount=Il n'existe pas de compte parent pour le numéro de compte %s lima.financialstatement.accounts=Liste de comptes au crédit et au débit lima.financialstatement.addfinancialStatementHeadererror=Erreur lors de l'ajout de l'entête sur la déclaration financière lima.financialstatement.check=Vérification des comptes aux postes @@ -187,7 +177,6 @@ lima.identity.businessNumber=SIRET lima.identity.city=Ville lima.identity.classificationCode=Code NAF -lima.identity.contact=Contact lima.identity.description=Description lima.identity.email=Courriel lima.identity.name=Nom @@ -214,12 +203,12 @@ lima.importexport.wait=Traitement en cours … lima.init.closed=Lima fermé à %1$s lima.init.errorclosing=Erreur lors de la fermeture +lima.iu.importexport.import= lima.ledger.documentcreationerror=Erreur lors de la création du document lima.lettering.listerror=Erreur lors de la récupération des données de la liste lima.menu.file=Fichier lima.menu.help=Aide lima.menu.help.about=À Propos -lima.menu.help.help=Afficher l'aide lima.menu.help.i18n=Langue lima.menu.help.i18n.fr=Français lima.menu.help.i18n.uk=Anglais @@ -243,23 +232,19 @@ lima.reports.vat=Edition TVA lima.response.no=Non lima.response.yes=Oui -lima.splash.1=Chargement des services... +lima.splash.1=Chargement des services lima.splash.2=Chargement de la comptabilité lima.splash.3=Application prête \! lima.structure=Structure lima.tab.home=Accueil lima.table.account=Compte lima.table.balance=Balance -lima.table.begin.credit=Reprise crèdit -lima.table.begin.debit=Reprise débit lima.table.closure=Cloture lima.table.code=Code -lima.table.collectedvat=TVA collectée lima.table.credit=Crédit lima.table.date=Date lima.table.debit=Débit lima.table.debitcredit=Débit et Crédit -lima.table.deductiblevat=TVA déductible lima.table.description=Description lima.table.entrybook=Journal lima.table.fiscalperiod=Exercice @@ -272,26 +257,35 @@ lima.table.number=Numéro de compte lima.table.period=Période lima.table.provisiondeprecationamount=Amortissements et provisions -lima.table.remainingcredit=Crédit de TVA -lima.table.repayments=Remboursements lima.table.solde=Solde lima.table.solde.credit=Solde crédit lima.table.solde.debit=Solde débit -lima.table.vatcredit=Crédit de TVA -lima.table.vatdue=TVA due -lima.table.vatpaid=TVA payée -lima.table.vatpayable=TVA à payer lima.table.voucher=Pièce comptable lima.title=Lutin Invoice Monitoring and Accounting lima.title.about=À propos de Lima... lima.title.about.description=Logiciel de comptabilité Libre lima.tooltip.filter=<html>Expression régulière \:<br/>- intervalle de compte i..j <br/>- liste de compte i,j,k <br/>- Exclure un compte -i</html> lima.tooltip.lettering=<html>Pour ajouter une lettre à plusieurs écritures <br/>Sélectionner plusieurs lignes avec la combinaison ctrl + click</html> +lima.ui.account.addAccount=Nouveau compte +lima.ui.account.addaccounttitle=Ajout d'un compte +lima.ui.account.base=Plan comptable de base +lima.ui.account.developed=Plan comptable développé +lima.ui.account.label=Libellé +lima.ui.account.number=Numéro de compte +lima.ui.account.removeaccountconfirm=Voulez-vous supprimer le compte %s ? +lima.ui.account.removeaccounttitle=Suppression d'un compte +lima.ui.account.shortened=Plan comptable abrégé +lima.ui.account.updateaccounttitle=Modification d'un compte +lima.ui.common.cancel=Annuler +lima.ui.common.ok=Ok +lima.ui.common.remove=Supprimer +lima.ui.common.update=Modifier +lima.ui.importexport.importcsv=Import/Export CSV +lima.ui.importexport.importebp=Import/Export EBP lima.vatreport.listerror=Erreur lors de la récupération des données de la liste lima.vatstatement.accounts=Liste des comptes lima.vatstatement.boxname=PDF BoxName lima.vatstatement.delete=Supprimer le plan TVA actuel avant d'importer -lima.vatstatement.header= lima.vatstatement.label=Libellé lima.vatstatement.mastervatstatement= lima.vatstatement.movement.add=Ajouter un regrouprement Modified: trunk/lima-swing/src/main/resources/log4j.properties =================================================================== --- trunk/lima-swing/src/main/resources/log4j.properties 2012-04-05 10:10:32 UTC (rev 3352) +++ trunk/lima-swing/src/main/resources/log4j.properties 2012-04-05 10:58:58 UTC (rev 3353) @@ -38,3 +38,4 @@ # package level log4j.logger.org.chorem.lima=INFO +log4j.logger.org.chorem.lima.ui.account=DEBUG \ No newline at end of file
participants (1)
-
echatellier@users.chorem.org