branch develop updated (ac3b63cf -> 5a8af881)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository lima. See https://gitlab.nuiton.org/chorem/lima.git from ac3b63cf refs #1394 Ajout d'index en base de données new 290db764 refs #1394 Analyse de code new cb13e330 refs #1394 modification Copyright new d1884b54 refs #1394 onglet saisie des écriture un peu plus rapide new 5a8af881 refs #1373 mise à jour URLs The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 5a8af8814d3c0d4c5390c2f3cef8f8b4515bfaea Author: David Cossé <cosse@codelutin.com> Date: Thu Oct 26 00:49:51 2017 +0200 refs #1373 mise à jour URLs commit d1884b544de90e0e17926c253a6e13b2c12920c2 Author: David Cossé <cosse@codelutin.com> Date: Thu Oct 26 00:39:37 2017 +0200 refs #1394 onglet saisie des écriture un peu plus rapide commit cb13e3305b06b81f320e39448bf3f2747866c8e6 Author: David Cossé <cosse@codelutin.com> Date: Wed Oct 25 23:06:49 2017 +0200 refs #1394 modification Copyright commit 290db76458c77b42dab19cb6bef6cb1aedfdc97f Author: David Cossé <cosse@codelutin.com> Date: Wed Oct 25 22:59:42 2017 +0200 refs #1394 Analyse de code Summary of changes: .../main/java/org/chorem/lima/LimaXAResource.java | 6 +- .../ejb/FinancialTransactionServiceImpl.java | 4 +- .../lima/business/ejb/ReportServiceImpl.java | 4 +- .../lima/business/ejb/VatStatementServiceImpl.java | 4 +- .../lima/business/ejb/csv/AbstractLimaModel.java | 2 +- .../chorem/lima/business/ejb/csv/AccountModel.java | 4 +- .../lima/business/ejb/csv/EntryBookModel.java | 4 +- .../chorem/lima/business/ejb/csv/EntryModel.java | 16 +++--- .../ejb/csv/FinancialTransactionModel.java | 6 +- .../business/ejb/csv/FiscalControlExportModel.java | 20 +++---- .../lima/business/ejb/csv/FiscalPeriodModel.java | 4 +- .../ejb/report/BalanceReportServiceImpl.java | 9 ++- .../org/chorem/lima/entity/GeneratorHQuery.java | 32 +++++------ .../org/chorem/lima/business/AbstractLimaTest.java | 4 +- .../FinancialTransactionServiceImplTest.java | 4 +- .../lima/business/ReportServiceImplTest.java | 5 +- .../AccountCondition/AccountConditionView.jaxx | 4 +- .../java/org/chorem/lima/ui/MainViewHandler.java | 26 +++------ .../chorem/lima/ui/account/AccountViewHandler.java | 12 +--- .../lima/ui/celleditor/AccountTableCellEditor.java | 17 +++--- .../ui/celleditor/AutoCompleteTableCellEditor.java | 9 +-- .../chorem/lima/ui/combobox/AccountComboBox.java | 5 +- .../lima/ui/combobox/LeafAccountComboBoxModel.java | 7 +-- .../chorem/lima/ui/common/AbstractLimaTable.java | 18 ++---- .../lima/ui/common/AbstractLimaTableModel.java | 5 +- .../ui/common/FinancialTransactionTableModel.java | 14 ++--- .../FinancialPeriodViewHandler.java | 7 +-- .../FinancialTransactionViewHandler.java | 66 ++++++++++------------ .../chorem/lima/ui/lettering/LetteringView.jaxx | 4 +- .../lima/ui/lettering/LetteringViewHandler.java | 21 +------ .../lima/ui/vatchart/VatChartViewHandler.java | 25 ++++---- .../resources/i18n/lima-swing_fr_FR.properties | 2 +- src/site/site.xml | 2 +- 33 files changed, 152 insertions(+), 220 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See https://gitlab.nuiton.org/chorem/lima.git commit 290db76458c77b42dab19cb6bef6cb1aedfdc97f Author: David Cossé <cosse@codelutin.com> Date: Wed Oct 25 22:59:42 2017 +0200 refs #1394 Analyse de code --- .../main/java/org/chorem/lima/LimaXAResource.java | 4 +-- .../ejb/FinancialTransactionServiceImpl.java | 2 +- .../lima/business/ejb/ReportServiceImpl.java | 2 +- .../lima/business/ejb/VatStatementServiceImpl.java | 2 +- .../lima/business/ejb/csv/AbstractLimaModel.java | 2 +- .../chorem/lima/business/ejb/csv/AccountModel.java | 2 +- .../lima/business/ejb/csv/EntryBookModel.java | 2 +- .../chorem/lima/business/ejb/csv/EntryModel.java | 14 +++++----- .../ejb/csv/FinancialTransactionModel.java | 4 +-- .../business/ejb/csv/FiscalControlExportModel.java | 18 ++++++------- .../lima/business/ejb/csv/FiscalPeriodModel.java | 2 +- .../ejb/report/BalanceReportServiceImpl.java | 7 +++-- .../org/chorem/lima/entity/GeneratorHQuery.java | 30 +++++++++++----------- .../org/chorem/lima/business/AbstractLimaTest.java | 2 +- .../FinancialTransactionServiceImplTest.java | 2 +- .../lima/business/ReportServiceImplTest.java | 3 --- .../AccountCondition/AccountConditionView.jaxx | 2 +- .../java/org/chorem/lima/ui/MainViewHandler.java | 22 +++++----------- .../chorem/lima/ui/account/AccountViewHandler.java | 10 ++------ .../lima/ui/celleditor/AccountTableCellEditor.java | 15 +++++------ .../ui/celleditor/AutoCompleteTableCellEditor.java | 7 +---- .../chorem/lima/ui/combobox/AccountComboBox.java | 3 +-- .../lima/ui/combobox/LeafAccountComboBoxModel.java | 5 ++-- .../lima/ui/common/AbstractLimaTableModel.java | 3 +-- .../ui/common/FinancialTransactionTableModel.java | 12 +++------ .../FinancialPeriodViewHandler.java | 2 +- .../chorem/lima/ui/lettering/LetteringView.jaxx | 2 +- .../lima/ui/lettering/LetteringViewHandler.java | 19 ++------------ .../lima/ui/vatchart/VatChartViewHandler.java | 22 +++++++--------- 29 files changed, 84 insertions(+), 138 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java b/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java index 20dd29da..b0eaac42 100644 --- a/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java +++ b/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java @@ -42,9 +42,9 @@ import javax.transaction.xa.Xid; */ public class LimaXAResource implements XAResource { - private static Log log = LogFactory.getLog(LimaXAResource.class); + private static final Log log = LogFactory.getLog(LimaXAResource.class); - protected TopiaTransaction transaction; + protected final TopiaTransaction transaction; protected int timeout; diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java index a3417cbc..7cbb05e9 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java @@ -264,7 +264,7 @@ public class FinancialTransactionServiceImpl extends AbstractLimaService impleme EntryTopiaDao entryTopiaDao = getDaoHelper().getEntryDao(); - List<String> letters = new ArrayList<String>(entryTopiaDao.findLetters()); + List<String> letters = new ArrayList<>(entryTopiaDao.findLetters()); return letters; } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java index 3dc44297..fc1a6a56 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java @@ -294,7 +294,7 @@ public class ReportServiceImpl extends AbstractLimaService implements ReportServ Boolean getEntries, Boolean movementedFilter) { BalanceTrial balanceTrial = new BalanceTrialImpl(); - balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); + balanceTrial.setReportsDatas(new ArrayList<>()); BigDecimal credit = BigDecimal.ZERO; BigDecimal debit = BigDecimal.ZERO; BigDecimal balance = BigDecimal.ZERO; diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java index 8abfa752..c11a689a 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java @@ -355,7 +355,7 @@ public class VatStatementServiceImpl extends AbstractLimaService implements VatS //get all subVatStatement List<VatStatement> vatStatements = getAllChildrenVatStatement(vatStatement, - new ArrayList<VatStatement>()); + new ArrayList<>()); //if VatStatement have subVatStatement if (vatStatements.size() > 0) { diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AbstractLimaModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AbstractLimaModel.java index bf5e4f8a..aca5b8a8 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AbstractLimaModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AbstractLimaModel.java @@ -45,7 +45,7 @@ import java.util.Date; */ public abstract class AbstractLimaModel<E> extends AbstractImportModel<E> { - protected static String DATE_FORMAT = "dd/MM/yyyy"; + protected static final String DATE_FORMAT = "dd/MM/yyyy"; public AbstractLimaModel(char separator) { super(separator); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AccountModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AccountModel.java index 4907c468..9e0f837c 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AccountModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AccountModel.java @@ -42,7 +42,7 @@ public class AccountModel extends AbstractLimaModel<Account> implements ExportMo @Override public Iterable<ExportableColumn<Account, Object>> getColumnsForExport() { - ModelBuilder<Account> modelBuilder = new ModelBuilder<Account>(); + ModelBuilder<Account> modelBuilder = new ModelBuilder<>(); modelBuilder.newColumnForExport("accountNumber", Account.PROPERTY_ACCOUNT_NUMBER); modelBuilder.newColumnForExport("label", Account.PROPERTY_LABEL); modelBuilder.newColumnForExport("thirdParty", Account.PROPERTY_THIRD_PARTY); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryBookModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryBookModel.java index 42df565e..4d081368 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryBookModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryBookModel.java @@ -41,7 +41,7 @@ public class EntryBookModel extends AbstractLimaModel<EntryBook> implements Expo @Override public Iterable<ExportableColumn<EntryBook, Object>> getColumnsForExport() { - ModelBuilder<EntryBook> modelBuilder = new ModelBuilder<EntryBook>(); + ModelBuilder<EntryBook> modelBuilder = new ModelBuilder<>(); modelBuilder.newColumnForExport("code", EntryBook.PROPERTY_CODE); modelBuilder.newColumnForExport("label", EntryBook.PROPERTY_LABEL); return (Iterable) modelBuilder.getColumnsForExport(); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryModel.java index 0a1e236c..4b061907 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryModel.java @@ -51,10 +51,10 @@ public class EntryModel extends AbstractLimaModel<Entry> implements ExportModel< public static final String PROPERTY_ENTRY_BOOK = Entry.PROPERTY_FINANCIAL_TRANSACTION + "." + FinancialTransaction.PROPERTY_ENTRY_BOOK + "." + EntryBook.PROPERTY_CODE; public static final String PROPERTY_DATE = Entry.PROPERTY_FINANCIAL_TRANSACTION + "." + FinancialTransaction.PROPERTY_TRANSACTION_DATE; - protected FinancialTransactionService financialTransactionService; - protected AccountService accountService; - protected EntryBookService entryBookService; - protected boolean humanReadable; + protected final FinancialTransactionService financialTransactionService; + protected final AccountService accountService; + protected final EntryBookService entryBookService; + protected final boolean humanReadable; public EntryModel(AccountService accountService, EntryBookService entryBookService, FinancialTransactionService financialTransactionService, boolean humanReadable) { super(';'); @@ -105,7 +105,7 @@ public class EntryModel extends AbstractLimaModel<Entry> implements ExportModel< protected class FinancialTransactionParser implements ValueParser<FinancialTransaction> { - Map<Integer, FinancialTransaction> transactionByNums = Maps.newHashMap(); + final Map<Integer, FinancialTransaction> transactionByNums = Maps.newHashMap(); @Override public FinancialTransaction parse(String value) { @@ -141,7 +141,7 @@ public class EntryModel extends AbstractLimaModel<Entry> implements ExportModel< protected class EntryBookParser implements ValueParser<EntryBook> { - protected Map<String, EntryBook> entryBookByCode; + protected final Map<String, EntryBook> entryBookByCode; public EntryBookParser() { entryBookByCode = Maps.newHashMap(); @@ -164,7 +164,7 @@ public class EntryModel extends AbstractLimaModel<Entry> implements ExportModel< protected class financialTransactionFormatter implements ValueFormatter<FinancialTransaction> { - Map<FinancialTransaction, Integer> numByTransactions = Maps.newHashMap(); + final Map<FinancialTransaction, Integer> numByTransactions = Maps.newHashMap(); int nextNum = 0; diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FinancialTransactionModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FinancialTransactionModel.java index 1f75b67a..a234f47c 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FinancialTransactionModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FinancialTransactionModel.java @@ -38,7 +38,7 @@ import org.nuiton.csv.ValueParser; */ public class FinancialTransactionModel extends AbstractLimaModel<FinancialTransaction> implements ExportModel<FinancialTransaction> { - protected EntryBookService entryBookService; + protected final EntryBookService entryBookService; public FinancialTransactionModel(EntryBookService entryBookService) { super(';'); @@ -50,7 +50,7 @@ public class FinancialTransactionModel extends AbstractLimaModel<FinancialTransa @Override public Iterable<ExportableColumn<FinancialTransaction, Object>> getColumnsForExport() { - ModelBuilder<FinancialTransaction> modelBuilder = new ModelBuilder<FinancialTransaction>(); + ModelBuilder<FinancialTransaction> modelBuilder = new ModelBuilder<>(); modelBuilder.newColumnForExport("id", FinancialTransaction.PROPERTY_TOPIA_ID); modelBuilder.newColumnForExport("transactionDate", FinancialTransaction.PROPERTY_TRANSACTION_DATE, DATE_FORMATTER); modelBuilder.newColumnForExport("entryBook", FinancialTransaction.PROPERTY_ENTRY_BOOK, ENTRY_BOOK_TO_ENTRY_BOOK_CODE_FORMATTER); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java index e1dcccb9..8390e0d3 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java @@ -44,14 +44,14 @@ import java.util.Map; */ public class FiscalControlExportModel implements ExportModel<Entry> { - protected static String PROPERTY_ENTRY_BOOK_CODE = Entry.PROPERTY_FINANCIAL_TRANSACTION + "." + FinancialTransaction.PROPERTY_ENTRY_BOOK + "." + EntryBook.PROPERTY_CODE; - protected static String PROPERTY_ENTRY_BOOK_LABEL = Entry.PROPERTY_FINANCIAL_TRANSACTION + "." + FinancialTransaction.PROPERTY_ENTRY_BOOK + "." + EntryBook.PROPERTY_LABEL; - protected static String PROPERTY_DATE = Entry.PROPERTY_FINANCIAL_TRANSACTION + "." + FinancialTransaction.PROPERTY_TRANSACTION_DATE; - protected static String PROPERTY_ACCOUNT_NUMBER = Entry.PROPERTY_ACCOUNT + "." + Account.PROPERTY_ACCOUNT_NUMBER; - protected static String PROPERTY_ACCOUNT_LABEL = Entry.PROPERTY_ACCOUNT + "." + Account.PROPERTY_LABEL; + protected static final String PROPERTY_ENTRY_BOOK_CODE = Entry.PROPERTY_FINANCIAL_TRANSACTION + "." + FinancialTransaction.PROPERTY_ENTRY_BOOK + "." + EntryBook.PROPERTY_CODE; + protected static final String PROPERTY_ENTRY_BOOK_LABEL = Entry.PROPERTY_FINANCIAL_TRANSACTION + "." + FinancialTransaction.PROPERTY_ENTRY_BOOK + "." + EntryBook.PROPERTY_LABEL; + protected static final String PROPERTY_DATE = Entry.PROPERTY_FINANCIAL_TRANSACTION + "." + FinancialTransaction.PROPERTY_TRANSACTION_DATE; + protected static final String PROPERTY_ACCOUNT_NUMBER = Entry.PROPERTY_ACCOUNT + "." + Account.PROPERTY_ACCOUNT_NUMBER; + protected static final String PROPERTY_ACCOUNT_LABEL = Entry.PROPERTY_ACCOUNT + "." + Account.PROPERTY_LABEL; - protected static ValueGetter<Entry, String> EMPTY_GETTER = new ValueGetter<Entry, String>() { + protected static final ValueGetter<Entry, String> EMPTY_GETTER = new ValueGetter<Entry, String>() { @Override public String get(Entry object) throws Exception { return ""; @@ -80,7 +80,7 @@ public class FiscalControlExportModel implements ExportModel<Entry> { } }; - protected static ValueGetter<Entry, String> DEBIT_GETTER = new ValueGetter<Entry, String>() { + protected static final ValueGetter<Entry, String> DEBIT_GETTER = new ValueGetter<Entry, String>() { @Override public String get(Entry entry) throws Exception { String result = ""; @@ -91,7 +91,7 @@ public class FiscalControlExportModel implements ExportModel<Entry> { } }; - protected static ValueGetter<Entry, String> CREDIT_GETTER = new ValueGetter<Entry, String>() { + protected static final ValueGetter<Entry, String> CREDIT_GETTER = new ValueGetter<Entry, String>() { @Override public String get(Entry entry) throws Exception { String result = ""; @@ -137,7 +137,7 @@ public class FiscalControlExportModel implements ExportModel<Entry> { protected class FinancialTransactionFormatter implements ValueFormatter<FinancialTransaction> { - Map<FinancialTransaction, Integer> numByTransactions = Maps.newHashMap(); + final Map<FinancialTransaction, Integer> numByTransactions = Maps.newHashMap(); int nextNum = 0; @Override diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalPeriodModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalPeriodModel.java index 3d905618..66dd7303 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalPeriodModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalPeriodModel.java @@ -42,7 +42,7 @@ public class FiscalPeriodModel extends AbstractLimaModel<FiscalPeriod> implement @Override public Iterable<ExportableColumn<FiscalPeriod, Object>> getColumnsForExport() { - ModelBuilder<FiscalPeriod> modelBuilder = new ModelBuilder<FiscalPeriod>(); + ModelBuilder<FiscalPeriod> modelBuilder = new ModelBuilder<>(); modelBuilder.newColumnForExport("beginDate", FiscalPeriod.PROPERTY_BEGIN_DATE, DATE_FORMATTER); modelBuilder.newColumnForExport("endDate", FiscalPeriod.PROPERTY_END_DATE, DATE_FORMATTER); modelBuilder.newColumnForExport("locked", FiscalPeriod.PROPERTY_LOCKED, O_N_FORMATTER); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java index 9f3ec877..3cd5506c 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java @@ -32,7 +32,6 @@ import org.chorem.lima.beans.BalanceAccountImpl; import org.chorem.lima.beans.BalanceTrial; import org.chorem.lima.beans.BalanceTrialImpl; import org.chorem.lima.beans.DocumentReport; -import org.chorem.lima.beans.ReportsDatas; import org.chorem.lima.business.api.AccountService; import org.chorem.lima.business.api.FinancialPeriodService; import org.chorem.lima.business.api.IdentityService; @@ -101,7 +100,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal BalanceGlobalResult balanceGlobalResult = new BalanceGlobalResult().invoke(); BalanceTrial balanceTrial = new BalanceTrialImpl(); - balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); + balanceTrial.setReportsDatas(new ArrayList<>()); List<Account> accounts = getAccounts(selectedAccounts); @@ -148,7 +147,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal BalanceGlobalResult balanceGlobalResult = new BalanceGlobalResult().invoke(); BalanceTrial balanceTrial = new BalanceTrialImpl(); - balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); + balanceTrial.setReportsDatas(new ArrayList<>()); List<Account> accounts = getAccounts(selectedAccounts); @@ -279,7 +278,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal accountSubAccounts = new BalanceAccountImpl(); accountSubAccounts.setFormatter(bigDecimalFormat); accountSubAccounts.setSubReport(subAccountsJasperReport); - accountSubAccounts.setSubAccounts(new ArrayList<BalanceAccount>()); + accountSubAccounts.setSubAccounts(new ArrayList<>()); accountsByClasses.put(accountClass, accountSubAccounts); returnedAccounts.add(accountSubAccounts); } diff --git a/lima-business/src/main/java/org/chorem/lima/entity/GeneratorHQuery.java b/lima-business/src/main/java/org/chorem/lima/entity/GeneratorHQuery.java index c3a528fb..c060724d 100644 --- a/lima-business/src/main/java/org/chorem/lima/entity/GeneratorHQuery.java +++ b/lima-business/src/main/java/org/chorem/lima/entity/GeneratorHQuery.java @@ -57,29 +57,29 @@ public class GeneratorHQuery implements VisitorFilter, VisitorClause { protected String whereClause; - protected Map<String, Object> parameters; + protected final Map<String, Object> parameters; - protected Map<String, Integer> parametersCount; + protected final Map<String, Integer> parametersCount; - protected Map<Filter, String> aliasMap; + protected final Map<Filter, String> aliasMap; - protected Map<String, Integer> aliasCount; + protected final Map<String, Integer> aliasCount; - protected Deque<String> fromClauseStack; - protected Deque<String> whereClauseStak; + protected final Deque<String> fromClauseStack; + protected final Deque<String> whereClauseStak; - protected Deque<Filter> filterStack; + protected final Deque<Filter> filterStack; public GeneratorHQuery() { fromClause = ""; whereClause = ""; - parameters = new HashMap<String, Object>(); - parametersCount = new HashMap<String, Integer>(); - aliasMap = new HashMap<Filter, String>(); - aliasCount = new HashMap<String, Integer>(); - filterStack = new LinkedList<Filter>(); - fromClauseStack = new LinkedList<String>(); - whereClauseStak = new LinkedList<String>(); + parameters = new HashMap<>(); + parametersCount = new HashMap<>(); + aliasMap = new HashMap<>(); + aliasCount = new HashMap<>(); + filterStack = new LinkedList<>(); + fromClauseStack = new LinkedList<>(); + whereClauseStak = new LinkedList<>(); } protected String addParameter(Object value) { @@ -117,7 +117,7 @@ public class GeneratorHQuery implements VisitorFilter, VisitorClause { } public List<Object> getArguments() { - List<Object> result = new ArrayList<Object>(); + List<Object> result = new ArrayList<>(); for (Map.Entry<String, Object> entry : parameters.entrySet()) { result.add(entry.getKey()); result.add(entry.getValue()); diff --git a/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java b/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java index a42dc57e..ae268673 100644 --- a/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java +++ b/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java @@ -83,7 +83,7 @@ public abstract class AbstractLimaTest { } }; - protected static DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.ENGLISH); + protected static final DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.ENGLISH); protected static final String LIMA_TEST_DEFAULT_CONF_FILENAME = "lima-test.properties"; protected AccountService accountService; diff --git a/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java b/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java index 945df443..d2f08074 100644 --- a/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java +++ b/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java @@ -849,7 +849,7 @@ public class FinancialTransactionServiceImplTest extends AbstractLimaTest { nextLetter = instance.findLastLetter(Arrays.asList("zzz", "ABC", "DEF")); Assert.assertEquals("DEF", nextLetter); - nextLetter = instance.findLastLetter(new ArrayList<String>()); + nextLetter = instance.findLastLetter(new ArrayList<>()); Assert.assertEquals("", nextLetter); } } diff --git a/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java b/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java index 1907fdba..fab4b0a1 100644 --- a/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java +++ b/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java @@ -31,7 +31,6 @@ import org.chorem.lima.entity.FinancialTransaction; import org.chorem.lima.entity.FinancialTransactionImpl; import org.junit.Assert; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import java.math.BigDecimal; @@ -40,10 +39,8 @@ import java.util.Date; /** * Test le service de génération des reports. * - * FIXME echatellier 20120424 les tests sont désactivés car le code qui genere * les rapports dans ReportService est commenté. */ -@Ignore public class ReportServiceImplTest extends AbstractLimaTest { @Before diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionView.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionView.jaxx index f50fecd6..6abd6aa2 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionView.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionView.jaxx @@ -36,6 +36,6 @@ <AccountComboBox id="accountComboBox" constraints="BorderLayout.CENTER" - onPropertyChange="{getHandler().accountComboBoxChange(event);}"/> + onPropertyChange="getHandler().accountComboBoxChange(event);"/> </JInternalFrame> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java index 5cc9c320..0ae0c559 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java @@ -171,12 +171,7 @@ public class MainViewHandler { ConfigUIHelper helper = new ConfigUIHelper(config); - helper.registerCallBack(LimaSwingConfig.Option.COLOR_SELECTION_FOCUS.getKey(), t("lima.config.color.selection.focus"), new ImageIcon(), new Runnable() { - @Override - public void run() { - UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(config.getColorSelectionFocus(), 2))); - } - }); + helper.registerCallBack(LimaSwingConfig.Option.COLOR_SELECTION_FOCUS.getKey(), t("lima.config.color.selection.focus"), new ImageIcon(), () -> UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(config.getColorSelectionFocus(), 2)))); helper.addCategory(t("lima.config.category.directories"), t("lima.config.category.directories.description")); helper.addOption(LimaSwingConfig.Option.CONFIG_FILE); @@ -570,15 +565,12 @@ public class MainViewHandler { contentTabbedPane.setSelectedComponent(container); contentTabbedPane.setTabComponentAt( contentTabbedPane.indexOfTab(name), closableHeader); - closableHeader.getCloseTab().addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - JButton button = (JButton) e.getSource(); - ClosableTabHeader closableTab = - (ClosableTabHeader) button.getParent(); - String name = closableTab.getTitle(); - contentTabbedPane.remove(contentTabbedPane.indexOfTab(name)); - } + closableHeader.getCloseTab().addActionListener(e -> { + JButton button = (JButton) e.getSource(); + ClosableTabHeader closableTab = + (ClosableTabHeader) button.getParent(); + String name1 = closableTab.getTitle(); + contentTabbedPane.remove(contentTabbedPane.indexOfTab(name1)); }); // if contentTabbedPane contains tab } else { diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java index 39778692..8143b581 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java @@ -48,12 +48,7 @@ import org.jdesktop.swingx.treetable.DefaultTreeTableModel; import org.jdesktop.swingx.treetable.MutableTreeTableNode; import org.jdesktop.swingx.treetable.TreeTableNode; -import javax.swing.AbstractAction; -import javax.swing.ActionMap; -import javax.swing.InputMap; -import javax.swing.JComponent; -import javax.swing.JOptionPane; -import javax.swing.KeyStroke; +import javax.swing.*; import javax.swing.tree.TreePath; import java.awt.event.ActionEvent; import java.awt.event.InputEvent; @@ -62,7 +57,6 @@ 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; import java.util.List; import java.util.Map; @@ -214,7 +208,7 @@ public class AccountViewHandler implements ServiceListener { protected void loadAllAccounts() { // default data load List<Account> accounts = accountService.getAllAccounts(); - Collections.sort(accounts, ACCOUNT_LENGTH_COMPARATOR); + accounts.sort(ACCOUNT_LENGTH_COMPARATOR); if (log.isDebugEnabled()) { log.debug(String.format("Loaded %d accounts from service", accounts.size())); } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java index 799a1d09..487075e3 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java @@ -132,15 +132,12 @@ public class AccountTableCellEditor extends AbstractCellEditor implements TableC // Empèche la touche echap if (keyEvent.getKeyChar() != KeyEvent.VK_ESCAPE) { // Permet de placer le focus sur l'editor de la comboBox - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - accountComboBox.getCombobox().getEditor().getEditorComponent().requestFocus(); - JTextComponent edit = (JTextComponent) accountComboBox.getCombobox().getEditor().getEditorComponent(); - edit.requestFocus(); - if (!Character.isIdentifierIgnorable(keyEvent.getKeyChar())) { - edit.setText(Character.toString(keyEvent.getKeyChar())); - } + SwingUtilities.invokeLater(() -> { + accountComboBox.getCombobox().getEditor().getEditorComponent().requestFocus(); + JTextComponent edit = (JTextComponent) accountComboBox.getCombobox().getEditor().getEditorComponent(); + edit.requestFocus(); + if (!Character.isIdentifierIgnorable(keyEvent.getKeyChar())) { + edit.setText(Character.toString(keyEvent.getKeyChar())); } }); } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java index b642fada..8c39a877 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java @@ -39,12 +39,7 @@ public class AutoCompleteTableCellEditor extends StringTableCellEditor { List<String> precedingValues; public AutoCompleteTableCellEditor(String id) { - precedingValues = PRECEDING_VALUES_BY_ID.get(id); - - if (precedingValues == null) { - precedingValues = Lists.newLinkedList(); - PRECEDING_VALUES_BY_ID.put(id, precedingValues); - } + precedingValues = PRECEDING_VALUES_BY_ID.computeIfAbsent(id, k -> Lists.newLinkedList()); AutoCompleteDecorator.decorate(getComponent(), precedingValues, false); } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBox.java b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBox.java index be46e167..23b6896a 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBox.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBox.java @@ -34,7 +34,6 @@ import org.chorem.lima.business.utils.AccountComparator; import org.chorem.lima.entity.Account; import org.nuiton.decorator.DecoratorUtil; -import java.util.Collections; import java.util.List; /** @@ -75,7 +74,7 @@ public class AccountComboBox extends BeanFilterableComboBox<Account> implements public List<Account> getDataList() { List<Account> result = leafAccounts ? accountService.getAllLeafAccounts() : accountService.getAllAccounts(); - Collections.sort(result, new AccountComparator()); + result.sort(new AccountComparator()); return result; } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java index a8a9e553..2c98e042 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java @@ -22,15 +22,14 @@ package org.chorem.lima.ui.combobox; +import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.AccountService; import org.chorem.lima.business.api.ImportService; import org.chorem.lima.business.utils.AccountComparator; import org.chorem.lima.entity.Account; -import org.chorem.lima.business.LimaServiceFactory; import javax.swing.*; -import java.util.Collections; import java.util.List; /** @@ -77,7 +76,7 @@ public class LeafAccountComboBoxModel extends AbstractListModel implements Combo public List<Account> getDataList() { List<Account> result = accountService.getAllLeafAccounts(); - Collections.sort(result, new AccountComparator()); + result.sort(new AccountComparator()); return result; } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTableModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTableModel.java index 29b0a63f..a05b0fb4 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTableModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTableModel.java @@ -28,7 +28,6 @@ import org.chorem.lima.util.ErrorHelper; import javax.swing.table.AbstractTableModel; import java.util.Collection; -import java.util.Collections; import java.util.Comparator; import java.util.List; @@ -68,7 +67,7 @@ public abstract class AbstractLimaTableModel<E> extends AbstractTableModel { public void sort() { if (comparator != null) { - Collections.sort(values, comparator); + values.sort(comparator); fireTableDataChanged(); } } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java index 6a677fb5..4b50b800 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java @@ -216,15 +216,9 @@ public class FinancialTransactionTableModel extends TableModelWithGroup<Entry> i Boolean locked = isGlobalyLocked == null ? lockedByTransaction.get(transaction) : isGlobalyLocked; if (locked == null) { - ClosedPeriodicEntryBook closedPeriodicEntryBook = closedPeriodicEntryBookForTransaction.get(transaction); - - if (closedPeriodicEntryBook == null) { - closedPeriodicEntryBook = - closedPeriodicEntryBookService.getByEntryBookAndFinancialPeriod( - transaction.getEntryBook(), - transaction.getTransactionDate()); - closedPeriodicEntryBookForTransaction.put(transaction, closedPeriodicEntryBook); - } + ClosedPeriodicEntryBook closedPeriodicEntryBook = closedPeriodicEntryBookForTransaction.computeIfAbsent(transaction, t -> closedPeriodicEntryBookService.getByEntryBookAndFinancialPeriod( + t.getEntryBook(), + t.getTransactionDate())); if (log.isDebugEnabled()) { log.debug("transaction " + transaction.getTransactionDate() + " : " + closedPeriodicEntryBook.isLocked()); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java index 4710d8e5..d17ced77 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java @@ -103,7 +103,7 @@ public class FinancialPeriodViewHandler implements ServiceListener { // get data from service List<ClosedPeriodicEntryBook> closedPeriodicEntryBooks = financialPeriodService. getAllClosedPeriodicEntryBooksFromUnblockedFiscalPeriod(); - Collections.sort(closedPeriodicEntryBooks, new FinancialPeriodComparator()); + closedPeriodicEntryBooks.sort(new FinancialPeriodComparator()); if (log.isDebugEnabled()) { log.debug(String.format("Loaded %d closed periodic entry book", closedPeriodicEntryBooks.size())); } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx index cdb89e2e..a7796633 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx @@ -64,7 +64,7 @@ <JLabel id="accountLabel"/> <AccountComboBox id="accountComboBox" constraints="BorderLayout.CENTER" - onPropertyChange="{getHandler().accountComboBoxChange(event);}"/> + onPropertyChange="getHandler().accountComboBoxChange(event);"/> <JButton id="back" onActionPerformed="handler.back(accountComboBox)"/> <JButton id="next" diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java index 5c2df815..13c41389 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java @@ -22,8 +22,6 @@ package org.chorem.lima.ui.lettering; -import com.google.common.base.Predicate; -import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import jaxx.runtime.SwingUtil; import org.apache.commons.lang3.time.DateUtils; @@ -50,12 +48,7 @@ import org.chorem.lima.ui.combobox.AccountComboBox; import org.chorem.lima.util.BigDecimalToString; import org.chorem.lima.util.ErrorHelper; -import javax.swing.AbstractAction; -import javax.swing.ActionMap; -import javax.swing.InputMap; -import javax.swing.JComboBox; -import javax.swing.JComponent; -import javax.swing.KeyStroke; +import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; @@ -619,15 +612,7 @@ public class LetteringViewHandler{ for (final Entry entry : entries) { - Entry oldEntry = Iterables.find( - tableModel.getValues(), - new Predicate<Entry>() { - @Override - public boolean apply(Entry input) { - return input.getTopiaId().equals(entry.getTopiaId()); - } - }, - null); + Entry oldEntry = tableModel.getValues().stream().filter(input -> input.getTopiaId().equals(entry.getTopiaId())).findFirst().orElseGet(() -> null); if (oldEntry != null) { int indexEntry = tableModel.indexOf(oldEntry); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java index 753c563e..0ca0dfed 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java @@ -191,20 +191,16 @@ public class VatChartViewHandler implements ServiceListener { if (colorLine != null) { view.getVatTreeTable().removeHighlighter(colorLine); } - HighlightPredicate predicate = new HighlightPredicate() { - @Override - public boolean isHighlighted(Component renderer, - ComponentAdapter adapter) { - JXTreeTable vatTreeTable = view.getVatTreeTable(); - TreePath treePath = vatTreeTable.getPathForRow(adapter.row); - MutableTreeTableNode vatStatementNode = (MutableTreeTableNode) treePath.getLastPathComponent(); - VatStatement vatStatement = (VatStatement) vatStatementNode.getUserObject(); - boolean highlighted = false; - if (!vatStatement.isHeader()) { - highlighted = StringUtils.isBlank(vatStatement.getBoxName()); - } - return highlighted; + HighlightPredicate predicate = (renderer, adapter) -> { + JXTreeTable vatTreeTable = view.getVatTreeTable(); + TreePath treePath = vatTreeTable.getPathForRow(adapter.row); + MutableTreeTableNode vatStatementNode = (MutableTreeTableNode) treePath.getLastPathComponent(); + VatStatement vatStatement = (VatStatement) vatStatementNode.getUserObject(); + boolean highlighted = false; + if (!vatStatement.isHeader()) { + highlighted = StringUtils.isBlank(vatStatement.getBoxName()); } + return highlighted; }; colorLine = new ColorHighlighter(predicate, new Color(255, 198, 209), null); view.getVatTreeTable().addHighlighter(colorLine); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See https://gitlab.nuiton.org/chorem/lima.git commit cb13e3305b06b81f320e39448bf3f2747866c8e6 Author: David Cossé <cosse@codelutin.com> Date: Wed Oct 25 23:06:49 2017 +0200 refs #1394 modification Copyright --- .../src/main/java/org/chorem/lima/LimaXAResource.java | 2 +- .../business/ejb/FinancialTransactionServiceImpl.java | 2 +- .../chorem/lima/business/ejb/ReportServiceImpl.java | 2 +- .../lima/business/ejb/VatStatementServiceImpl.java | 2 +- .../org/chorem/lima/business/ejb/csv/AccountModel.java | 2 +- .../chorem/lima/business/ejb/csv/EntryBookModel.java | 2 +- .../org/chorem/lima/business/ejb/csv/EntryModel.java | 2 +- .../business/ejb/csv/FinancialTransactionModel.java | 2 +- .../business/ejb/csv/FiscalControlExportModel.java | 2 +- .../lima/business/ejb/csv/FiscalPeriodModel.java | 2 +- .../business/ejb/report/BalanceReportServiceImpl.java | 2 +- .../java/org/chorem/lima/entity/GeneratorHQuery.java | 2 +- .../org/chorem/lima/business/AbstractLimaTest.java | 2 +- .../business/FinancialTransactionServiceImplTest.java | 2 +- .../chorem/lima/business/ReportServiceImplTest.java | 2 +- .../Filter/AccountCondition/AccountConditionView.jaxx | 2 +- .../main/java/org/chorem/lima/ui/MainViewHandler.java | 4 +--- .../org/chorem/lima/ui/account/AccountViewHandler.java | 2 +- .../lima/ui/celleditor/AccountTableCellEditor.java | 2 +- .../ui/celleditor/AutoCompleteTableCellEditor.java | 2 +- .../org/chorem/lima/ui/combobox/AccountComboBox.java | 2 +- .../lima/ui/combobox/LeafAccountComboBoxModel.java | 2 +- .../org/chorem/lima/ui/common/AbstractLimaTable.java | 18 ++++++------------ .../chorem/lima/ui/common/AbstractLimaTableModel.java | 2 +- .../lima/ui/common/FinancialTransactionTableModel.java | 2 +- .../ui/financialperiod/FinancialPeriodViewHandler.java | 5 ++--- .../org/chorem/lima/ui/lettering/LetteringView.jaxx | 2 +- .../chorem/lima/ui/lettering/LetteringViewHandler.java | 2 +- .../chorem/lima/ui/vatchart/VatChartViewHandler.java | 3 +-- 29 files changed, 35 insertions(+), 45 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java b/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java index b0eaac42..d50f7b39 100644 --- a/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java +++ b/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java @@ -2,7 +2,7 @@ * #%L * Lima :: business * %% - * Copyright (C) 2012 Codelutin, Chatellier Eric + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java index 7cbb05e9..bbc22596 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java @@ -2,7 +2,7 @@ * #%L * Lima :: business * %% - * Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric + * Copyright (C) 2008 - 2017 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 diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java index fc1a6a56..1c41ecde 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java @@ -2,7 +2,7 @@ * #%L * Lima :: business * %% - * Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric + * Copyright (C) 2008 - 2017 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 diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java index c11a689a..ca575cbb 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java @@ -2,7 +2,7 @@ * #%L * Lima :: business * %% - * Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric + * Copyright (C) 2008 - 2017 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 diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AccountModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AccountModel.java index 9e0f837c..8cfe399a 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AccountModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/AccountModel.java @@ -4,7 +4,7 @@ package org.chorem.lima.business.ejb.csv; * #%L * Lima :: business * %% - * Copyright (C) 2008 - 2014 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryBookModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryBookModel.java index 4d081368..aee9525f 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryBookModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryBookModel.java @@ -4,7 +4,7 @@ package org.chorem.lima.business.ejb.csv; * #%L * Lima :: business * %% - * Copyright (C) 2008 - 2014 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryModel.java index 4b061907..57197bac 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/EntryModel.java @@ -4,7 +4,7 @@ package org.chorem.lima.business.ejb.csv; * #%L * Lima :: business * %% - * Copyright (C) 2008 - 2014 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FinancialTransactionModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FinancialTransactionModel.java index a234f47c..27bd6831 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FinancialTransactionModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FinancialTransactionModel.java @@ -4,7 +4,7 @@ package org.chorem.lima.business.ejb.csv; * #%L * Lima :: business * %% - * Copyright (C) 2008 - 2014 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java index 8390e0d3..5a35e5f3 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java @@ -4,7 +4,7 @@ package org.chorem.lima.business.ejb.csv; * #%L * Lima :: business * %% - * Copyright (C) 2008 - 2014 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalPeriodModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalPeriodModel.java index 66dd7303..a7301a6f 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalPeriodModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalPeriodModel.java @@ -4,7 +4,7 @@ package org.chorem.lima.business.ejb.csv; * #%L * Lima :: business * %% - * Copyright (C) 2008 - 2014 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java index 3cd5506c..c98d2a7a 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java @@ -4,7 +4,7 @@ package org.chorem.lima.business.ejb.report; * #%L * Lima :: business * %% - * Copyright (C) 2008 - 2014 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-business/src/main/java/org/chorem/lima/entity/GeneratorHQuery.java b/lima-business/src/main/java/org/chorem/lima/entity/GeneratorHQuery.java index c060724d..99608d33 100644 --- a/lima-business/src/main/java/org/chorem/lima/entity/GeneratorHQuery.java +++ b/lima-business/src/main/java/org/chorem/lima/entity/GeneratorHQuery.java @@ -4,7 +4,7 @@ package org.chorem.lima.entity; * #%L * Lima :: callao * %% - * Copyright (C) 2008 - 2013 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java b/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java index ae268673..26b0b684 100644 --- a/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java +++ b/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java @@ -2,7 +2,7 @@ * #%L * Lima :: business * %% - * Copyright (C) 2011 - 2012 Codelutin, Chatellier Eric + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java b/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java index d2f08074..087caaec 100644 --- a/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java +++ b/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java @@ -2,7 +2,7 @@ * #%L * Lima :: business * %% - * Copyright (C) 2012 Codelutin, Chatellier Eric + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java b/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java index fab4b0a1..5a57e163 100644 --- a/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java +++ b/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java @@ -2,7 +2,7 @@ * #%L * Lima :: business * %% - * Copyright (C) 2012 CodeLutin, Chatellier Eric + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionView.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionView.jaxx index 6abd6aa2..3cd487c1 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionView.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionView.jaxx @@ -2,7 +2,7 @@ #%L Lima :: Swing %% - Copyright (C) 2008 - 2010 CodeLutin + Copyright (C) 2008 - 2017 CodeLutin %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java index 0ae0c559..97123a23 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java @@ -2,7 +2,7 @@ * #%L * Lima :: Swing * %% - * Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric + * Copyright (C) 2008 - 2017 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 @@ -60,8 +60,6 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.plaf.BorderUIResource; import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.io.File; import java.net.URI; import java.net.URL; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java index 8143b581..9c2a2a01 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java @@ -2,7 +2,7 @@ * #%L * Lima :: Swing * %% - * Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric + * Copyright (C) 2008 - 2017 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 diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java index 487075e3..e8c6abc1 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java @@ -2,7 +2,7 @@ * #%L * Lima :: Swing * %% - * Copyright (C) 2008 - 2012 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java index 8c39a877..a6ed70c2 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java @@ -4,7 +4,7 @@ package org.chorem.lima.ui.celleditor; * #%L * Lima :: Swing * %% - * Copyright (C) 2008 - 2014 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBox.java b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBox.java index 23b6896a..3bed772c 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBox.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBox.java @@ -4,7 +4,7 @@ package org.chorem.lima.ui.combobox; * #%L * Lima :: Swing * %% - * Copyright (C) 2008 - 2015 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java index 2c98e042..62ee2734 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java @@ -2,7 +2,7 @@ * #%L * Lima :: Swing * %% - * Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric + * Copyright (C) 2008 - 2017 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 diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTable.java b/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTable.java index ad9a46b7..2bb1ef2f 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTable.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTable.java @@ -4,7 +4,7 @@ package org.chorem.lima.ui.common; * #%L * Lima :: Swing * %% - * Copyright (C) 2008 - 2014 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as @@ -24,22 +24,16 @@ package org.chorem.lima.ui.common; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.chorem.lima.entity.Account; -import org.chorem.lima.entity.EntryBook; -import org.chorem.lima.ui.celleditor.AccountTableCellEditor; -import org.chorem.lima.ui.celleditor.AccountTableCellRenderer; import org.chorem.lima.ui.celleditor.BigDecimalTableCellEditor; import org.chorem.lima.ui.celleditor.BigDecimalTableCellRenderer; import org.chorem.lima.ui.celleditor.DateLimaTableCellRenderer; import org.chorem.lima.ui.celleditor.DefaultLimaTableCellRenderer; -import org.chorem.lima.ui.celleditor.EntryBookTableCellEditor; -import org.chorem.lima.ui.celleditor.EntryBookTableCellRender; import org.chorem.lima.ui.celleditor.StringTableCellEditor; import org.jdesktop.swingx.JXTable; import javax.swing.table.TableCellEditor; import javax.swing.table.TableModel; -import java.awt.Color; +import java.awt.*; import java.math.BigDecimal; import java.util.Date; @@ -67,13 +61,13 @@ public abstract class AbstractLimaTable<H> extends JXTable { setDefaultRenderer(Object.class, new DefaultLimaTableCellRenderer()); setDefaultRenderer(Date.class, new DateLimaTableCellRenderer()); setDefaultRenderer(BigDecimal.class, new BigDecimalTableCellRenderer()); - setDefaultRenderer(Account.class, new AccountTableCellRenderer()); - setDefaultRenderer(EntryBook.class, new EntryBookTableCellRender()); +// setDefaultRenderer(Account.class, new AccountTableCellRenderer()); +// setDefaultRenderer(EntryBook.class, new EntryBookTableCellRender()); // editor setDefaultEditor(BigDecimal.class, new BigDecimalTableCellEditor()); - setDefaultEditor(Account.class, new AccountTableCellEditor()); - setDefaultEditor(EntryBook.class, new EntryBookTableCellEditor()); +// setDefaultEditor(Account.class, new AccountTableCellEditor()); +// setDefaultEditor(EntryBook.class, new EntryBookTableCellEditor()); setDefaultEditor(String.class, new StringTableCellEditor()); setShowHorizontalLines(false); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTableModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTableModel.java index a05b0fb4..18152a93 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTableModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTableModel.java @@ -4,7 +4,7 @@ package org.chorem.lima.ui.common; * #%L * Lima :: Swing * %% - * Copyright (C) 2008 - 2014 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java index 4b50b800..ecbfd933 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java @@ -4,7 +4,7 @@ package org.chorem.lima.ui.common; * #%L * Lima :: Swing * %% - * Copyright (C) 2008 - 2014 CodeLutin + * Copyright (C) 2008 - 2017 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java index d17ced77..537df39b 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java @@ -2,7 +2,7 @@ * #%L * Lima :: Swing * %% - * Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric + * Copyright (C) 2008 - 2017 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 @@ -26,6 +26,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaSwingConfig; +import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.FinancialPeriodService; import org.chorem.lima.business.api.FiscalPeriodService; @@ -38,7 +39,6 @@ import org.chorem.lima.business.utils.FinancialPeriodComparator; import org.chorem.lima.entity.ClosedPeriodicEntryBook; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.FinancialTransaction; -import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.util.BigDecimalToString; import org.chorem.lima.util.ErrorHelper; import org.jdesktop.swingx.JXTable; @@ -46,7 +46,6 @@ import org.jdesktop.swingx.JXTable; import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; -import java.util.Collections; import java.util.List; import static org.nuiton.i18n.I18n.t; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx index a7796633..15cfc1dc 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx @@ -2,7 +2,7 @@ #%L Lima :: Swing %% - Copyright (C) 2008 - 2010 CodeLutin + Copyright (C) 2008 - 2017 CodeLutin %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java index 13c41389..fb7073ca 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java @@ -2,7 +2,7 @@ * #%L * Lima :: Swing * %% - * Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric + * Copyright (C) 2008 - 2017 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 diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java index 0ca0dfed..b5b0ec46 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java @@ -2,7 +2,7 @@ * #%L * Lima :: Swing * %% - * Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric + * Copyright (C) 2008 - 2017 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 @@ -36,7 +36,6 @@ import org.chorem.lima.ui.importexport.ImportExport; import org.chorem.lima.util.ErrorHelper; import org.jdesktop.swingx.JXTreeTable; import org.jdesktop.swingx.decorator.ColorHighlighter; -import org.jdesktop.swingx.decorator.ComponentAdapter; import org.jdesktop.swingx.decorator.HighlightPredicate; import org.jdesktop.swingx.decorator.Highlighter; import org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See https://gitlab.nuiton.org/chorem/lima.git commit d1884b544de90e0e17926c253a6e13b2c12920c2 Author: David Cossé <cosse@codelutin.com> Date: Thu Oct 26 00:39:37 2017 +0200 refs #1394 onglet saisie des écriture un peu plus rapide --- .../FinancialTransactionViewHandler.java | 66 ++++++++++------------ 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java index df8649b0..04da37d7 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java @@ -102,6 +102,8 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo protected boolean initializationComplete; + protected boolean isLock = false; + public FinancialTransactionViewHandler(FinancialTransactionView view) { this.view = view; initializationComplete = false; @@ -109,9 +111,6 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo financialPeriodService = LimaServiceFactory.getService(FinancialPeriodService.class); fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodService.class); financialTransactionService = LimaServiceFactory.getService(FinancialTransactionService.class); - LimaServiceFactory.addServiceListener(FinancialPeriodService.class, this); - LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this); - LimaServiceFactory.addServiceListener(ImportService.class, this); errorHelper = new ErrorHelper(LimaSwingConfig.getInstance()); initShortCuts(); } @@ -156,6 +155,10 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo } protected void addListeners() { + LimaServiceFactory.addServiceListener(FinancialPeriodService.class, this); + LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this); + LimaServiceFactory.addServiceListener(ImportService.class, this); + FinancialTransactionTable table = view.getFinancialTransactionTable(); table.getColumnModel().addColumnModelListener(this); SwingUtil.fixTableColumnWidth(table, 0, 40); @@ -313,7 +316,7 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo * @param event event */ public void fiscalPeriodSelected(ItemEvent event) { - if ( event.getStateChange() == ItemEvent.SELECTED ) { + if ( event.getStateChange() == ItemEvent.SELECTED) { FiscalPeriod selectedFiscalPeriod = (FiscalPeriod) event.getItem(); List<FinancialPeriod> financialPeriods = financialPeriodService.getFinancialPeriodsWithBeginDateWithin(selectedFiscalPeriod.getBeginDate(), @@ -334,7 +337,7 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo * @param event event */ public void financialPeriodSelected(ItemEvent event) { - if ( event.getStateChange() == ItemEvent.SELECTED ) { + if ( event.getStateChange() == ItemEvent.SELECTED) { updateFinancialTransactions(); computePeriodStatusText(); setAddEntryAllowed(); @@ -347,7 +350,7 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo * @param event event */ public void entryBookSelected(ItemEvent event) { - if ( event.getStateChange() == ItemEvent.SELECTED ) { + if ( event.getStateChange() == ItemEvent.SELECTED) { updateFinancialTransactions(); computePeriodStatusText(); setAddEntryAllowed(); @@ -364,17 +367,17 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo view.getFinancialPeriodComboBox().getSelectedItem() != null && initializationComplete) { + FinancialTransactionTable table = view.getFinancialTransactionTable(); + table.exit(); + FinancialPeriod financialPeriod = (FinancialPeriod) view.getFinancialPeriodComboBox().getSelectedItem(); EntryBook entryBook = (EntryBook) view.getEntryBookComboBox().getSelectedItem(); List<FinancialTransaction> transactions = financialTransactionService.getAllFinancialTransactions(financialPeriod, entryBook); - FinancialTransactionTable table = view.getFinancialTransactionTable(); FinancialTransactionTableModel tableModel = view.getFinancialTransactionTableModel(); - table.exit(); - - boolean isLock = isTableLock(financialPeriod, entryBook); + isLock = isTableLock(financialPeriod, entryBook); tableModel.setGlobalyLocked(isLock); tableModel.setTransactions(transactions); @@ -398,13 +401,6 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo return result; } - public boolean getIsTableLock() { - FinancialPeriod financialPeriod = (FinancialPeriod) view.getFinancialPeriodComboBox().getSelectedItem(); - EntryBook entryBook = (EntryBook) view.getEntryBookComboBox().getSelectedItem(); - boolean isLock = isTableLock(financialPeriod, entryBook); - return isLock; - } - public void selectionChanged() { FinancialTransactionTable table = view.getFinancialTransactionTable(); FinancialTransactionTableModel tableModel = view.getFinancialTransactionTableModel(); @@ -1067,25 +1063,26 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo protected void computePeriodStatusText() { - FinancialPeriod period = (FinancialPeriod) view.getFinancialPeriodComboBoxModel().getSelectedItem(); - EntryBook entryBook = (EntryBook) view.getEntryBookComboBoxModel().getSelectedItem(); - boolean isLock = isTableLock(period, entryBook); + if (initializationComplete) { - String subText = ""; - if (period == null) { - subText = t("lima.financialTransaction.statusTextPeriod.noFiscalPeriodFound"); - } - if (entryBook == null) { - String noEntryBookSubText = t("lima.financialTransaction.statusTextPeriod.noEntryBookFound"); - subText = subText.length() > 0 ? subText + "," + noEntryBookSubText : subText + noEntryBookSubText; - } - if (period != null && entryBook != null){ - subText = subText + (isLock ? t("lima.financialTransaction.statusTextPeriod.close", period.getBeginDate(), period.getEndDate(), entryBook.getCode()) : t("lima.financialTransaction.statusTextPeriod.open", period.getBeginDate(), period.getEndDate())); - } - String result = String.format(t("lima.financialTransaction.statusTextPeriod"), subText); + FinancialPeriod period = (FinancialPeriod) view.getFinancialPeriodComboBoxModel().getSelectedItem(); + EntryBook entryBook = (EntryBook) view.getEntryBookComboBoxModel().getSelectedItem(); - view.getPeriodStatusLabel().setText(result); + String subText = ""; + if (period == null) { + subText = t("lima.financialTransaction.statusTextPeriod.noFiscalPeriodFound"); + } + if (entryBook == null) { + String noEntryBookSubText = t("lima.financialTransaction.statusTextPeriod.noEntryBookFound"); + subText = subText.length() > 0 ? subText + "," + noEntryBookSubText : subText + noEntryBookSubText; + } + if (period != null && entryBook != null) { + subText = subText + (isLock ? t("lima.financialTransaction.statusTextPeriod.close", period.getBeginDate(), period.getEndDate(), entryBook.getCode()) : t("lima.financialTransaction.statusTextPeriod.open", period.getBeginDate(), period.getEndDate())); + } + String result = String.format(t("lima.financialTransaction.statusTextPeriod"), subText); + view.getPeriodStatusLabel().setText(result); + } } @@ -1120,8 +1117,7 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo } protected void setAddEntryAllowed() { - boolean isTableLock = getIsTableLock(); - view.setAddEntryAllowed(!isTableLock); + view.setAddEntryAllowed(!isLock); } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See https://gitlab.nuiton.org/chorem/lima.git commit 5a8af8814d3c0d4c5390c2f3cef8f8b4515bfaea Author: David Cossé <cosse@codelutin.com> Date: Thu Oct 26 00:49:51 2017 +0200 refs #1373 mise à jour URLs --- lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties | 2 +- src/site/site.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties b/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties index 65f28d93..45ee409c 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties @@ -368,7 +368,7 @@ lima.fiscalYears=Exercices lima.help=Aide lima.help.about=À Propos lima.help.about.title=À propos de Lima... -lima.help.about.title.description=<h2 style\="text-align\: center;">Lutin Invoice Monitoring and Accounting</h2> <div style\="margin-right \: 10px; margin-left \: 10px;"><p>Destiné à de petites structures \: association, TPE, PME. Lima propose toutes les fonctionnalités nécessaires à un logiciel de comptabilité professionnelle. Ses interfaces simples rendent son utilisation facile par des néophytes. Les experts retrouverons les outils permettant une saisie rapide et efficace.</p><p>Multi [...] +lima.help.about.title.description=<h2 style\="text-align\: center;">Lutin Invoice Monitoring and Accounting</h2> <div style\="margin-right \: 10px; margin-left \: 10px;"><p>Destiné à de petites structures \: association, TPE, PME. Lima propose toutes les fonctionnalités nécessaires à un logiciel de comptabilité professionnelle. Ses interfaces simples rendent son utilisation facile par des néophytes. Les experts retrouverons les outils permettant une saisie rapide et efficace.</p><p>Multi [...] lima.help.about.translate.content=<h2 style\="text-align\: center;">Comment traduire Lima</h2><div style\="margin-right \: 10px; margin-left \: 10px;">Vous pouvez nous aider à traduire Lima.<ul><li>Dans le répertoire <strong>i18n</strong>, récupérez le fichier <strong>lima-i18n.csv</strong></li><li>Ouvrez-le avec un tableur (le caractère séparateur est une Tabulation)</li><li>Traduisez Lima dans une nouvelle langue ou améliorez une traduction existante</li><li>Enfin renvoyez-le-nous à l’ [...] lima.help.about.translate.title=Traduction lima.help.i18n=Langue diff --git a/src/site/site.xml b/src/site/site.xml index 11039b72..4204bbfb 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -69,7 +69,7 @@ <item name="Téléchargements" href="http://forge.chorem.org/projects/lima/files"/> <item name="Contacts" href="contact.html"/> - <item name="Dépôt GIT" href="https://gitlab.nuiton.org/chorem/lima.git"/> + <item name="Dépôt GIT" href="https://gitlab.nuiton.org/chorem/lima"/> </menu> <menu name="Mode d'emploi" inherit="top"> <item name="Installer et lancer" href="install.html"/> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm