Author: jpepin Date: 2010-07-21 18:46:42 +0200 (Wed, 21 Jul 2010) New Revision: 2981 Url: http://chorem.org/repositories/revision/lima/2981 Log: Refactor page d'accueil, ajout de listeners pour le rafraichissement. Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java Removed: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewListener.java Modified: trunk/lima-swing/src/main/java/org/chorem/lima/service/ServiceMonitorableHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java Modified: trunk/lima-swing/src/main/java/org/chorem/lima/service/ServiceMonitorableHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/service/ServiceMonitorableHandler.java 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/service/ServiceMonitorableHandler.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -51,7 +51,6 @@ Object result = null; if (method.getName().equals("addListener")){ addServiceListener((ServiceListener) args[0]); - log.debug("addListener"); } else if (method.getName().equals("removeListener")){ removeServiceListener((ServiceListener) args[0]); @@ -59,7 +58,6 @@ else { result = method.invoke(service, args); if (!method.getName().startsWith("get")){ - log.debug(service.toString()+" "+method.getName()); for (ServiceListener serviceListener : listeners) { serviceListener.notifyMethod(service.toString(), method.getName()); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2010-07-21 16:46:42 UTC (rev 2981) @@ -14,6 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ##% --> + <JFrame title="lima.title" onWindowClosing="getHandler().close(this)" defaultCloseOperation="do_nothing_on_close" undecorated='{getConfig().isFullScreen()}' 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 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -44,7 +44,6 @@ import org.chorem.lima.ui.financialtransaction.LetteringView; import org.chorem.lima.ui.financialtransactionunbalanced.FinancialTransactionUnbalancedView; import org.chorem.lima.ui.home.HomeView; -import org.chorem.lima.ui.home.HomeViewListener; import org.chorem.lima.ui.importexport.ImportExport; import org.chorem.lima.ui.importexport.ImportExportEnum; import org.chorem.lima.ui.ledger.LedgerView; @@ -280,7 +279,6 @@ public void showHomeView(JAXXContext rootContext) { MainView mainView = getUI(rootContext); HomeView homeView = new HomeView(mainView); - homeView.addComponentListener(new HomeViewListener(homeView)); mainView.showTab(_("lima.tab.home"), homeView, false); } /** Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -93,11 +93,6 @@ result = cacheDataList.getListEntry().size(); } } - else { - if (log.isDebugEnabled()) { - log.debug("No account selected skip table model update"); - } - } return result; } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -101,7 +101,7 @@ @Override public void notifyMethod(String serviceName, String methodeName) { - if (serviceName.contains("Account") || methodeName.contains("importAll")){ + if (methodeName.contains("Account") || methodeName.contains("importAll")){ refresh(); } } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -105,7 +105,7 @@ @Override public void notifyMethod(String serviceName, String methodeName) { - if (serviceName.contains("EntryBook") || methodeName.contains("importAll")){ + if (methodeName.contains("EntryBook") || methodeName.contains("importAll")){ refresh(); } } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -91,11 +91,6 @@ if (selectedEntryBook != null) { result = cacheDataList.getListEntry().size(); } - else { - if (log.isDebugEnabled()) { - log.debug("No account selected skip table model update"); - } - } return result; } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -197,7 +197,6 @@ } ErrorHelper.showErrorDialog("Can't get entries list", eee); } - log.debug(results); return results; } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -215,14 +215,8 @@ int result = 0; if (cacheDataList != null) { - //cacheDataList = getDataList(); result = cacheDataList.size(); } - else { - if (log.isDebugEnabled()) { - log.debug("No fiscalPeriod selected skip table model update"); - } - } return result; } @@ -314,12 +308,6 @@ } } - else { - if (log.isDebugEnabled()) { - log.debug("No fiscalPeriod selected skip table model update"); - } - } - return result; } @@ -482,11 +470,6 @@ cacheDataList = getDataList(); fireTableRowsUpdated(financialTransactionRow, getRowCount()-1); } - else { - if (log.isDebugEnabled()) { - log.debug("No fiscalPeriod selected skip table model update"); - } - } } public Object getElementAt(int row){ Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -210,11 +210,6 @@ if (cacheDataList != null) { result = cacheDataList.size(); } - else { - if (log.isDebugEnabled()) { - log.debug("No fiscalPeriod selected skip table model update"); - } - } return result; } @@ -306,11 +301,6 @@ } } - else { - if (log.isDebugEnabled()) { - log.debug("No fiscalPeriod selected skip table model update"); - } - } return result; } @@ -438,11 +428,6 @@ //TODO PEPIN 20100607 Get financial transaction of cachedatelist on replace it fireTableRowsUpdated(financialTransactionRow, getRowCount()-1); } - else { - if (log.isDebugEnabled()) { - log.debug("No fiscalPeriod selected skip table model update"); - } - } } public Object getElementAt(int row){ Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java (rev 0) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -0,0 +1,122 @@ +/* *##% Lima Swing + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * ##%*/ + +package org.chorem.lima.ui.home; + +import static org.nuiton.i18n.I18n._; +import java.awt.Color; +import java.util.List; +import javax.swing.JEditorPane; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; +import javax.swing.plaf.basic.BasicEditorPaneUI; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.lima.LimaContext; +import org.chorem.lima.business.AccountServiceMonitorable; +import org.chorem.lima.business.ImportServiceMonitorable; +import org.chorem.lima.business.LimaException; +import org.chorem.lima.business.ServiceListener; +import org.chorem.lima.entity.Account; +import org.chorem.lima.service.LimaServiceFactory; +import org.chorem.lima.ui.MainView; + +public class AccountsPane extends JEditorPane implements HyperlinkListener, ServiceListener { + + private static final long serialVersionUID = 1L; + + private static final Log log = LogFactory.getLog(AccountsPane.class); + + protected HomeView view; + + protected AccountServiceMonitorable accountService; + + private static Color redBackground = new Color(0xff, 0xee, 0xee); + private static Color greenBackground = new Color(0xee, 0xff, 0xee); + + + + public AccountsPane(HomeView view) { + this.view=view; + accountService = + LimaServiceFactory.getInstance().getService( + AccountServiceMonitorable.class); + accountService.addListener(this); + LimaServiceFactory.getInstance().getService( + ImportServiceMonitorable.class).addListener(this); + + //init + setOpaque(true); + setContentType("text/html"); + setEditable(false); + setUI(new BasicEditorPaneUI()); + addHyperlinkListener(this); + refresh(); + } + + @Override + public void hyperlinkUpdate(HyperlinkEvent e) { + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + + if (e.getDescription().equals("#accountschart")) { + MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view); + ui.getHandler().showAccountView(ui); + } + } + } + + public void refresh(){ + + String htmlBegin = "<font face='sans-serif' size=3>" + + "<p style=vertical-align:'bottom', horizontal-align:'center'>"; + String htmlEnd = "</p></font>"; + + try { + + List<Account> accounts = accountService.getAllAccounts(); + if (accounts.size()>0){ + setBackground(greenBackground); + String accountsString = _("limahome.chartaccounts.state1_2") + " " + + accounts.size() + " " + _("limahome.chartaccounts.state2_2") + + "<br/><br/><a href='#accountschart'>" + + _("limahome.chartaccounts.modify") + "</a>"; + //set Text + setText(htmlBegin + accountsString + htmlEnd); + } + else { + setBackground(redBackground); + String accountsString = _("limahome.chartaccounts.nothing") + + "<br/><br/><a href='#accountschart'>" + + _("limahome.chartaccounts.create") + "</a>"; + //set Text + setText(htmlBegin + accountsString + htmlEnd); + } + } catch (LimaException eee) { + log.debug("Can't get datas account editor pane home", eee); + } + } + + @Override + public void notifyMethod(String serviceName, String methodeName) { + if (methodeName.contains("Account") || methodeName.contains("importAll")){ + refresh(); + } + } + +} Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java (rev 0) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -0,0 +1,138 @@ +/* *##% Lima Swing + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * ##%*/ + +package org.chorem.lima.ui.home; + +import static org.nuiton.i18n.I18n._; +import java.awt.Color; +import java.util.List; +import javax.swing.JEditorPane; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; +import javax.swing.plaf.basic.BasicEditorPaneUI; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.lima.LimaContext; +import org.chorem.lima.business.EntryBookServiceMonitorable; +import org.chorem.lima.business.ImportServiceMonitorable; +import org.chorem.lima.business.LimaException; +import org.chorem.lima.business.ServiceListener; +import org.chorem.lima.entity.EntryBook; +import org.chorem.lima.service.LimaServiceFactory; +import org.chorem.lima.ui.MainView; + +public class EntryBooksPane extends JEditorPane implements HyperlinkListener, ServiceListener { + + private static final long serialVersionUID = 1L; + + private static final Log log = LogFactory.getLog(EntryBooksPane.class); + + protected HomeView view; + + protected EntryBookServiceMonitorable entryBookService; + + private static Color redBackground = new Color(0xff, 0xee, 0xee); + private static Color greenBackground = new Color(0xee, 0xff, 0xee); + + public EntryBooksPane(HomeView view) { + this.view=view; + + entryBookService = + LimaServiceFactory.getInstance().getService( + EntryBookServiceMonitorable.class); + entryBookService.addListener(this); + LimaServiceFactory.getInstance().getService( + ImportServiceMonitorable.class).addListener(this); + + //init + setOpaque(true); + setContentType("text/html"); + setEditable(false); + setUI(new BasicEditorPaneUI()); + addHyperlinkListener(this); + refresh(); + } + + @Override + public void hyperlinkUpdate(HyperlinkEvent e) { + + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + + if (e.getDescription().equals("#entrybookschart")) { + MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view); + ui.getHandler().showEntryBookView(ui); + } + } + } + + public void refresh(){ + + String htmlBegin = "<font face='sans-serif' size=3>" + + "<p style=vertical-align:'bottom', horizontal-align:'center'>"; + String htmlEnd = "</p></font>"; + + try { + + List<EntryBook> entryBooks = entryBookService.getAllEntryBooks(); + int ebSize = entryBooks.size(); + if (ebSize>0){ + setBackground(greenBackground); + String entryBooksString=""; + if (ebSize == 1){ + entryBooksString = _("limahome.entrybooks.state.single") + + "<br/>" + entryBooks.get(0) + + "<br/><br/><a href='#entrybookschart'>" + + _("limahome.entrybooks.modify") + "</a>"; + + } + else { + entryBooksString = _("limahome.entrybooks.state1_2.plural") + + " " + entryBooks.size() + " " + + _("limahome.entrybooks.state2_2.plural") + "<ul>"; + for (EntryBook entryBook : entryBooks) { + entryBooksString += "<li>"+entryBook.getCode() + + " - "+entryBook.getLabel()+"</li>"; + } + entryBooksString += "</ul></p><p horizontal-align:'center'>" + + "<a href='#entrybookschart'>" + + _("limahome.entrybooks.modify") + "</a>"; + } + //set Text + setText(htmlBegin + entryBooksString + htmlEnd); + } + else { + setBackground(redBackground); + //set Text + setText(htmlBegin + + _("limahome.entrybooks.nothing") + + "<br/><br/><a href='#entrybookschart'>" + + _("limahome.entrybooks.create") +"</a>" + htmlEnd); + } + + } catch (LimaException eee) { + log.debug("Can't get datas account editor pane home", eee); + } + } + + @Override + public void notifyMethod(String serviceName, String methodeName) { + if (methodeName.contains("EntryBook") || methodeName.contains("importAll")){ + refresh(); + } + } +} Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java (rev 0) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -0,0 +1,139 @@ +/* *##% Lima Swing + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * ##%*/ + +package org.chorem.lima.ui.home; + +import static org.nuiton.i18n.I18n._; +import java.awt.Color; +import java.util.List; +import javax.swing.JEditorPane; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; +import javax.swing.plaf.basic.BasicEditorPaneUI; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.lima.LimaContext; +import org.chorem.lima.business.FinancialTransactionServiceMonitorable; +import org.chorem.lima.business.FiscalPeriodServiceMonitorable; +import org.chorem.lima.business.ImportServiceMonitorable; +import org.chorem.lima.business.LimaException; +import org.chorem.lima.business.ServiceListener; +import org.chorem.lima.entity.FinancialTransaction; +import org.chorem.lima.entity.FiscalPeriod; +import org.chorem.lima.service.LimaServiceFactory; +import org.chorem.lima.ui.MainView; + +public class FinancialTransactionsPane extends JEditorPane implements HyperlinkListener, ServiceListener { + + private static final long serialVersionUID = 1L; + + private static final Log log = LogFactory.getLog(FinancialTransactionsPane.class); + + protected HomeView view; + + protected FinancialTransactionServiceMonitorable financialTransactionService; + protected FiscalPeriodServiceMonitorable fiscalPeriodService; + + private static Color redBackground = new Color(0xff, 0xee, 0xee); + private static Color greenBackground = new Color(0xee, 0xff, 0xee); + + public FinancialTransactionsPane(HomeView view) { + this.view = view; + + financialTransactionService = + LimaServiceFactory.getInstance().getService(FinancialTransactionServiceMonitorable.class); + financialTransactionService.addListener(this); + fiscalPeriodService = + LimaServiceFactory.getInstance().getService(FiscalPeriodServiceMonitorable.class); + fiscalPeriodService.addListener(this); + LimaServiceFactory.getInstance().getService( + ImportServiceMonitorable.class).addListener(this); + + //init + setOpaque(true); + setContentType("text/html"); + setEditable(false); + setUI(new BasicEditorPaneUI()); + addHyperlinkListener(this); + refresh(); + } + + @Override + public void hyperlinkUpdate(HyperlinkEvent e) { + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + + if (e.getDescription().equals("#financialtransactionunbalanced")) { + MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view); + ui.getHandler().showTransactionUnbalancedView(ui); + } + else if (e.getDescription().equals("#financialtransactionbalanced")) { + MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view); + ui.getHandler().showTransactionView(ui); + } + } + } + +public void refresh(){ + + String htmlBegin = "<font face='sans-serif' size=3>" + + "<p style=vertical-align:'bottom', horizontal-align:'center'>"; + String htmlEnd = "</p></font>"; + + try { + + List<FiscalPeriod> unblockedFiscalPeriods = + fiscalPeriodService.getAllUnblockedFiscalPeriods(); + if (unblockedFiscalPeriods.size() != 0){ + List<FinancialTransaction> financialTransactions = + financialTransactionService. + getAllFinancialTransactionsUnbalanced(unblockedFiscalPeriods.get(0)); + if (financialTransactions.size()>0){ + setBackground(redBackground); + String transactionsString = financialTransactions.size() + + " " + _("limahome.transaction.unbalanced") + + "<br/><br/><a href='#financialtransactionunbalanced'>" + + _("limahome.transaction.modifiy") + "</a>"; + //set Text + setText(htmlBegin + transactionsString + htmlEnd); + } + else { + setBackground(greenBackground); + String transactionsString = _("limahome.transaction.balanced") + + "<br/><br/><a href='#financialtransactionbalanced'>" + + _("limahome.transaction.create") + "</a>"; + //set Text + setText(htmlBegin + transactionsString + htmlEnd); + } + } + else { + setBackground(redBackground); + } + + } catch (LimaException eee) { + log.debug("Can't get datas account editor pane home", eee); + } + } + + @Override + public void notifyMethod(String serviceName, String methodeName) { + if (methodeName.contains("FiscalPeriod") || methodeName.contains("FinancialTransaction") || methodeName.contains("importAll")){ + refresh(); + } + } + +} Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java (rev 0) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -0,0 +1,131 @@ +/* *##% Lima Swing + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * ##%*/ + +package org.chorem.lima.ui.home; + +import static org.nuiton.i18n.I18n._; +import java.awt.Color; +import java.util.List; +import javax.swing.JEditorPane; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; +import javax.swing.plaf.basic.BasicEditorPaneUI; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.lima.LimaContext; +import org.chorem.lima.business.FiscalPeriodServiceMonitorable; +import org.chorem.lima.business.ImportServiceMonitorable; +import org.chorem.lima.business.LimaException; +import org.chorem.lima.business.ServiceListener; +import org.chorem.lima.entity.FiscalPeriod; +import org.chorem.lima.service.LimaServiceFactory; +import org.chorem.lima.ui.MainView; + +public class FiscalPeriodsPane extends JEditorPane implements HyperlinkListener, ServiceListener { + + private static final long serialVersionUID = 1L; + + private static final Log log = LogFactory.getLog(FiscalPeriodsPane.class); + + protected HomeView view; + + protected FiscalPeriodServiceMonitorable fiscalPeriodService; + + private static Color redBackground = new Color(0xff, 0xee, 0xee); + private static Color greenBackground = new Color(0xee, 0xff, 0xee); + + public FiscalPeriodsPane(HomeView view) { + this.view = view; + + fiscalPeriodService = + LimaServiceFactory.getInstance().getService(FiscalPeriodServiceMonitorable.class); + fiscalPeriodService.addListener(this); + LimaServiceFactory.getInstance().getService( + ImportServiceMonitorable.class).addListener(this); + + //init + setOpaque(true); + setContentType("text/html"); + setEditable(false); + setUI(new BasicEditorPaneUI()); + addHyperlinkListener(this); + refresh(); } + + @Override + public void hyperlinkUpdate(HyperlinkEvent e) { + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + + if (e.getDescription().equals("#fiscalperiodschart")) { + MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view); + ui.getHandler().showFiscalPeriodView(ui); + } + } + } + +public void refresh(){ + + String htmlBegin = "<font face='sans-serif' size=3>" + + "<p style=vertical-align:'bottom', horizontal-align:'center'>"; + String htmlEnd = "</p></font>"; + + try { + + //FISCAL PERIOD + List<FiscalPeriod> fiscalPeriods = + fiscalPeriodService.getAllFiscalPeriods(); + List<FiscalPeriod> unblockedFiscalPeriods = + fiscalPeriodService.getAllUnblockedFiscalPeriods(); + if (unblockedFiscalPeriods.size()>0){ + setBackground(greenBackground); + String fiscalString = unblockedFiscalPeriods.size() + " " + + _("limahome.fiscalperiod.opened") + "<br/>" + + (fiscalPeriods.size()-unblockedFiscalPeriods.size()) + + " " + _("limahome.fiscalperiod.closed") + + "<br/><br/><a href='#fiscalperiodschart'>" + + _("limahome.fiscalperiod.modify") + "</a>"; + //set Text + setText(htmlBegin + fiscalString + htmlEnd); + + + } + else { + setBackground(redBackground); + String fiscalString = _("limahome.fiscalperiod.noopen"); + if (fiscalPeriods.size()>0){ + fiscalString += "<br/>" + fiscalPeriods.size() + " " + + _("limahome.fiscalperiod.closed"); + } + fiscalString += "<br/><br/><a href='#fiscalperiodschart'>" + + _("limahome.fiscalperiod.create") + "</a>"; + //set Text + setText(htmlBegin + fiscalString + htmlEnd); + + } + } catch (LimaException eee) { + log.debug("Can't get datas home", eee); + } + } + + @Override + public void notifyMethod(String serviceName, String methodeName) { + if (methodeName.contains("FiscalPeriod") || methodeName.contains("importAll")){ + refresh(); + } + } + +} Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2010-07-21 16:46:42 UTC (rev 2981) @@ -1,8 +1,23 @@ +<!-- ##% Lima Swing + 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 2 + 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, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + ##% --> + <Table> - <HomeViewHandler id="handler" javaBean='new HomeViewHandler(this)' /> <Dimension id="fixedSize" javaBean='new Dimension(500,200)' /> <Dimension id="miniSize" javaBean='new Dimension(300,150)' /> - <Color id="green" javaBean='new Color(0xee, 0xff, 0xee)'/> @@ -12,18 +27,16 @@ import java.awt.Color; import java.awt.Font; - void $afterCompleteSetup() { - getHandler().refresh(); - } ]]> </script> <row> <cell anchor="southeast"> - <JPanel id="limaHomeChartAccount" + <JPanel + id = 'accountPanel' border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}' minimumSize='{getMiniSize()}' preferredSize='{getFixedSize()}' - layout='{new BoxLayout(limaHomeChartAccount,BoxLayout.X_AXIS)}'> + layout='{new BoxLayout(accountPanel, BoxLayout.X_AXIS)}'> <Table> <row> <cell weightx="0" weighty="0.1" anchor="northwest"><JLabel icon='{new ImageIcon(getClass().getResource("/images/accounts.png"))}'/></cell> @@ -31,19 +44,19 @@ </row> <row fill="both"> <cell columns="2" weightx="1" weighty="0.9"> - <JEditorPane id="textHomeAccount" - opaque="true" contentType="text/html" editable="false" UI="{new javax.swing.plaf.basic.BasicEditorPaneUI()}" background="{getGreen()}"/> + <JEditorPane javaBean='new org.chorem.lima.ui.home.AccountsPane(this)' /> </cell> </row> </Table> </JPanel> </cell> <cell anchor="southwest"> - <JPanel id="limaHomeEntryBook" + <JPanel + id = 'entryBookPanel' border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}' minimumSize='{getMiniSize()}' preferredSize='{getFixedSize()}' - layout='{new BoxLayout(limaHomeEntryBook,BoxLayout.X_AXIS)}'> + layout='{new BoxLayout(entryBookPanel, BoxLayout.X_AXIS)}'> <Table> <row> <cell weightx="0" weighty="0.1" anchor="northwest"><JLabel icon='{new ImageIcon(getClass().getResource("/images/entrybooks.png"))}'/></cell> @@ -51,8 +64,7 @@ </row> <row fill="both"> <cell columns="2" weightx="1" weighty="0.9"> - <JEditorPane id="textHomeEntryBook" - opaque="true" contentType="text/html" editable="false" UI="{new javax.swing.plaf.basic.BasicEditorPaneUI()}" background="{getGreen()}"/> + <JEditorPane javaBean='new org.chorem.lima.ui.home.EntryBooksPane(this)' /> </cell> </row> </Table> @@ -61,11 +73,12 @@ </row> <row> <cell anchor="northeast"> - <JPanel id="limaHomeFiscalYear" + <JPanel + id = 'fiscalPeriodPanel' border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}' minimumSize='{getMiniSize()}' preferredSize='{getFixedSize()}' - layout='{new BoxLayout(limaHomeFiscalYear,BoxLayout.X_AXIS)}'> + layout='{new BoxLayout(fiscalPeriodPanel, BoxLayout.X_AXIS)}'> <Table> <row> <cell weightx="0" weighty="0.1" anchor="northwest"><JLabel icon='{new ImageIcon(getClass().getResource("/images/fiscalperiods.png"))}'/></cell> @@ -73,19 +86,19 @@ </row> <row fill="both"> <cell columns="2" weightx="1" weighty="0.9"> - <JEditorPane id="textHomeFiscalYear" - opaque="true" contentType="text/html" editable="false" UI="{new javax.swing.plaf.basic.BasicEditorPaneUI()}" background="{getGreen()}"/> + <JEditorPane javaBean='new org.chorem.lima.ui.home.FiscalPeriodsPane(this)' /> </cell> </row> </Table> </JPanel> </cell> <cell anchor="northwest"> - <JPanel id="limaHomeDaily" + <JPanel + id = 'financialTransactionPanel' border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}' minimumSize='{getMiniSize()}' preferredSize='{getFixedSize()}' - layout='{new BoxLayout(limaHomeDaily,BoxLayout.X_AXIS)}'> + layout='{new BoxLayout(financialTransactionPanel, BoxLayout.X_AXIS)}'> <Table> <row> <cell weightx="0" weighty="0.1" anchor="northwest"><JLabel icon='{new ImageIcon(getClass().getResource("/images/entries.png"))}'/></cell> @@ -93,8 +106,7 @@ </row> <row fill="both"> <cell columns="2" weightx="1" weighty="0.9"> - <JEditorPane id="textHomeDaily" - opaque="true" contentType="text/html" editable="false" UI="{new javax.swing.plaf.basic.BasicEditorPaneUI()}" background="{getGreen()}"/> + <JEditorPane javaBean='new org.chorem.lima.ui.home.FinancialTransactionsPane(this)' /> </cell> </row> </Table> Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewHandler.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -1,226 +0,0 @@ -package org.chorem.lima.ui.home; - -import static org.nuiton.i18n.I18n._; -import java.awt.Color; -import java.util.List; -import javax.swing.JEditorPane; -import javax.swing.event.HyperlinkEvent; -import javax.swing.event.HyperlinkListener; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.lima.LimaContext; -import org.chorem.lima.business.AccountServiceMonitorable; -import org.chorem.lima.business.EntryBookServiceMonitorable; -import org.chorem.lima.business.FinancialTransactionServiceMonitorable; -import org.chorem.lima.business.FiscalPeriodServiceMonitorable; -import org.chorem.lima.business.LimaException; -import org.chorem.lima.entity.Account; -import org.chorem.lima.entity.EntryBook; -import org.chorem.lima.entity.FinancialTransaction; -import org.chorem.lima.entity.FiscalPeriod; -import org.chorem.lima.service.LimaServiceFactory; -import org.chorem.lima.ui.MainView; - - -public class HomeViewHandler implements HyperlinkListener { - - private static final Log log = LogFactory.getLog(HomeViewHandler.class); - - protected HomeView view; - - /* Services */ - protected AccountServiceMonitorable accountService; - protected EntryBookServiceMonitorable entryBookService; - protected FinancialTransactionServiceMonitorable financialTransactionService; - protected FiscalPeriodServiceMonitorable fiscalPeriodService; - - /* Editorpane*/ - protected JEditorPane accountPane; - protected JEditorPane entryBookPane; - protected JEditorPane fiscalYearPane; - protected JEditorPane dailyPane; - - private static Color redBackground = new Color(0xff, 0xee, 0xee); - - protected HomeViewHandler(HomeView view) { - this.view=view; - - accountService = - LimaServiceFactory.getInstance().getService(AccountServiceMonitorable.class); - entryBookService = - LimaServiceFactory.getInstance().getService(EntryBookServiceMonitorable.class); - financialTransactionService = - LimaServiceFactory.getInstance().getService(FinancialTransactionServiceMonitorable.class); - fiscalPeriodService = - LimaServiceFactory.getInstance().getService(FiscalPeriodServiceMonitorable.class); - - } - - - public void setEditorPanes() { - //Get all editorpanes - accountPane = view.getTextHomeAccount(); - entryBookPane = view.getTextHomeEntryBook(); - fiscalYearPane = view.getTextHomeFiscalYear(); - dailyPane = view.getTextHomeDaily(); - - //add hyperlink listener - accountPane.addHyperlinkListener(this); - entryBookPane.addHyperlinkListener(this); - fiscalYearPane.addHyperlinkListener(this); - dailyPane.addHyperlinkListener(this); - } - - - @Override - public void hyperlinkUpdate(HyperlinkEvent e) { - - if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { - - if (e.getDescription().equals("#accountschart")) { - MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view); - ui.getHandler().showAccountView(ui); - } - else if (e.getDescription().equals("#entrybookschart")) { - MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view); - ui.getHandler().showEntryBookView(ui); - } - else if (e.getDescription().equals("#fiscalperiodschart")) { - MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view); - ui.getHandler().showFiscalPeriodView(ui); - } - else if (e.getDescription().equals("#financialtransactionunbalanced")) { - MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view); - ui.getHandler().showTransactionUnbalancedView(ui); - } - else if (e.getDescription().equals("#financialtransactionbalanced")) { - MainView ui = LimaContext.MAIN_UI_ENTRY_DEF.getContextValue(view); - ui.getHandler().showTransactionView(ui); - } - } - - } - - - public void refresh(){ - - if (accountPane ==null){ - setEditorPanes(); - } - - String htmlBegin = "<font face='sans-serif' size=3>" - + "<p style=vertical-align:'bottom', horizontal-align:'center'>"; - String htmlEnd = "</p></font>"; - - try { - - //ACCOUNTS CHART - List<Account> accounts = accountService.getAllAccounts(); - if (accounts.size()>0){ - String accountsString = _("limahome.chartaccounts.state1_2") + " " - + accounts.size() + " " + _("limahome.chartaccounts.state2_2") - + "<br/><br/><a href='#accountschart'>" - + _("limahome.chartaccounts.modify") + "</a>"; - //set Text - accountPane.setText(htmlBegin + accountsString + htmlEnd); - } - else { - accountPane.setBackground(redBackground); - String accountsString = _("limahome.chartaccounts.nothing") - + "<br/><br/><a href='#accountschart'>" - + _("limahome.chartaccounts.create") + "</a>"; - //set Text - accountPane.setText(htmlBegin + accountsString + htmlEnd); - } - - //ENTRYBOOKS - List<EntryBook> entryBooks = entryBookService.getAllEntryBooks(); - int ebSize = entryBooks.size(); - if (ebSize>0){ - String entryBooksString=""; - if (ebSize == 1){ - entryBooksString = _("limahome.entrybooks.state.single") - + "<br/>" + entryBooks.get(0) - + "<br/><br/><a href='#entrybookschart'>" - + _("limahome.entrybooks.modify") + "</a>"; - - } - else { - entryBooksString = _("limahome.entrybooks.state1_2.plural") - + " " + entryBooks.size() + " " - + _("limahome.entrybooks.state2_2.plural") + "<ul>"; - for (EntryBook entryBook : entryBooks) { - entryBooksString += "<li>"+entryBook.getCode() + - " - "+entryBook.getLabel()+"</li>"; - } - entryBooksString += "</ul></p><p horizontal-align:'center'>" - + "<a href='#entrybookschart'>" - + _("limahome.entrybooks.modify") + "</a>"; - } - //set Text - entryBookPane.setText(htmlBegin + entryBooksString + htmlEnd); - } - else { - entryBookPane.setBackground(redBackground); - //set Text - entryBookPane.setText(htmlBegin - + _("limahome.entrybooks.nothing") - + "<br/><br/><a href='#entrybookschart'>" - + _("limahome.entrybooks.create") +"</a>" + htmlEnd); - } - - //FISCAL PERIOD - List<FiscalPeriod> fiscalPeriods = - fiscalPeriodService.getAllFiscalPeriods(); - List<FiscalPeriod> unblockedFiscalPeriods = - fiscalPeriodService.getAllUnblockedFiscalPeriods(); - if (unblockedFiscalPeriods.size()>0){ - String fiscalString = unblockedFiscalPeriods.size() + " " - + _("limahome.fiscalperiod.opened") + "<br/>" - + (fiscalPeriods.size()-unblockedFiscalPeriods.size()) - + " " + _("limahome.fiscalperiod.closed") - + "<br/><br/><a href='#fiscalperiodschart'>" - + _("limahome.fiscalperiod.modify") + "</a>"; - //set Text - fiscalYearPane.setText(htmlBegin + fiscalString + htmlEnd); - - //FINANCIAL TRANSACTION - List<FinancialTransaction> financialTransactions = - financialTransactionService. - getAllFinancialTransactionsUnbalanced(fiscalPeriods.get(0)); - if (financialTransactions.size()>0){ - dailyPane.setBackground(redBackground); - String transactionsString = financialTransactions.size() - + " " + _("limahome.transaction.unbalanced") - + "<br/><br/><a href='#financialtransactionunbalanced'>" - + _("limahome.transaction.modifiy") + "</a>"; - //set Text - dailyPane.setText(htmlBegin + transactionsString + htmlEnd); - } - else { - String transactionsString = _("limahome.transaction.balanced") - + "<br/><br/><a href='#financialtransactionbalanced'>" - + _("limahome.transaction.create") + "</a>"; - //set Text - dailyPane.setText(htmlBegin + transactionsString + htmlEnd); - } - } - else { - fiscalYearPane.setBackground(redBackground); - dailyPane.setBackground(redBackground); - String fiscalString = _("limahome.fiscalperiod.noopen"); - if (fiscalPeriods.size()>0){ - fiscalString += "<br/>" + fiscalPeriods.size() + " " - + _("limahome.fiscalperiod.closed"); - } - fiscalString += "<br/><br/><a href='#fiscalperiodschart'>" - + _("limahome.fiscalperiod.create") + "</a>"; - //set Text - fiscalYearPane.setText(htmlBegin + fiscalString + htmlEnd); - - } - } catch (LimaException eee) { - log.debug("Can't get datas home", eee); - } - } -} Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewListener.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewListener.java 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeViewListener.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -1,60 +0,0 @@ -/* *##% Lima Swing - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * ##%*/ - -package org.chorem.lima.ui.home; - -import java.awt.event.ComponentEvent; -import java.awt.event.ComponentListener; - -/** - * Listener refresh home datas when tab home is on front - */ -public class HomeViewListener implements ComponentListener { - - - private HomeView view; - - public HomeViewListener(HomeView view) { - this.view = view; - // TODO Auto-generated constructor stub - } - - @Override - public void componentHidden(ComponentEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void componentMoved(ComponentEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void componentResized(ComponentEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void componentShown(ComponentEvent e) { - view.getHandler().refresh(); - } - -} 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 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -38,7 +38,6 @@ import org.chorem.lima.business.ExportServiceMonitorable; import org.chorem.lima.business.ImportServiceMonitorable; import org.chorem.lima.business.LimaException; -import org.chorem.lima.business.ServiceListener; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.account.AccountViewHandler; import org.chorem.lima.util.DialogHelper; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java 2010-07-21 15:04:34 UTC (rev 2980) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java 2010-07-21 16:46:42 UTC (rev 2981) @@ -97,11 +97,6 @@ if (cacheDataList != null) { result = cacheDataList.size(); } - else { - if (log.isDebugEnabled()) { - log.debug("No period selected skip table model update"); - } - } return result; } @@ -230,11 +225,6 @@ } } - else { - if (log.isDebugEnabled()) { - log.debug("No fiscalPeriod selected skip table model update"); - } - } return result; }