Lima-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
August 2012
- 5 participants
- 86 discussions
r3562 - trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering
by mallon@users.chorem.org 02 Aug '12
by mallon@users.chorem.org 02 Aug '12
02 Aug '12
Author: mallon
Date: 2012-08-02 11:45:20 +0200 (Thu, 02 Aug 2012)
New Revision: 3562
Url: http://chorem.org/repositories/revision/lima/3562
Log:
fixes #725 Correction permettant de re-de / lettrer un ensemble d'?\195?\169critures, juste apr?\195?\168s leur de / lettrage. I.e., les boutons lettrer / delettrer sont d?\195?\169sormais correctement activ?\195?\169s.
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2012-08-02 09:18:58 UTC (rev 3561)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2012-08-02 09:45:20 UTC (rev 3562)
@@ -461,13 +461,11 @@
public void addLetter() {
String newLetters = financialTransactionService.getNextLetters();
changeLetter(newLetters);
- //onBalanceChanged(null);
}
/**Remove a group of three letters to n entries*/
public void removeLetter() {
changeLetter(null);
- //onBalanceChanged(null);
}
/**Add or remove a group of three letters to n entries*/
@@ -480,8 +478,6 @@
financialTransactionService.updateEntry(view.getTableModel().getEntryAt(indexEntry));
view.getTable().addRowSelectionInterval(indexEntry, indexEntry);
}
- editModel.setLettred(false);
- editModel.setUnLettred(false);
}
}
1
0
r3561 - in trunk/lima-swing/src/main/java/org/chorem/lima: . ui/lettering
by mallon@users.chorem.org 02 Aug '12
by mallon@users.chorem.org 02 Aug '12
02 Aug '12
Author: mallon
Date: 2012-08-02 11:18:58 +0200 (Thu, 02 Aug 2012)
New Revision: 3561
Url: http://chorem.org/repositories/revision/lima/3561
Log:
fixes #724 Correction concernant la normalisation des clefs de la configuration.
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java 2012-08-01 16:23:35 UTC (rev 3560)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java 2012-08-02 09:18:58 UTC (rev 3561)
@@ -417,21 +417,21 @@
DATA_DIR("lima.data.dir", n_("lima.config.data.dir.description"), "${user.home}/.lima", File.class, false, false),
RESOURCES_DIRECTORY("lima.resources.dir", n_("lima.config.resources.dir.description"), "${lima.data.dir}/resources-${application.version}", String.class, false, false),
I18N_DIRECTORY("lima.i18n.dir", n_("lima.config.i18n.dir.description"), "${lima.resources.dir}/i18n", String.class, false, false),
- LOCALE("locale", n_("lima.config.locale.description"), "fr_FR", Locale.class, false, false),
- DECIMAL_SEPARATOR("lima.config.decimalseparator", n_("lima.config.decimalseparator.description"), ",", String.class, false, false),
- SCALE("scale", n_("lima.config.scale.description"), "2", Integer.class, false, false),
- THOUSAND_SEPARATOR("thousandSeparator", n_("limma.config.thousandseparator.description"), " ", String.class, false, false),
- CURRENCY("currency", n_("lima.config.currency.description"), "none", Boolean.class, false, false),
+ LOCALE("lima.ui.locale", n_("lima.config.locale.description"), "fr_FR", Locale.class, false, false),
+ DECIMAL_SEPARATOR("lima.data.bigDecimal.decimalSeparator", n_("lima.config.decimalseparator.description"), ",", String.class, false, false),
+ SCALE("lima.data.bigDecimal.scale", n_("lima.config.scale.description"), "2", Integer.class, false, false),
+ THOUSAND_SEPARATOR("lima.thousandSeparator", n_("limma.config.thousandseparator.description"), " ", String.class, false, false),
+ CURRENCY("lima.config.currency", n_("lima.config.currency.description"), "none", Boolean.class, false, false),
FULL_SCREEN("lima.ui.fullscreen", n_("lima.config.ui.fullscreen.description"), "false", Boolean.class, false, false),
LAUNCH_UI("lima.ui.launchui", n_("lima.config.ui.flaunchui.description"), "true", Boolean.class, true, true),
SUPPORT_EMAIL("lima.misc.supportemail", n_("lima.misc.supportemail.description"), "support(a)codelutin.com", String.class, false, false),
OPENEJB_REMOTEMODE("lima.openejb.remotemode", n_("lima.openejb.remotemode.description"), "false", String.class, false, false),
LIMA_HOST_ADDRESS("lima.host.address", n_("lima.config.host.adress"), "localhost", String.class, false, false),
- LIMA_STATE_FILE("lima.state.file", n_("lima.config.state.file"), "${lima.data.dir}/limaState.xml", String.class, false, false),
- COLOR_SELECTION_FOCUS("colorselectionfocus", _("lima.config.colorselectionfocus"), "#000000", Color.class, false, false),
- COMPORTMENT_EDITING_CELL("comportmenteditingcell", _("lima.config.comportmenteditingcell"), "ALL", comportmentEditingCellEnum.class, false, false);
+ LIMA_STATE_FILE("lima.ui.state.file", n_("lima.config.state.file"), "${lima.data.dir}/limaState.xml", String.class, false, false),
+ COLOR_SELECTION_FOCUS("lima.ui.table.cell.colorSelectionFocus", _("lima.config.colorselectionfocus"), "#000000", Color.class, false, false),
+ COMPORTMENT_EDITING_CELL("lima.ui.table.cell.comportmentEditingCell", _("lima.config.comportmenteditingcell"), "ALL", comportmentEditingCellEnum.class, false, false);
- public enum comportmentEditingCellEnum {ALL, NOTHING};
+ public enum comportmentEditingCellEnum {ALL, NOTHING}
public final String key;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2012-08-01 16:23:35 UTC (rev 3560)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2012-08-02 09:18:58 UTC (rev 3561)
@@ -130,10 +130,21 @@
Entry firstSelectedEntry = tableModel.getEntryAt(selectedRows[0]);
Entry secondSelectedEntry = tableModel.getEntryAt(selectedRows[1]);
- String decimalFirstEntrySelected = (firstSelectedEntry.getAmount().toString().split("\\."))[1];
- String decimalSecondSelectedEntry = (secondSelectedEntry.getAmount().toString().split("\\."))[1];
- if ( !decimalFirstEntrySelected.equals("00") || !decimalSecondSelectedEntry.equals("00")
- && secondSelectedEntry.getDebit() != firstSelectedEntry.getDebit()) {
+ BigDecimal [] amountFirstEntry = debitCreditCalculation(firstSelectedEntry);
+ BigDecimal amountFirst = amountFirstEntry[0].equals(BigDecimal.ZERO)?amountFirstEntry[1]:amountFirstEntry[0];
+ BigDecimal [] amountSecondEntry = debitCreditCalculation(secondSelectedEntry);
+ BigDecimal amountSecond = amountSecondEntry[0].equals(BigDecimal.ZERO)?amountSecondEntry[1]:amountSecondEntry[0];
+
+ if (log.isDebugEnabled()) {
+ log.debug(amountFirst + " - " + amountSecond);
+ }
+
+ /*String decimalFirstEntrySelected = (firstSelectedEntry.getAmount().toString().split("\\."))[1];
+ String decimalSecondSelectedEntry = (secondSelectedEntry.getAmount().toString().split("\\."))[1];*/
+ if ( /*(!decimalFirstEntrySelected.equals("00") || !decimalSecondSelectedEntry.equals("00"))*/
+ !amountFirst.equals(BigDecimal.ZERO) && !amountSecond.equals(BigDecimal.ZERO)
+ && secondSelectedEntry.getDebit() != firstSelectedEntry.getDebit()
+ && !amountFirst.equals(amountSecond)) {
onButtonModeChanged("equalized");
}
}else {
1
0
r3560 - trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering
by mallon@users.chorem.org 01 Aug '12
by mallon@users.chorem.org 01 Aug '12
01 Aug '12
Author: mallon
Date: 2012-08-01 18:23:35 +0200 (Wed, 01 Aug 2012)
New Revision: 3560
Url: http://chorem.org/repositories/revision/lima/3560
Log:
fixes #711 Correction permettant de ne pas avoir de d?\195?\169s?\195?\169lection lors du d?\195?\169 / lettrage.
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx 2012-08-01 12:27:37 UTC (rev 3559)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx 2012-08-01 16:23:35 UTC (rev 3560)
@@ -1,7 +1,7 @@
<!--
#%L
Lima Swing
-
+
$Id$
$HeadURL$
%%
@@ -23,167 +23,167 @@
#L%
-->
-<Table constraints='BorderLayout.NORTH'>
+<Table >
- <import>
- org.chorem.lima.ui.common.AccountComboBoxModel
- org.chorem.lima.ui.common.FinancialPeriodComboBoxModel
- org.chorem.lima.entity.Account
- javax.swing.ListSelectionModel
- org.jdesktop.swingx.JXDatePicker
- org.chorem.lima.beans.LetteringFilter
- org.chorem.lima.beans.LetteringFilterImpl
- </import>
+ <import>
+ org.chorem.lima.ui.common.AccountComboBoxModel
+ org.chorem.lima.ui.common.FinancialPeriodComboBoxModel
+ org.chorem.lima.entity.Account
+ javax.swing.ListSelectionModel
+ org.jdesktop.swingx.JXDatePicker
+ org.chorem.lima.beans.LetteringFilter
+ org.chorem.lima.beans.LetteringFilterImpl
+ </import>
- <LetteringViewHandler id="handler" constructorParams="this"/>
- <LetteringTableModel id="tableModel"/>
+ <LetteringViewHandler id="handler" constructorParams="this"/>
+ <LetteringTableModel id="tableModel"/>
- <LetteringFilterImpl id='filterModel' initializer='new LetteringFilterImpl()'/>
- <LetteringEditModel id='editModel'/>
+ <LetteringFilterImpl id='filterModel' initializer='new LetteringFilterImpl()'/>
+ <LetteringEditModel id='editModel'/>
- <LettringSelectionModel id='lettringSelectionModel' constructorParams=' tableModel'
- onValueChanged="handler.balanceAndActions()"/>
+ <LettringSelectionModel id='lettringSelectionModel' constructorParams=' tableModel'
+ onValueChanged="handler.balanceAndActions()"/>
- <script>
- <![CDATA[
+ <script>
+ <![CDATA[
void $afterCompleteSetup() {
handler.init();
}
]]>
- </script>
+ </script>
- <row>
- <cell>
- <JPanel layout='{new BorderLayout()}' id="panelAccountComboBox" border='{new TitledBorder(_("lima.ui.lettering.account"))}'>
- <org.chorem.lima.ui.common.AccountComboBoxModel id="accountComboBoxModel"/>
- <JComboBox id="accountComboBox" model="{accountComboBoxModel}"
- renderer="{new org.chorem.lima.ui.common.AccountListRenderer()}"
- onActionPerformed="filterModel.setAccount((Account)accountComboBoxModel.getSelectedItem())"
- constraints='BorderLayout.WEST'/>
- <JButton id="backCount" text="lima.ui.account.buttonback"
- onActionPerformed="handler.back(accountComboBox)"
- constraints='BorderLayout.CENTER'/>
- <JButton id="nextCount" text="lima.ui.account.buttonnext"
- onActionPerformed="handler.next(accountComboBox)"
- constraints='BorderLayout.EAST'/>
- </JPanel>
- </cell>
- <cell>
- <JPanel id="panelFinancialPeriodComboBox" layout='{new BorderLayout()}' border='{new TitledBorder(_("lima.ui.lettering.period"))}'>
- <Table constraints='BorderLayout.NORTH'>
- <row>
- <cell>
- <JLabel text="lima.ui.lettering.beginFinancialPeriod"/>
- </cell>
- <cell>
- <JXDatePicker id="pickerDebut"
- onActionPerformed="filterModel.setDateStart(pickerDebut.getDate())"/>
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text="lima.ui.lettering.endFinancialPeriod"/>
- </cell>
- <cell>
- <JXDatePicker id="pickerFin"
- onActionPerformed="filterModel.setDateEnd(pickerFin.getDate())"/>
- </cell>
- </row>
- </Table>
- </JPanel>
- </cell>
- <cell anchor="center" weightx="1">
- <JPanel id="entryPanel" layout='{new BorderLayout()}' border='{new TitledBorder(_("lima.ui.lettering.entry"))}'>
- <Table constraints='BorderLayout.NORTH'>
- <row>
- <cell>
- <JRadioButton id="lettredEntryCheckBox" buttonGroup="letteredCheckGroup"
- onActionPerformed="filterModel.setDisplayLettered(true) ; filterModel.setDisplayUnlettred(false)"/>
- </cell>
- <cell>
- <JLabel text="lima.ui.lettering.checkLettredEntry"/>
- </cell>
- </row>
- <row>
- <cell>
- <JRadioButton id="noLettredEntryCheckBox" selected="true" buttonGroup="letteredCheckGroup"
- onActionPerformed="filterModel.setDisplayUnlettred(true); filterModel.setDisplayLettered(false)"/>
- </cell>
- <cell>
- <JLabel text="lima.ui.lettering.checkNoLettredEntry"/>
- </cell>
- </row>
- <row>
- <cell>
- <JRadioButton id="allCheckBox" buttonGroup="letteredCheckGroup"
- onActionPerformed="filterModel.setDisplayLettered(false) ; filterModel.setDisplayUnlettred(false)"/>
- </cell>
- <cell>
- <JLabel text="lima.ui.lettering.checkAll"/>
- </cell>
- </row>
- </Table>
- </JPanel>
- </cell>
- </row>
- <row>
- <cell fill="horizontal" columns="4">
- <JPanel id="selectedEntry" layout='{new BorderLayout()}' border='{new TitledBorder(_("lima.ui.lettering.selectEntry"))}'>
- <Table constraints='BorderLayout.NORTH'>
- <row>
- <cell anchor="center" weightx="0.6">
- <JLabel text="lima.ui.lettering.selectDebit" labelFor='{debitTexttField}'/>
- </cell>
- <cell fill="horizontal" weightx="0.6">
- <JTextField id="debitTexttField" editable="false" text="{editModel.getDebit().toString()}"
- focusable="false"/>
- </cell>
- <cell anchor="center" weightx="0.6">
- <JLabel text="lima.ui.lettering.selectCredit" labelFor='{creditTextField}'/>
- </cell>
- <cell fill="horizontal" weightx="0.6">
- <JTextField id="creditTextField" editable="false" text="{editModel.getCredit().toString()}"
- focusable="false"/>
- </cell>
- <cell anchor="center" weightx="0.6">
- <JLabel text="lima.ui.lettering.selectSolde" labelFor='{soldeTextField}'/>
- </cell>
- <cell fill="horizontal" weightx="0.6">
- <JTextField id="soldeTextField" editable="false" text="{editModel.getSolde().toString()}"
- focusable="false"/>
- </cell>
- </row>
- </Table>
- </JPanel>
- </cell>
- </row>
- <row>
- <cell anchor="center" columns='4'>
- <JPanel id="actionsPanel">
- <JButton id="lettered" text="lima.ui.lettering.buttonLettered"
- enabled="{editModel.isLettred()}"
- onActionPerformed="handler.addLetter()"/>
- <JButton id="noLettered" text="lima.ui.lettering.buttonNoLettered"
- enabled="{editModel.isUnLettred()}"
- onActionPerformed="handler.removeLetter()"/>
- <JButton id="refresh" text="lima.ui.lettering.buttonRefresh"
- enabled="true"
- onActionPerformed="handler.updateAllEntries()"/>
- <JButton id="round" text="lima.ui.lettering.buttonEqualize"
- enabled="{editModel.isEqualized()}"
- onActionPerformed="handler.roundAndCreateEntry()"/>
- </JPanel>
- </cell>
- </row>
- <row>
- <cell fill="both" weightx="1" weighty="1" columns="4">
- <JScrollPane>
- <LetteringTable
- id="table" sortable="false" rowHeight="22"
- constructorParams="getTableModel()"
- selectionModel="{lettringSelectionModel}"
- />
- </JScrollPane>
- </cell>
- </row>
+ <row>
+ <cell>
+ <JPanel layout='{new BorderLayout()}' id="panelAccountComboBox" border='{new TitledBorder(_("lima.ui.lettering.account"))}'>
+ <org.chorem.lima.ui.common.AccountComboBoxModel id="accountComboBoxModel"/>
+ <JComboBox id="accountComboBox" model="{accountComboBoxModel}"
+ renderer="{new org.chorem.lima.ui.common.AccountListRenderer()}"
+ onActionPerformed="filterModel.setAccount((Account)accountComboBoxModel.getSelectedItem())"
+ constraints='BorderLayout.WEST'/>
+ <JButton id="backCount" text="lima.ui.account.buttonback"
+ onActionPerformed="handler.back(accountComboBox)"
+ constraints='BorderLayout.CENTER'/>
+ <JButton id="nextCount" text="lima.ui.account.buttonnext"
+ onActionPerformed="handler.next(accountComboBox)"
+ constraints='BorderLayout.EAST'/>
+ </JPanel>
+ </cell>
+ <cell>
+ <JPanel id="panelFinancialPeriodComboBox" layout='{new BorderLayout()}' border='{new TitledBorder(_("lima.ui.lettering.period"))}'>
+ <Table constraints='BorderLayout.NORTH'>
+ <row>
+ <cell>
+ <JLabel text="lima.ui.lettering.beginFinancialPeriod"/>
+ </cell>
+ <cell>
+ <JXDatePicker id="pickerDebut"
+ onActionPerformed="filterModel.setDateStart(pickerDebut.getDate())"/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text="lima.ui.lettering.endFinancialPeriod"/>
+ </cell>
+ <cell>
+ <JXDatePicker id="pickerFin"
+ onActionPerformed="filterModel.setDateEnd(pickerFin.getDate())"/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ <cell>
+ <JPanel id="entryPanel" layout='{new BorderLayout()}' border='{new TitledBorder(_("lima.ui.lettering.entry"))}'>
+ <Table constraints='BorderLayout.NORTH'>
+ <row>
+ <cell>
+ <JRadioButton id="lettredEntryCheckBox" buttonGroup="letteredCheckGroup"
+ onActionPerformed="filterModel.setDisplayLettered(true) ; filterModel.setDisplayUnlettred(false)"/>
+ </cell>
+ <cell>
+ <JLabel text="lima.ui.lettering.checkLettredEntry"/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JRadioButton id="noLettredEntryCheckBox" selected="true" buttonGroup="letteredCheckGroup"
+ onActionPerformed="filterModel.setDisplayUnlettred(true); filterModel.setDisplayLettered(false)"/>
+ </cell>
+ <cell>
+ <JLabel text="lima.ui.lettering.checkNoLettredEntry"/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JRadioButton id="allCheckBox" buttonGroup="letteredCheckGroup"
+ onActionPerformed="filterModel.setDisplayLettered(false) ; filterModel.setDisplayUnlettred(false)"/>
+ </cell>
+ <cell>
+ <JLabel text="lima.ui.lettering.checkAll"/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
+ <cell fill="horizontal" columns="4">
+ <JPanel id="selectedEntry" layout='{new BorderLayout()}' border='{new TitledBorder(_("lima.ui.lettering.selectEntry"))}'>
+ <Table constraints='BorderLayout.NORTH'>
+ <row>
+ <cell anchor="center" weightx="0.6">
+ <JLabel text="lima.ui.lettering.selectDebit" labelFor='{debitTexttField}'/>
+ </cell>
+ <cell fill="horizontal" weightx="0.6">
+ <JTextField id="debitTexttField" editable="false" text="{editModel.getDebit().toString()}"
+ focusable="false"/>
+ </cell>
+ <cell anchor="center" weightx="0.6">
+ <JLabel text="lima.ui.lettering.selectCredit" labelFor='{creditTextField}'/>
+ </cell>
+ <cell fill="horizontal" weightx="0.6">
+ <JTextField id="creditTextField" editable="false" text="{editModel.getCredit().toString()}"
+ focusable="false"/>
+ </cell>
+ <cell anchor="center" weightx="0.6">
+ <JLabel text="lima.ui.lettering.selectSolde" labelFor='{soldeTextField}'/>
+ </cell>
+ <cell fill="horizontal" weightx="0.6">
+ <JTextField id="soldeTextField" editable="false" text="{editModel.getSolde().toString()}"
+ focusable="false"/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
+ <cell anchor="center" columns='4'>
+ <JPanel id="actionsPanel">
+ <JButton id="lettered" text="lima.ui.lettering.buttonLettered"
+ enabled="{editModel.isLettred()}"
+ onActionPerformed="handler.addLetter()"/>
+ <JButton id="noLettered" text="lima.ui.lettering.buttonNoLettered"
+ enabled="{editModel.isUnLettred()}"
+ onActionPerformed="handler.removeLetter()"/>
+ <JButton id="refresh" text="lima.ui.lettering.buttonRefresh"
+ enabled="true"
+ onActionPerformed="handler.updateAllEntries()"/>
+ <JButton id="round" text="lima.ui.lettering.buttonEqualize"
+ enabled="{editModel.isEqualized()}"
+ onActionPerformed="handler.roundAndCreateEntry()"/>
+ </JPanel>
+ </cell>
+ </row>
+ <row>
+ <cell fill="both" weightx="1" weighty="1" columns="4">
+ <JScrollPane>
+ <LetteringTable
+ id="table" sortable="false" rowHeight="22"
+ constructorParams="getTableModel()"
+ selectionModel="{lettringSelectionModel}"
+ />
+ </JScrollPane>
+ </cell>
+ </row>
</Table>
\ No newline at end of file
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2012-08-01 12:27:37 UTC (rev 3559)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2012-08-01 16:23:35 UTC (rev 3560)
@@ -117,9 +117,14 @@
//For U.I. buttons (Lettering and unlettering)
onButtonModeChanged("delettrer");
} else {
+ if (log.isDebugEnabled()) {
+ log.debug("unlettred entries");
+ }
int[] selectedRows = view.getTable().getSelectedRows();
if (selectedRows.length == 2) {
-
+ if (log.isDebugEnabled()) {
+ log.debug("2 rows selected");
+ }
/*Treatment only if one of values contains decimals*/
LetteringTableModel tableModel = view.getTableModel();
Entry firstSelectedEntry = tableModel.getEntryAt(selectedRows[0]);
@@ -132,6 +137,9 @@
onButtonModeChanged("equalized");
}
}else {
+ if (log.isDebugEnabled()) {
+ log.debug("!2 rows selected");
+ }
onButtonModeChanged("all");
}
@@ -139,9 +147,15 @@
onBalanceChanged(null);
//treatment unuseful if no rows are selected
if (!view.getLettringSelectionModel().isSelectionEmpty()) {
+ if (log.isDebugEnabled()) {
+ log.debug("Rows selected");
+ }
setValuesForSelectedEntries();
onButtonModeChanged("lettrer");
} else {
+ if (log.isDebugEnabled()) {
+ log.debug("No Rows selected");
+ }
onButtonModeChanged("all");
}
}
@@ -288,7 +302,7 @@
view.getTableModel().updateEntries(entries, datesEntree, journalEntrees);
}
onBalanceChanged(null);
- view.getLettringSelectionModel().clearSelection();
+ //view.getLettringSelectionModel().clearSelection();
}
/**To make the difference between two selected entries and
@@ -436,13 +450,13 @@
public void addLetter() {
String newLetters = financialTransactionService.getNextLetters();
changeLetter(newLetters);
- onBalanceChanged(null);
+ //onBalanceChanged(null);
}
/**Remove a group of three letters to n entries*/
public void removeLetter() {
changeLetter(null);
- onBalanceChanged(null);
+ //onBalanceChanged(null);
}
/**Add or remove a group of three letters to n entries*/
@@ -453,6 +467,7 @@
for (int indexEntry : entrieSelected){
financialTransactionService.updateEntry(view.getTableModel().getEntryAt(indexEntry));
+ view.getTable().addRowSelectionInterval(indexEntry, indexEntry);
}
editModel.setLettred(false);
editModel.setUnLettred(false);
1
0
r3559 - in trunk/lima-swing/src/main: java/org/chorem/lima java/org/chorem/lima/ui/celleditor resources
by mallon@users.chorem.org 01 Aug '12
by mallon@users.chorem.org 01 Aug '12
01 Aug '12
Author: mallon
Date: 2012-08-01 14:27:37 +0200 (Wed, 01 Aug 2012)
New Revision: 3559
Url: http://chorem.org/repositories/revision/lima/3559
Log:
Correction d un probleme d instance dans le context Lima.
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/LimaContext.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/BigDecimalTableCellEditor.java
trunk/lima-swing/src/main/resources/log4j.properties
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaContext.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaContext.java 2012-08-01 11:27:51 UTC (rev 3558)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaContext.java 2012-08-01 12:27:37 UTC (rev 3559)
@@ -83,7 +83,7 @@
}
instance = new LimaContext();
instance.setContextValue(new MainViewHandler());
- CONFIG_DEF.setContextValue(instance, new LimaConfig());
+ CONFIG_DEF.setContextValue(instance, LimaConfig.getInstance());
DECORATOR_PROVIDER_DEF.setContextValue(instance, new LimaDecoratorProvider());
return instance;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/BigDecimalTableCellEditor.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/BigDecimalTableCellEditor.java 2012-08-01 11:27:51 UTC (rev 3558)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/BigDecimalTableCellEditor.java 2012-08-01 12:27:37 UTC (rev 3559)
@@ -24,6 +24,8 @@
*/
import jaxx.runtime.swing.editor.cell.NumberCellEditor;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.chorem.lima.LimaConfig;
import javax.swing.JTable;
@@ -39,6 +41,8 @@
protected int row;
+ static private Log log = LogFactory.getLog(BigDecimalTableCellEditor.class);
+
public BigDecimalTableCellEditor() {
super(BigDecimal.class, false);
}
@@ -46,11 +50,17 @@
@Override
public void focusGained(FocusEvent e) {
String comportmentEditingCell = LimaConfig.getInstance().getComportmentEditingCell();
+ if (log.isDebugEnabled()) {
+ log.debug("comportmentEditingCell : " + comportmentEditingCell);
+ }
JTextField numberEditorTextField = super.getNumberEditor().getTextField();
if (comportmentEditingCell.equals("ALL")) {
numberEditorTextField.selectAll();
} else {
int textFieldSize = numberEditorTextField.getText().length();
+ if (log.isDebugEnabled()) {
+ log.debug("textFieldSize : " + textFieldSize);
+ }
numberEditorTextField.select(textFieldSize, textFieldSize);
}
}
Modified: trunk/lima-swing/src/main/resources/log4j.properties
===================================================================
--- trunk/lima-swing/src/main/resources/log4j.properties 2012-08-01 11:27:51 UTC (rev 3558)
+++ trunk/lima-swing/src/main/resources/log4j.properties 2012-08-01 12:27:37 UTC (rev 3559)
@@ -42,4 +42,5 @@
log4j.logger.org.chorem.lima.ui.lettering.LetteringViewHandler=DEBUG
log4j.logger.org.chorem.lima.ui.lettering.LettringSelectionModel=DEBUG
log4j.logger.org.chorem.lima.ui.lettering.LetteringEditModel=DEBUG
-log4j.logger.org.chorem.lima.ui.financialtransaction.FinancialTransactionTableModel=DEBUG
\ No newline at end of file
+log4j.logger.org.chorem.lima.ui.financialtransaction.FinancialTransactionTableModel=DEBUG
+log4j.logger.org.chorem.lima.ui.celleditor.BigDecimalTableCellEditor=DEBUG
\ No newline at end of file
1
0
r3558 - in trunk/lima-swing/src/main/java/org/chorem/lima: . ui ui/celleditor
by mallon@users.chorem.org 01 Aug '12
by mallon@users.chorem.org 01 Aug '12
01 Aug '12
Author: mallon
Date: 2012-08-01 13:27:51 +0200 (Wed, 01 Aug 2012)
New Revision: 3558
Url: http://chorem.org/repositories/revision/lima/3558
Log:
Correction des deux editeurs de cellule sur lesquels portent les changements de comportement dans la configuration de Lima.
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/BigDecimalTableCellEditor.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateTableCellEditor.java
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java 2012-08-01 09:07:09 UTC (rev 3557)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java 2012-08-01 11:27:51 UTC (rev 3558)
@@ -429,7 +429,7 @@
LIMA_HOST_ADDRESS("lima.host.address", n_("lima.config.host.adress"), "localhost", String.class, false, false),
LIMA_STATE_FILE("lima.state.file", n_("lima.config.state.file"), "${lima.data.dir}/limaState.xml", String.class, false, false),
COLOR_SELECTION_FOCUS("colorselectionfocus", _("lima.config.colorselectionfocus"), "#000000", Color.class, false, false),
- COMPORTMENT_EDITING_CELL("comportmenteditingcell", n_("lima.config.comportmenteditingcell"), "ALL", comportmentEditingCellEnum.class, false, false);
+ COMPORTMENT_EDITING_CELL("comportmenteditingcell", _("lima.config.comportmenteditingcell"), "ALL", comportmentEditingCellEnum.class, false, false);
public enum comportmentEditingCellEnum {ALL, NOTHING};
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2012-08-01 09:07:09 UTC (rev 3557)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2012-08-01 11:27:51 UTC (rev 3558)
@@ -206,6 +206,8 @@
helper.addOption(LimaConfig.Option.SCALE);
helper.addOption(LimaConfig.Option.THOUSAND_SEPARATOR);
helper.addOption(LimaConfig.Option.CURRENCY);
+ /*Pas de 'callBack' sur le changement de comportement lors de l'édition d'une cellule,
+ * car les deux éditeurs concernés rappellent la config dans un listener ('focusGained')*/
helper.addOption(LimaConfig.Option.COMPORTMENT_EDITING_CELL);
helper.addOption(colorSelectionFocus);
helper.setOptionCallBack(colorSelectionFocus.key);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/BigDecimalTableCellEditor.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/BigDecimalTableCellEditor.java 2012-08-01 09:07:09 UTC (rev 3557)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/BigDecimalTableCellEditor.java 2012-08-01 11:27:51 UTC (rev 3558)
@@ -38,7 +38,6 @@
public class BigDecimalTableCellEditor extends NumberCellEditor<BigDecimal>{
protected int row;
- protected String comportmentEditingCell;
public BigDecimalTableCellEditor() {
super(BigDecimal.class, false);
@@ -46,7 +45,7 @@
@Override
public void focusGained(FocusEvent e) {
- comportmentEditingCell = LimaConfig.getInstance().getComportmentEditingCell();
+ String comportmentEditingCell = LimaConfig.getInstance().getComportmentEditingCell();
JTextField numberEditorTextField = super.getNumberEditor().getTextField();
if (comportmentEditingCell.equals("ALL")) {
numberEditorTextField.selectAll();
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateTableCellEditor.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateTableCellEditor.java 2012-08-01 09:07:09 UTC (rev 3557)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateTableCellEditor.java 2012-08-01 11:27:51 UTC (rev 3558)
@@ -51,7 +51,7 @@
private static final long serialVersionUID = 1L;
private final JXDatePicker datePicker;
- protected String comportmentEditingCell;
+ //protected String comportmentEditingCell;
//used to tell if the user has pressed a key
private Date date;
@@ -61,7 +61,7 @@
datePicker = new JXDatePicker(LimaContext.getContext().getConfig().getLocale());
datePicker.getEditor().addFocusListener(this);
datePicker.getEditor().addAncestorListener(this);
- comportmentEditingCell = LimaConfig.getInstance().getComportmentEditingCell();
+ //comportmentEditingCell = LimaConfig.getInstance().getComportmentEditingCell();
}
@Override
@@ -109,6 +109,7 @@
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFormattedTextField dateFormattedTextField = datePicker.getEditor();
+ String comportmentEditingCell = LimaConfig.getInstance().getComportmentEditingCell();
if (comportmentEditingCell.equals("ALL")) {
dateFormattedTextField.selectAll();
} else {
@@ -119,15 +120,6 @@
});
}
- /** Listeners */
- /*public void focusGained(FocusEvent e) {
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- datePicker.getEditor().selectAll();
- }
- });
- }*/
-
public void focusLost(FocusEvent e) {
}
1
0
Author: mallon
Date: 2012-08-01 11:07:09 +0200 (Wed, 01 Aug 2012)
New Revision: 3557
Url: http://chorem.org/repositories/revision/lima/3557
Log:
Correction concernant l utilisation d un "callBack" sur la modification de couleur de selection d une cellule, permettant ainsi le changement de cette configuration a la volee.
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTable.java
trunk/pom.xml
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2012-07-31 14:09:36 UTC (rev 3556)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2012-08-01 09:07:09 UTC (rev 3557)
@@ -59,6 +59,8 @@
import org.nuiton.widget.SwingSession;
import javax.swing.*;
+import javax.swing.border.LineBorder;
+import javax.swing.plaf.BorderUIResource;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -182,11 +184,18 @@
public void showConfig(JAXXContext context) {
MainView ui = getUI(context);
- LimaConfig config = ui.getConfig();
+ final LimaConfig config = ui.getConfig();
- //TODO pepin 2010-08-20 add all options
+ ConfigUIHelper helper = new ConfigUIHelper(config);
- ConfigUIHelper helper = new ConfigUIHelper(config);
+ LimaConfig.Option colorSelectionFocus = LimaConfig.Option.COLOR_SELECTION_FOCUS;
+ helper.registerCallBack(colorSelectionFocus.key, _("lima.config.colorselectionfocus"), new ImageIcon(), new Runnable() {
+ @Override
+ public void run() {
+ UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(config.getColorSelectionFocus(), 2)));
+ }
+ });
+
helper.addCategory(_("lima.config.category.directories"), _("lima.config.category.directories.description"));
helper.addOption(LimaConfig.Option.CONFIG_FILE);
@@ -198,7 +207,8 @@
helper.addOption(LimaConfig.Option.THOUSAND_SEPARATOR);
helper.addOption(LimaConfig.Option.CURRENCY);
helper.addOption(LimaConfig.Option.COMPORTMENT_EDITING_CELL);
- helper.addOption(LimaConfig.Option.COLOR_SELECTION_FOCUS);
+ helper.addOption(colorSelectionFocus);
+ helper.setOptionCallBack(colorSelectionFocus.key);
helper.buildUI(context, _("lima.config.category.directories"));
helper.displayUI(ui, false);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTable.java 2012-07-31 14:09:36 UTC (rev 3556)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTable.java 2012-08-01 09:07:09 UTC (rev 3557)
@@ -32,7 +32,6 @@
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
-import org.chorem.lima.LimaConfig;
import org.chorem.lima.entity.ClosedPeriodicEntryBook;
import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.decorator.ColorHighlighter;
@@ -41,10 +40,6 @@
import org.jdesktop.swingx.decorator.Highlighter;
import org.jdesktop.swingx.decorator.HighlighterFactory;
-import javax.swing.UIManager;
-import javax.swing.border.LineBorder;
-import javax.swing.plaf.BorderUIResource;
-
/**
* Financial period table adding color hidhlighter and key management.
*
@@ -60,7 +55,6 @@
private static final long serialVersionUID = -1960326844433064178L;
protected FinancialPeriodViewHandler handler;
- protected Color colorSelectionFocus;
protected FinancialPeriodTableModel model;
@@ -71,9 +65,6 @@
*/
public FinancialPeriodTable(FinancialPeriodViewHandler handler) {
this.handler = handler;
- //Change border of cell focus
- colorSelectionFocus = LimaConfig.getInstance().getColorSelectionFocus();
- UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(colorSelectionFocus, 2)));
model = handler.view.getFinancialPeriodTableModel();
addKeyListener(this);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTable.java 2012-07-31 14:09:36 UTC (rev 3556)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTable.java 2012-08-01 09:07:09 UTC (rev 3557)
@@ -24,15 +24,8 @@
*/
package org.chorem.lima.ui.financialstatementchart;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.LimaConfig;
import org.jdesktop.swingx.JXTreeTable;
-import javax.swing.UIManager;
-import javax.swing.border.LineBorder;
-import javax.swing.plaf.BorderUIResource;
-import java.awt.Color;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
@@ -45,15 +38,10 @@
private static final long serialVersionUID = 3221024449873737253L;
protected FinancialStatementChartViewHandler handler;
- protected Color colorSelectionFocus;
public FinancialStatementChartTreeTable(FinancialStatementChartViewHandler handler) {
this.handler = handler;
- //Change border of cell focus
- colorSelectionFocus = LimaConfig.getInstance().getColorSelectionFocus();
- UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(colorSelectionFocus, 2)));
-
addKeyListener(this);
addMouseListener(this);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTable.java 2012-07-31 14:09:36 UTC (rev 3556)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTable.java 2012-08-01 09:07:09 UTC (rev 3557)
@@ -25,7 +25,6 @@
package org.chorem.lima.ui.financialstatementreport;
-import org.chorem.lima.LimaConfig;
import org.chorem.lima.beans.FinancialStatementAmounts;
import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.decorator.ColorHighlighter;
@@ -33,9 +32,6 @@
import org.jdesktop.swingx.decorator.HighlightPredicate;
import org.jdesktop.swingx.decorator.Highlighter;
-import javax.swing.UIManager;
-import javax.swing.border.LineBorder;
-import javax.swing.plaf.BorderUIResource;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.KeyEvent;
@@ -49,7 +45,6 @@
private static final long serialVersionUID = 154211277688304679L;
protected FinancialStatementReportTableModel model;
- protected Color colorSelectionFocus;
private Highlighter colorTransaction;
@@ -59,10 +54,6 @@
public FinancialStatementReportTable(FinancialStatementReportTableModel model) {
super(model);
- //Change border of cell focus
- colorSelectionFocus = LimaConfig.getInstance().getColorSelectionFocus();
- UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(colorSelectionFocus, 2)));
-
addKeyListener(this);
addMouseListener(this);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2012-07-31 14:09:36 UTC (rev 3556)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2012-08-01 09:07:09 UTC (rev 3557)
@@ -26,7 +26,6 @@
package org.chorem.lima.ui.financialtransaction;
import org.apache.commons.collections.CollectionUtils;
-import org.chorem.lima.LimaConfig;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.FinancialTransaction;
@@ -42,9 +41,6 @@
import org.jdesktop.swingx.decorator.Highlighter;
import javax.swing.SwingWorker;
-import javax.swing.UIManager;
-import javax.swing.border.LineBorder;
-import javax.swing.plaf.BorderUIResource;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.KeyAdapter;
@@ -71,7 +67,6 @@
private static final long serialVersionUID = 3133690382049594727L;
protected FinancialTransactionViewHandler handler;
- protected Color colorSelectionFocus;
private int x_tab;
@@ -80,10 +75,6 @@
public FinancialTransactionTable(FinancialTransactionViewHandler handler) {
this.handler = handler;
- //Change border of cell focus
- colorSelectionFocus = LimaConfig.getInstance().getColorSelectionFocus();
- UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(colorSelectionFocus, 2)));
-
addKeyListener(new MyKeyAdapter());
addMouseListener(new MyMouseAdapter());
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java 2012-07-31 14:09:36 UTC (rev 3556)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTable.java 2012-08-01 09:07:09 UTC (rev 3557)
@@ -25,9 +25,6 @@
package org.chorem.lima.ui.financialtransactionsearch;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.LimaConfig;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.ui.celleditor.AccountTableCellEditor;
@@ -42,9 +39,6 @@
import org.jdesktop.swingx.decorator.HighlightPredicate;
import org.jdesktop.swingx.decorator.Highlighter;
-import javax.swing.UIManager;
-import javax.swing.border.LineBorder;
-import javax.swing.plaf.BorderUIResource;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.KeyEvent;
@@ -68,7 +62,6 @@
private static final long serialVersionUID = 3133690382049594727L;
protected FinancialTransactionSearchViewHandler handler;
- protected Color colorSelectionFocus;
private Highlighter colorTransaction;
@@ -78,10 +71,6 @@
this.handler = handler;
- //Change border of cell focus
- colorSelectionFocus = LimaConfig.getInstance().getColorSelectionFocus();
- UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(colorSelectionFocus, 2)));
-
addKeyListener(this);
addMouseListener(this);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTable.java 2012-07-31 14:09:36 UTC (rev 3556)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTable.java 2012-08-01 09:07:09 UTC (rev 3557)
@@ -25,7 +25,6 @@
package org.chorem.lima.ui.financialtransactionunbalanced;
-import org.chorem.lima.LimaConfig;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.ui.celleditor.AccountTableCellEditor;
@@ -40,9 +39,6 @@
import org.jdesktop.swingx.decorator.HighlightPredicate;
import org.jdesktop.swingx.decorator.Highlighter;
-import javax.swing.UIManager;
-import javax.swing.border.LineBorder;
-import javax.swing.plaf.BorderUIResource;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.KeyEvent;
@@ -65,7 +61,6 @@
private static final long serialVersionUID = 3133690382049594727L;
protected FinancialTransactionUnbalancedViewHandler handler;
- protected Color colorSelectionFocus;
private Highlighter colorTransaction;
@@ -74,9 +69,6 @@
public FinancialTransactionUnbalancedTable(FinancialTransactionUnbalancedViewHandler handler) {
this.handler = handler;
- //Change border of cell focus
- colorSelectionFocus = LimaConfig.getInstance().getColorSelectionFocus();
- UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(colorSelectionFocus, 2)));
addKeyListener(this);
addMouseListener(this);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTable.java 2012-07-31 14:09:36 UTC (rev 3556)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTable.java 2012-08-01 09:07:09 UTC (rev 3557)
@@ -25,7 +25,6 @@
package org.chorem.lima.ui.fiscalperiod;
-import org.chorem.lima.LimaConfig;
import org.chorem.lima.entity.FiscalPeriod;
import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.decorator.ColorHighlighter;
@@ -33,9 +32,6 @@
import org.jdesktop.swingx.decorator.HighlightPredicate;
import org.jdesktop.swingx.decorator.Highlighter;
-import javax.swing.UIManager;
-import javax.swing.border.LineBorder;
-import javax.swing.plaf.BorderUIResource;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.KeyEvent;
@@ -64,14 +60,10 @@
private static final long serialVersionUID = -8462838870024505659L;
protected FiscalPeriodTableModel model;
- protected Color colorSelectionFocus;
public FiscalPeriodTable(FiscalPeriodTableModel model) {
super(model);
this.model = model;
- //Change border of cell focus
- colorSelectionFocus = LimaConfig.getInstance().getColorSelectionFocus();
- UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(colorSelectionFocus, 2)));
addKeyListener(this);
addMouseListener(this);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTable.java 2012-07-31 14:09:36 UTC (rev 3556)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTable.java 2012-08-01 09:07:09 UTC (rev 3557)
@@ -25,7 +25,6 @@
package org.chorem.lima.ui.ledger;
-import org.chorem.lima.LimaConfig;
import org.chorem.lima.ui.celleditor.BigDecimalTableCellRenderer;
import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.decorator.ColorHighlighter;
@@ -33,9 +32,6 @@
import org.jdesktop.swingx.decorator.HighlightPredicate;
import org.jdesktop.swingx.decorator.Highlighter;
-import javax.swing.UIManager;
-import javax.swing.border.LineBorder;
-import javax.swing.plaf.BorderUIResource;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.KeyEvent;
@@ -57,16 +53,8 @@
private Highlighter colorReportsDatas;
- protected Color colorSelectionFocus;
-
- /**
- */
public LedgerTable() {
- //Change border of cell focus
- colorSelectionFocus = LimaConfig.getInstance().getColorSelectionFocus();
- UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(colorSelectionFocus, 2)));
-
addKeyListener(this);
addMouseListener(this);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java 2012-07-31 14:09:36 UTC (rev 3556)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java 2012-08-01 09:07:09 UTC (rev 3557)
@@ -40,10 +40,6 @@
import javax.swing.JComponent;
import javax.swing.JTextField;
import javax.swing.KeyStroke;
-import javax.swing.UIManager;
-import javax.swing.border.LineBorder;
-import javax.swing.plaf.BorderUIResource;
-import java.awt.Color;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.math.BigDecimal;
@@ -61,15 +57,10 @@
private static final long serialVersionUID = 3133690382049594727L;
protected LetteringViewHandler handler;
- protected Color colorSelectionFocus;
public LetteringTable(LetteringTableModel letteringTableModel) {
super(letteringTableModel);
- //Change border of cell focus
- colorSelectionFocus = LimaConfig.getInstance().getColorSelectionFocus();
- UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(colorSelectionFocus, 2)));
-
//To block reaction of the dual key 'ctrl+a' (Selection of all lines)
InputMap im = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
im.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, InputEvent.CTRL_MASK), "none");
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTable.java 2012-07-31 14:09:36 UTC (rev 3556)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTable.java 2012-08-01 09:07:09 UTC (rev 3557)
@@ -24,9 +24,6 @@
*/
package org.chorem.lima.ui.vatchart;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.LimaConfig;
import org.chorem.lima.entity.VatStatement;
import org.jdesktop.swingx.JXTreeTable;
import org.jdesktop.swingx.decorator.ColorHighlighter;
@@ -35,9 +32,6 @@
import org.jdesktop.swingx.decorator.Highlighter;
import org.jdesktop.swingx.treetable.TreeTableModel;
-import javax.swing.UIManager;
-import javax.swing.border.LineBorder;
-import javax.swing.plaf.BorderUIResource;
import javax.swing.tree.TreePath;
import java.awt.Color;
import java.awt.Component;
@@ -53,17 +47,13 @@
private static final long serialVersionUID = 3960840343197845825L;
protected VatChartViewHandler handler;
- protected Color colorSelectionFocus;
+ //protected Color colorSelectionFocus;
private Highlighter colorLine;
public VatChartTreeTable(VatChartViewHandler handler) {
this.handler = handler;
- //Change border of cell focus
- colorSelectionFocus = LimaConfig.getInstance().getColorSelectionFocus();
- UIManager.put("Table.focusCellHighlightBorder", new BorderUIResource(new LineBorder(colorSelectionFocus, 2)));
-
addKeyListener(this);
addMouseListener(this);
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-07-31 14:09:36 UTC (rev 3556)
+++ trunk/pom.xml 2012-08-01 09:07:09 UTC (rev 3557)
@@ -345,7 +345,7 @@
<nuitonUtilsVersion>2.5.2-SNAPSHOT</nuitonUtilsVersion>
<eugenePluginVersion>2.4.2</eugenePluginVersion>
<topiaVersion>2.6.11</topiaVersion>
- <jaxxVersion>2.5.3-SNAPSHOT</jaxxVersion>
+ <jaxxVersion>2.5.4-SNAPSHOT</jaxxVersion>
<nuitonI18nVersion>2.4.1</nuitonI18nVersion>
<openEjbVersion>4.0.0</openEjbVersion>
<slf4jVersion>1.6.6</slf4jVersion>
1
0