Author: tchemit Date: 2011-09-17 15:50:17 +0200 (Sat, 17 Sep 2011) New Revision: 3292 Url: http://chorem.org/repositories/revision/lima/3292 Log: Evolution #456: Nettoyage du code des ui Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ClosableTabHeader.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountImportForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateAccountForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateSubLedgerForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/EntryBookTableCellEditor.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookImportForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBookComboBox.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementHeaderForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementImportForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementMovementForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsEntryBookForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateAccountsPanel.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateEntryBookPanel.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartImportForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartMovementForm.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/util/ReportDialogView.jaxx Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ClosableTabHeader.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ClosableTabHeader.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ClosableTabHeader.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,35 +24,30 @@ --> <Table insets='0,0,0,0' opaque='false'> - <script> - <![CDATA[ - - import java.awt.Dimension; - - ]]> - </script> - - - <String id="title" javaBean='null' /> - <Boolean id="canClose" javaBean='true'/> + <import> + java.awt.Dimension + </import> - <row fill='both'> - <cell anchor='west' weightx="1" insets='0,0,0,0'> - <JLabel id='label' opaque='false' font-size='12' - verticalAlignment='center' verticalTextPosition='0' - text='{getTitle()}'/> - </cell> - <cell anchor='east' insets='2,15,0,0' weighty='0'> - <JButton id='closeTab' preferredSize='{new Dimension(16,16)}' - verticalAlignment='0' - verticalTextPosition='0' - opaque='true' - borderPainted='false' - focusPainted='false' - enabled='{isCanClose()}' - horizontalTextPosition='0' - actionIcon='closeTab' - /> - </cell> - </row> + <String id="title" javaBean='null'/> + <Boolean id="canClose" javaBean='true'/> + + <row fill='both'> + <cell anchor='west' weightx="1" insets='0,0,0,0'> + <JLabel id='label' opaque='false' font-size='12' + verticalAlignment='center' verticalTextPosition='0' + text='{getTitle()}'/> + </cell> + <cell anchor='east' insets='2,15,0,0' weighty='0'> + <JButton id='closeTab' preferredSize='{new Dimension(16,16)}' + verticalAlignment='0' + verticalTextPosition='0' + opaque='true' + borderPainted='false' + focusPainted='false' + enabled='{isCanClose()}' + horizontalTextPosition='0' + actionIcon='closeTab' + /> + </cell> + </row> </Table> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -22,31 +22,35 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> - + <JFrame title="lima.title" onWindowClosing="getHandler().close(this)" defaultCloseOperation="do_nothing_on_close" undecorated='{getConfig().isFullScreen()}' resizable="true" width="800" height="600" extendedState='{this.MAXIMIZED_BOTH}' iconImage='{new ImageIcon(getClass().getResource("/images/puzzle_icon.png")).getImage()}'> - -<java.awt.Desktop id='desktop' javaBean='java.awt.Desktop.getDesktop()'/> - <script><![CDATA[ - import java.util.Locale; - import org.chorem.lima.LimaConfig; - import org.chorem.lima.enums.ImportExportEnum; - import java.net.URISyntaxException; - import java.net.URI; - import org.chorem.lima.business.HttpServerServiceMonitorable; - import org.chorem.lima.service.LimaServiceFactory; - import java.awt.Component; - import javax.swing.BoxLayout; - import javax.swing.border.EtchedBorder; - import javax.swing.ImageIcon; - import java.io.IOException; - import javax.swing.JButton; + <import> + java.awt.Component + java.awt.Desktop + java.io.IOException + java.net.URI + java.net.URISyntaxException + java.util.Locale + javax.swing.BoxLayout + javax.swing.border.EtchedBorder + javax.swing.ImageIcon + javax.swing.JButton + org.chorem.lima.LimaConfig + org.chorem.lima.business.HttpServerServiceMonitorable + org.chorem.lima.enums.ImportExportEnum + org.chorem.lima.service.LimaServiceFactory + </import> + + <Desktop id='desktop' javaBean='Desktop.getDesktop()'/> + <script><![CDATA[ + public LimaConfig getConfig() { return getContextValue(LimaConfig.class); } @@ -114,139 +118,175 @@ showTab(name, container, true); } ]]> - </script> - - <JMenuBar> - - <JMenu text="lima.menu.file"> - <JMenu text="lima.importexport.csv"> - <JMenu text="lima.importexport.import" actionIcon='import-element'> - <JMenuItem text="lima.importexport.all" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ALL_IMPORT)'/> - <JMenuItem text="lima.importexport.accountcharts" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ACCOUNTCHARTS_IMPORT)'/> - <JMenuItem text="lima.common.entrybooks" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_IMPORT)'/> - <JMenuItem text="lima.importexport.financialstatements" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_FINANCIALSTATEMENTS_IMPORT)'/> - <JMenuItem text="lima.importexport.vatstatements" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_VAT_IMPORT)'/> - </JMenu> - <JMenu text="lima.importexport.export" actionIcon='export-element'> - <JMenuItem text="lima.importexport.all" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ALL_EXPORT)'/> - <JMenuItem text="lima.importexport.accountcharts" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ACCOUNTCHARTS_EXPORT)'/> - <JMenuItem text="lima.common.entrybooks" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_EXPORT)'/> - <JMenuItem text="lima.importexport.financialstatements" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_FINANCIALSTATEMENTS_EXPORT)'/> - <JMenuItem text="lima.importexport.vatstatements" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_VAT_EXPORT)'/> - </JMenu> - </JMenu> - <JMenu text="lima.importexport.ebp"> - <JMenu text="lima.importexport.import" actionIcon='import-element'> - <JMenuItem text="lima.importexport.accountcharts" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.EBP_ACCOUNTCHARTS_IMPORT)'/> - <JMenuItem text="lima.importexport.entries" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.EBP_ENTRIES_IMPORT)'/> - </JMenu> - <JMenu text="lima.importexport.export" actionIcon='export-element'> - <JMenuItem text="lima.importexport.accountcharts" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.EBP_ACCOUNTCHARTS_EXPORT)'/> - <JMenuItem text="lima.importexport.entries" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.EBP_ENTRIES_EXPORT)'/> - </JMenu> - </JMenu> - <JSeparator/> - <JMenuItem actionIcon='documents' text="lima.documents" - onActionPerformed="loadURI()"/> - <JSeparator/> - <JMenuItem text="lima.identity" - actionIcon="identity" onActionPerformed="getHandler().showIdentity(this)"/> - <JMenuItem text="lima.preferences" - actionIcon="config" onActionPerformed="getHandler().showConfig(this)"/> - <JSeparator/> - <JMenuItem mnemonic="{'Q'}" - actionIcon='quit' - text="lima.common.quit" onActionPerformed='getHandler().close(this)'/> - </JMenu> + </script> - <JMenu text="lima.structure" mnemonic="{'S'}"> - <JMenuItem text="lima.charts.account" onActionPerformed='getHandler().showAccountView(this)' - actionIcon='charts-accounts'/> - <JMenuItem text="lima.common.entrybooks" onActionPerformed='getHandler().showEntryBookView(this)' - actionIcon='charts-entrybooks'/> - <JMenuItem text="lima.charts.fiscalyear" onActionPerformed='getHandler().showFiscalPeriodView(this)' - actionIcon='charts-fiscalperiod'/> - <JMenuItem text="lima.charts.financialperiod" onActionPerformed='getHandler().showFinancialPeriodView(this)' - actionIcon='charts-financialperiod'/> - <JMenuItem text="lima.charts.financialstatement" onActionPerformed='getHandler().showFinancialStatementView(this)' - actionIcon='charts-financialstatements'/> - <JMenu text="lima.charts.vatstatement" actionIcon='charts-vatstatements'> - <JMenuItem text="lima.charts.vatstatement" onActionPerformed='getHandler().showVatChartView(this)' - actionIcon='charts-vatstatements'/> - <JMenuItem text="lima.charts.vatpdf" onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.PDF_VAT_IMPORT)' - actionIcon='charts-vatstatements'/> - </JMenu> - </JMenu> + <JMenuBar> - <JMenu text="lima.entries" mnemonic="{'E'}"> - <JMenuItem text="lima.entries.writetransaction" onActionPerformed='getHandler().showTransactionView(this)' - actionIcon='entries-balanced'/> - <JMenuItem text="lima.entries.searchunbalancedtransaction" onActionPerformed='getHandler().showTransactionUnbalancedView(this)' - actionIcon='entries-unbalanced'/> - <JMenuItem text="lima.entries.searchtransaction" onActionPerformed='getHandler().showTransactionSearchView(this)' - actionIcon='entries-search'/> - <JMenuItem text="lima.entries.lettering" onActionPerformed='getHandler().showLetteringView(this)' - actionIcon='lettering'/> + <JMenu text="lima.menu.file"> + <JMenu text="lima.importexport.csv"> + <JMenu text="lima.importexport.import" actionIcon='import-element'> + <JMenuItem text="lima.importexport.all" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ALL_IMPORT)'/> + <JMenuItem text="lima.importexport.accountcharts" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ACCOUNTCHARTS_IMPORT)'/> + <JMenuItem text="lima.common.entrybooks" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_IMPORT)'/> + <JMenuItem text="lima.importexport.financialstatements" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_FINANCIALSTATEMENTS_IMPORT)'/> + <JMenuItem text="lima.importexport.vatstatements" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_VAT_IMPORT)'/> </JMenu> - <JMenu text="lima.reports" mnemonic="{'R'}"> - <JMenuItem text="lima.reports.accounts" onActionPerformed='getHandler().showAccountReports(this)' - actionIcon='reports-account'/> - <JMenuItem text="lima.reports.entrybooks" onActionPerformed='getHandler().showEntryBookReports(this)' - actionIcon='reports-entrybook'/> - <JMenuItem text="lima.reports.balance" onActionPerformed='getHandler().showBalanceView(this)' - actionIcon='reports-balance'/> - <JMenuItem text="lima.reports.ledger" onActionPerformed='getHandler().showLedgerView(this)' - actionIcon='reports-ledger'/> - <JMenuItem text="lima.reports.financialstatement" onActionPerformed='getHandler().showFinancialStatementReportsView(this)' - actionIcon='reports-financialstatement'/> - <JMenuItem text="lima.reports.vat" onActionPerformed='getHandler().showVatReportView(this)' - actionIcon='reports-vatstatement'/> - + <JMenu text="lima.importexport.export" actionIcon='export-element'> + <JMenuItem text="lima.importexport.all" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ALL_EXPORT)'/> + <JMenuItem text="lima.importexport.accountcharts" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ACCOUNTCHARTS_EXPORT)'/> + <JMenuItem text="lima.common.entrybooks" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_ENTRYBOOKS_EXPORT)'/> + <JMenuItem text="lima.importexport.financialstatements" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_FINANCIALSTATEMENTS_EXPORT)'/> + <JMenuItem text="lima.importexport.vatstatements" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.CSV_VAT_EXPORT)'/> </JMenu> + </JMenu> + <JMenu text="lima.importexport.ebp"> + <JMenu text="lima.importexport.import" actionIcon='import-element'> + <JMenuItem text="lima.importexport.accountcharts" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.EBP_ACCOUNTCHARTS_IMPORT)'/> + <JMenuItem text="lima.importexport.entries" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.EBP_ENTRIES_IMPORT)'/> + </JMenu> + <JMenu text="lima.importexport.export" actionIcon='export-element'> + <JMenuItem text="lima.importexport.accountcharts" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.EBP_ACCOUNTCHARTS_EXPORT)'/> + <JMenuItem text="lima.importexport.entries" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.EBP_ENTRIES_EXPORT)'/> + </JMenu> + </JMenu> + <JSeparator/> + <JMenuItem actionIcon='documents' text="lima.documents" + onActionPerformed="loadURI()"/> + <JSeparator/> + <JMenuItem text="lima.identity" + actionIcon="identity" + onActionPerformed="getHandler().showIdentity(this)"/> + <JMenuItem text="lima.preferences" + actionIcon="config" + onActionPerformed="getHandler().showConfig(this)"/> + <JSeparator/> + <JMenuItem mnemonic="{'Q'}" + actionIcon='quit' + text="lima.common.quit" + onActionPerformed='getHandler().close(this)'/> + </JMenu> - <JMenu text="lima.menu.window" mnemonic="{'W'}"> - <JMenuItem id='menuFileFullscreen' - text="lima.action.fullscreen" - toolTipText="lima.action.fullscreen.tip" - actionIcon="fullscreen" - mnemonic="P" - visible="{!isUndecorated()}" - onActionPerformed="getHandler().changeScreen(this, true)"/> - <JMenuItem id='menuFileNormalscreen' - text="lima.action.normalscreen" - toolTipText="lima.action.normalscreen.tip" - actionIcon="leave-fullscreen" - mnemonic="N" - visible="{isUndecorated()}" - onActionPerformed="getHandler().changeScreen(this, false)"/> - </JMenu> - - <JMenu text="lima.menu.help" mnemonic="{'H'}"> + <JMenu text="lima.structure" mnemonic="{'S'}"> + <JMenuItem text="lima.charts.account" + onActionPerformed='getHandler().showAccountView(this)' + actionIcon='charts-accounts'/> + <JMenuItem text="lima.common.entrybooks" + onActionPerformed='getHandler().showEntryBookView(this)' + actionIcon='charts-entrybooks'/> + <JMenuItem text="lima.charts.fiscalyear" + onActionPerformed='getHandler().showFiscalPeriodView(this)' + actionIcon='charts-fiscalperiod'/> + <JMenuItem text="lima.charts.financialperiod" + onActionPerformed='getHandler().showFinancialPeriodView(this)' + actionIcon='charts-financialperiod'/> + <JMenuItem text="lima.charts.financialstatement" + onActionPerformed='getHandler().showFinancialStatementView(this)' + actionIcon='charts-financialstatements'/> + <JMenu text="lima.charts.vatstatement" actionIcon='charts-vatstatements'> + <JMenuItem text="lima.charts.vatstatement" + onActionPerformed='getHandler().showVatChartView(this)' + actionIcon='charts-vatstatements'/> + <JMenuItem text="lima.charts.vatpdf" + onActionPerformed='getHandler().showImportExportView(this, ImportExportEnum.PDF_VAT_IMPORT)' + actionIcon='charts-vatstatements'/> + </JMenu> + </JMenu> - <JMenuItem id="help" text='lima.menu.help.help' actionIcon="help" - onActionPerformed="getHandler().showHelp(this, null)"/> + <JMenu text="lima.entries" mnemonic="{'E'}"> + <JMenuItem text="lima.entries.writetransaction" + onActionPerformed='getHandler().showTransactionView(this)' + actionIcon='entries-balanced'/> + <JMenuItem text="lima.entries.searchunbalancedtransaction" + onActionPerformed='getHandler().showTransactionUnbalancedView(this)' + actionIcon='entries-unbalanced'/> + <JMenuItem text="lima.entries.searchtransaction" + onActionPerformed='getHandler().showTransactionSearchView(this)' + actionIcon='entries-search'/> + <JMenuItem text="lima.entries.lettering" + onActionPerformed='getHandler().showLetteringView(this)' + actionIcon='lettering'/> + </JMenu> + <JMenu text="lima.reports" mnemonic="{'R'}"> + <JMenuItem text="lima.reports.accounts" + onActionPerformed='getHandler().showAccountReports(this)' + actionIcon='reports-account'/> + <JMenuItem text="lima.reports.entrybooks" + onActionPerformed='getHandler().showEntryBookReports(this)' + actionIcon='reports-entrybook'/> + <JMenuItem text="lima.reports.balance" + onActionPerformed='getHandler().showBalanceView(this)' + actionIcon='reports-balance'/> + <JMenuItem text="lima.reports.ledger" + onActionPerformed='getHandler().showLedgerView(this)' + actionIcon='reports-ledger'/> + <JMenuItem text="lima.reports.financialstatement" + onActionPerformed='getHandler().showFinancialStatementReportsView(this)' + actionIcon='reports-financialstatement'/> + <JMenuItem text="lima.reports.vat" + onActionPerformed='getHandler().showVatReportView(this)' + actionIcon='reports-vatstatement'/> - <JMenuItem id="site" text='lima.menu.help.site' actionIcon="site" - onActionPerformed="getHandler().gotoSite(this)"/> + </JMenu> - <JMenuItem id="about" text='lima.menu.help.about' actionIcon="about" - onActionPerformed="getHandler().showAbout(this)"/> + <JMenu text="lima.menu.window" mnemonic="{'W'}"> + <JMenuItem id='menuFileFullscreen' + text="lima.action.fullscreen" + toolTipText="lima.action.fullscreen.tip" + actionIcon="fullscreen" + mnemonic="P" + visible="{!isUndecorated()}" + onActionPerformed="getHandler().changeScreen(this, true)"/> + <JMenuItem id='menuFileNormalscreen' + text="lima.action.normalscreen" + toolTipText="lima.action.normalscreen.tip" + actionIcon="leave-fullscreen" + mnemonic="N" + visible="{isUndecorated()}" + onActionPerformed="getHandler().changeScreen(this, false)"/> + </JMenu> - <JMenu text='lima.menu.help.i18n' mnemonic="{'L'}" actionIcon="translate"> + <JMenu text="lima.menu.help" mnemonic="{'H'}"> - <JMenuItem id="i18n_fr" actionIcon="i18n-fr" text='lima.menu.help.i18n.fr' - enabled='{!acceptLocale(getConfig().getLocale(), "fr_FR")}' - onActionPerformed="getHandler().changeLanguage(this, Locale.FRANCE)"/> + <JMenuItem id="help" text='lima.menu.help.help' actionIcon="help" + onActionPerformed="getHandler().showHelp(this, null)"/> - <JMenuItem id="i18n_en" actionIcon="i18n-uk" text='lima.menu.help.i18n.uk' - enabled='{!acceptLocale(getConfig().getLocale(), "en_GB")}' - onActionPerformed="getHandler().changeLanguage(this, Locale.UK)"/> + <JMenuItem id="site" text='lima.menu.help.site' actionIcon="site" + onActionPerformed="getHandler().gotoSite(this)"/> - </JMenu> - </JMenu> - </JMenuBar> - <JPanel layout='{new BorderLayout()}'> - <JTabbedPane id="contentTabbedPane" constraints="BorderLayout.CENTER"/> - </JPanel> + <JMenuItem id="about" text='lima.menu.help.about' actionIcon="about" + onActionPerformed="getHandler().showAbout(this)"/> + <JMenu text='lima.menu.help.i18n' mnemonic="{'L'}" actionIcon="translate"> + + <JMenuItem id="i18n_fr" actionIcon="i18n-fr" + text='lima.menu.help.i18n.fr' + enabled='{!acceptLocale(getConfig().getLocale(), "fr_FR")}' + onActionPerformed="getHandler().changeLanguage(this, Locale.FRANCE)"/> + + <JMenuItem id="i18n_en" actionIcon="i18n-uk" + text='lima.menu.help.i18n.uk' + enabled='{!acceptLocale(getConfig().getLocale(), "en_GB")}' + onActionPerformed="getHandler().changeLanguage(this, Locale.UK)"/> + + </JMenu> + </JMenu> + </JMenuBar> + <JPanel layout='{new BorderLayout()}'> + <JTabbedPane id="contentTabbedPane" constraints="BorderLayout.CENTER"/> + </JPanel> + </JFrame> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -27,9 +27,14 @@ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <org.chorem.lima.entity.Account id="account" javaBean='null'/> + <import> + javax.swing.text.Document + org.chorem.lima.entity.Account + </import> - <script> + <Account id="account" javaBean='null'/> + + <script> <![CDATA[ getRootPane().setDefaultButton(ok); protected void performCancel() { @@ -37,39 +42,40 @@ dispose(); } ]]> - </script> + </script> - <Table> - - <row> - <cell fill="horizontal"> - <JLabel text="lima.charts.account.number"/> - </cell> - <cell fill="horizontal"> - <JTextField id="numberTextField" text="{getAccount().getAccountNumber()}"/> - <javax.swing.text.Document javaBean="getNumberTextField().getDocument()" - onInsertUpdate='getAccount().setAccountNumber(getNumberTextField().getText())' - onRemoveUpdate='getAccount().setAccountNumber(getNumberTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.common.label"/> - </cell> - <cell fill="horizontal"> - <JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/> - <javax.swing.text.Document javaBean="getDescriptionTextField().getDocument()" - onInsertUpdate='getAccount().setLabel(getDescriptionTextField().getText())' - onRemoveUpdate='getAccount().setLabel(getDescriptionTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="none"> - <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell fill="none"> - <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> - </cell> - </row> - </Table> + <Table> + + <row> + <cell fill="horizontal"> + <JLabel text="lima.charts.account.number"/> + </cell> + <cell fill="horizontal"> + <JTextField id="numberTextField" + text="{getAccount().getAccountNumber()}"/> + <Document javaBean="getNumberTextField().getDocument()" + onInsertUpdate='getAccount().setAccountNumber(getNumberTextField().getText())' + onRemoveUpdate='getAccount().setAccountNumber(getNumberTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.common.label"/> + </cell> + <cell fill="horizontal"> + <JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/> + <Document javaBean="getDescriptionTextField().getDocument()" + onInsertUpdate='getAccount().setLabel(getDescriptionTextField().getText())' + onRemoveUpdate='getAccount().setLabel(getDescriptionTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="none"> + <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> + </cell> + <cell fill="none"> + <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountImportForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountImportForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountImportForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -27,67 +27,85 @@ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <jaxx.runtime.swing.JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/> - <Boolean id="addState" javaBean='true'/> + <import> + jaxx.runtime.swing.JAXXButtonGroup + org.chorem.lima.enums.AccountsChartEnum + </import> - <script> + <JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/> + <Boolean id="addState" javaBean='true'/> + + <script> <![CDATA[ - import org.chorem.lima.enums.AccountsChartEnum; getRootPane().setDefaultButton(ok); protected void performCancel() { getRadioButtons().setSelectedValue(null); dispose(); } ]]> - </script> + </script> - <Table> - <row> - <cell><JLabel text='lima.opening.accounts' /></cell> - </row> - <row> - <cell> - <JRadioButton text='lima.charts.account.shortened' value='{AccountsChartEnum.SHORTENED}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.charts.account.base' value='{AccountsChartEnum.BASE}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.charts.account.developed' value='{AccountsChartEnum.DEVELOPED}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.importexport.importcsv' value='{AccountsChartEnum.IMPORT}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.importexport.importebp' value='{AccountsChartEnum.IMPORTEBP}' buttonGroup="{getRadioButtons()}" - selected='true'/> + <Table> + <row> + <cell> + <JLabel text='lima.opening.accounts'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.charts.account.shortened' + value='{AccountsChartEnum.SHORTENED}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.charts.account.base' + value='{AccountsChartEnum.BASE}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.charts.account.developed' + value='{AccountsChartEnum.DEVELOPED}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.importexport.importcsv' + value='{AccountsChartEnum.IMPORT}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.importexport.importebp' + value='{AccountsChartEnum.IMPORTEBP}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <Table> + <row> + <cell fill="none"> + <JButton text="lima.common.cancel" + onActionPerformed="performCancel()"/> </cell> - </row> - <row> - <cell> - <Table> - <row> - <cell fill="none"> - <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell fill="none"> - <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> - </cell> - </row> - </Table> - </cell> - </row> - </Table> + <cell fill="none"> + <JButton id="ok" text="lima.common.ok" + onActionPerformed="dispose()"/> + </cell> + </row> + </Table> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -22,60 +22,65 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> - + <Table> - <AccountViewHandler id="handler" javaBean="new AccountViewHandler(this)" /> - <Boolean id="selectedRow" javaBean="false" /> + <import> + javax.swing.ListSelectionModel + org.jdesktop.swingx.decorator.HighlighterFactory + </import> - <script> + <AccountViewHandler id="handler" javaBean="new AccountViewHandler(this)"/> + <Boolean id="selectedRow" javaBean="false"/> + + <script> <![CDATA[ - - ]]> - </script> - <row> - <cell fill="both" weightx="1" weighty="1" rows='5'> - <JScrollPane> - <AccountTreeTable id="accountsTreeTable" - constructorParams="getHandler()" - selectionMode="{ListSelectionModel.SINGLE_SELECTION}" - treeTableModel="{new org.chorem.lima.ui.account.AccountTreeTableModel()}" - highlighters="{org.jdesktop.swingx.decorator.HighlighterFactory.createSimpleStriping(new java.awt.Color(222,222,222))}" /> - <javax.swing.ListSelectionModel - javaBean="getAccountsTreeTable().getSelectionModel()" - onValueChanged="setSelectedRow(accountsTreeTable.getSelectedRow() != -1)"/> - </JScrollPane> - </cell> - <cell fill="horizontal"> - <JButton id="addButton" text="lima.charts.account.addAccount" - onActionPerformed="getHandler().addAccount()"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="addSubLedger" text="lima.charts.account.addSubLedger" - onActionPerformed="getHandler().addSubLedger()"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="updateButton" text="lima.common.update" - onActionPerformed="getHandler().updateAccount()" - enabled="{isSelectedRow()}"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="removeButton" text="lima.common.remove" - onActionPerformed="getHandler().removeAccount()" - enabled="{isSelectedRow()}"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="importButton" text="lima.importexport.import" - onActionPerformed="getHandler().importAccountsChart()"/> - </cell> - </row> + ]]> + </script> + + <row> + <cell fill="both" weightx="1" weighty="1" rows='5'> + <JScrollPane> + <AccountTreeTable id="accountsTreeTable" + constructorParams="getHandler()" + selectionMode="{ListSelectionModel.SINGLE_SELECTION}" + treeTableModel="{new AccountTreeTableModel()}" + highlighters="{HighlighterFactory.createSimpleStriping(new java.awt.Color(222,222,222))}"/> + <ListSelectionModel + javaBean="getAccountsTreeTable().getSelectionModel()" + onValueChanged="setSelectedRow(accountsTreeTable.getSelectedRow() != -1)"/> + </JScrollPane> + </cell> + <cell fill="horizontal"> + <JButton id="addButton" text="lima.charts.account.addAccount" + onActionPerformed="getHandler().addAccount()"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="addSubLedger" text="lima.charts.account.addSubLedger" + onActionPerformed="getHandler().addSubLedger()"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="updateButton" text="lima.common.update" + onActionPerformed="getHandler().updateAccount()" + enabled="{isSelectedRow()}"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="removeButton" text="lima.common.remove" + onActionPerformed="getHandler().removeAccount()" + enabled="{isSelectedRow()}"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="importButton" text="lima.importexport.import" + onActionPerformed="getHandler().importAccountsChart()"/> + </cell> + </row> </Table> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/SubLedgerForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -27,9 +27,14 @@ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <org.chorem.lima.entity.Account id="account" javaBean='null'/> + <import> + javax.swing.text.Document + org.chorem.lima.entity.Account + </import> - <script> + <Account id="account" javaBean='null'/> + + <script> <![CDATA[ getRootPane().setDefaultButton(ok); protected void performCancel() { @@ -37,51 +42,54 @@ dispose(); } ]]> - </script> + </script> - <Table> - <row> - <cell fill="horizontal"> - <JLabel text="lima.common.code"/> - </cell> - <cell fill="horizontal"> - <JTextField id="numberTextField" - text="{getAccount().getAccountNumber()}"/> - <javax.swing.text.Document javaBean="getNumberTextField().getDocument()" - onInsertUpdate='getAccount().setAccountNumber(getNumberTextField().getText())' - onRemoveUpdate='getAccount().setAccountNumber(getNumberTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.common.label"/> - </cell> - <cell fill="horizontal"> - <JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/> - <javax.swing.text.Document javaBean="getDescriptionTextField().getDocument()" - onInsertUpdate='getAccount().setLabel(getDescriptionTextField().getText())' - onRemoveUpdate='getAccount().setLabel(getDescriptionTextField().getText())' /> - </cell> - </row> - <!-- Lien Fiche contact--> - <row> - <cell fill="horizontal"> - <JLabel text="lima.identity.contact"/> - </cell> - <cell fill="horizontal"> - <JTextField id="thirdPartyTextField" text="{getAccount().getThirdParty()}"/> - <javax.swing.text.Document javaBean="getThirdPartyTextField().getDocument()" - onInsertUpdate='getAccount().setThirdParty(getThirdPartyTextField().getText())' - onRemoveUpdate='getAccount().setThirdParty(getThirdPartyTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="none"> - <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell fill="none"> - <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> - </cell> - </row> - </Table> + <Table> + <row> + <cell fill="horizontal"> + <JLabel text="lima.common.code"/> + </cell> + <cell fill="horizontal"> + <JTextField id="numberTextField" + text="{getAccount().getAccountNumber()}"/> + <Document javaBean="getNumberTextField().getDocument()" + onInsertUpdate='getAccount().setAccountNumber(getNumberTextField().getText())' + onRemoveUpdate='getAccount().setAccountNumber(getNumberTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.common.label"/> + </cell> + <cell fill="horizontal"> + <JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/> + <Document + javaBean="getDescriptionTextField().getDocument()" + onInsertUpdate='getAccount().setLabel(getDescriptionTextField().getText())' + onRemoveUpdate='getAccount().setLabel(getDescriptionTextField().getText())'/> + </cell> + </row> + <!-- Lien Fiche contact--> + <row> + <cell fill="horizontal"> + <JLabel text="lima.identity.contact"/> + </cell> + <cell fill="horizontal"> + <JTextField id="thirdPartyTextField" + text="{getAccount().getThirdParty()}"/> + <Document + javaBean="getThirdPartyTextField().getDocument()" + onInsertUpdate='getAccount().setThirdParty(getThirdPartyTextField().getText())' + onRemoveUpdate='getAccount().setThirdParty(getThirdPartyTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="none"> + <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> + </cell> + <cell fill="none"> + <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateAccountForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateAccountForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateAccountForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -26,14 +26,19 @@ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <org.chorem.lima.entity.Account id="account" javaBean='null'/> + <import> + javax.swing.text.Document + org.chorem.lima.entity.Account + org.chorem.lima.entity.AccountImpl + org.chorem.lima.business.AccountServiceMonitorable + org.chorem.lima.business.LimaException + org.chorem.lima.service.LimaServiceFactory + </import> - <script> + <Account id="account" javaBean='null'/> + + <script> <![CDATA[ - import org.chorem.lima.business.AccountServiceMonitorable; - import org.chorem.lima.service.LimaServiceFactory; - import org.chorem.lima.business.LimaException; - import org.chorem.lima.entity.AccountImpl; getRootPane().setDefaultButton(ok); protected void performCancel() { @@ -67,44 +72,46 @@ dispose(); } ]]> - </script> + </script> - <Table> - - <row> - <cell fill="horizontal"> - <JLabel text="lima.charts.account.number"/> - </cell> - <cell fill="horizontal"> - <JTextField id="numberTextField" editable='{false}' text="{getAccount().getAccountNumber()}"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.common.label"/> - </cell> - <cell fill="horizontal"> - <JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/> - <javax.swing.text.Document javaBean="getDescriptionTextField().getDocument()" - onInsertUpdate='getAccount().setLabel(getDescriptionTextField().getText())' - onRemoveUpdate='getAccount().setLabel(getDescriptionTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.common.masteraccount"/> - </cell> - <cell fill="horizontal"> - <JTextField id="masterAccountTextField" text="{getAccount().getMasterAccount().getAccountNumber()}"/> - </cell> - </row> - <row> - <cell fill="none"> - <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell fill="none"> - <JButton id="ok" text="lima.common.ok" onActionPerformed="performOk()"/> - </cell> - </row> - </Table> + <Table> + + <row> + <cell fill="horizontal"> + <JLabel text="lima.charts.account.number"/> + </cell> + <cell fill="horizontal"> + <JTextField id="numberTextField" editable='{false}' + text="{getAccount().getAccountNumber()}"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.common.label"/> + </cell> + <cell fill="horizontal"> + <JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/> + <Document javaBean="getDescriptionTextField().getDocument()" + onInsertUpdate='getAccount().setLabel(getDescriptionTextField().getText())' + onRemoveUpdate='getAccount().setLabel(getDescriptionTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.common.masteraccount"/> + </cell> + <cell fill="horizontal"> + <JTextField id="masterAccountTextField" + text="{getAccount().getMasterAccount().getAccountNumber()}"/> + </cell> + </row> + <row> + <cell fill="none"> + <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> + </cell> + <cell fill="none"> + <JButton id="ok" text="lima.common.ok" onActionPerformed="performOk()"/> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateSubLedgerForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateSubLedgerForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/UpdateSubLedgerForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -26,15 +26,20 @@ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <org.chorem.lima.entity.Account id="account" javaBean='null'/> + <import> + javax.swing.text.Document + org.chorem.lima.entity.Account + org.chorem.lima.entity.AccountImpl + org.chorem.lima.business.AccountServiceMonitorable + org.chorem.lima.business.LimaException + org.chorem.lima.service.LimaServiceFactory + </import> - <script> + <Account id="account" javaBean='null'/> + + <script> <![CDATA[ - import org.chorem.lima.business.AccountServiceMonitorable; - import org.chorem.lima.service.LimaServiceFactory; - import org.chorem.lima.business.LimaException; - import org.chorem.lima.entity.AccountImpl; - + getRootPane().setDefaultButton(ok); protected void performCancel() { setAccount(null); @@ -67,59 +72,63 @@ dispose(); } ]]> - </script> + </script> - <Table> - <row> - <cell fill="horizontal"> - <JLabel text="lima.common.code"/> - </cell> - <cell fill="horizontal"> - <JTextField id="numberTextField" - text="{getAccount().getAccountNumber()}"/> - <javax.swing.text.Document javaBean="getNumberTextField().getDocument()" - onInsertUpdate='getAccount().setAccountNumber(getNumberTextField().getText())' - onRemoveUpdate='getAccount().setAccountNumber(getNumberTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.common.label"/> - </cell> - <cell fill="horizontal"> - <JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/> - <javax.swing.text.Document javaBean="getDescriptionTextField().getDocument()" - onInsertUpdate='getAccount().setLabel(getDescriptionTextField().getText())' - onRemoveUpdate='getAccount().setLabel(getDescriptionTextField().getText())' /> - </cell> - </row> - <!-- Lien Fiche contact--> - <row> - <cell fill="horizontal"> - <JLabel text="lima.identity.contact"/> - </cell> - <cell fill="horizontal"> - <JTextField id="thirdPartyTextField" text="{getAccount().getThirdParty()}"/> - <javax.swing.text.Document javaBean="getThirdPartyTextField().getDocument()" - onInsertUpdate='getAccount().setThirdParty(getThirdPartyTextField().getText())' - onRemoveUpdate='getAccount().setThirdParty(getThirdPartyTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.common.masteraccount"/> - </cell> - <cell fill="horizontal"> - <JTextField id="masterAccountTextField" text="{getAccount().getMasterAccount().getAccountNumber()}"/> - </cell> - </row> - <row> - <cell fill="none"> - <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell fill="none"> - <JButton id="ok" text="lima.common.ok" onActionPerformed="performOk()"/> - </cell> - </row> - </Table> + <Table> + <row> + <cell fill="horizontal"> + <JLabel text="lima.common.code"/> + </cell> + <cell fill="horizontal"> + <JTextField id="numberTextField" + text="{getAccount().getAccountNumber()}"/> + <Document javaBean="getNumberTextField().getDocument()" + onInsertUpdate='getAccount().setAccountNumber(getNumberTextField().getText())' + onRemoveUpdate='getAccount().setAccountNumber(getNumberTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.common.label"/> + </cell> + <cell fill="horizontal"> + <JTextField id="descriptionTextField" text="{getAccount().getLabel()}"/> + <Document + javaBean="getDescriptionTextField().getDocument()" + onInsertUpdate='getAccount().setLabel(getDescriptionTextField().getText())' + onRemoveUpdate='getAccount().setLabel(getDescriptionTextField().getText())'/> + </cell> + </row> + <!-- Lien Fiche contact--> + <row> + <cell fill="horizontal"> + <JLabel text="lima.identity.contact"/> + </cell> + <cell fill="horizontal"> + <JTextField id="thirdPartyTextField" + text="{getAccount().getThirdParty()}"/> + <Document + javaBean="getThirdPartyTextField().getDocument()" + onInsertUpdate='getAccount().setThirdParty(getThirdPartyTextField().getText())' + onRemoveUpdate='getAccount().setThirdParty(getThirdPartyTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.common.masteraccount"/> + </cell> + <cell fill="horizontal"> + <JTextField id="masterAccountTextField" + text="{getAccount().getMasterAccount().getAccountNumber()}"/> + </cell> + </row> + <row> + <cell fill="none"> + <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> + </cell> + <cell fill="none"> + <JButton id="ok" text="lima.common.ok" onActionPerformed="performOk()"/> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,14 +24,20 @@ --> <Table> - <AccountsReportsViewHandler id="handler" javaBean="new AccountsReportsViewHandler(this)" /> - <Boolean id="selectedRow" javaBean="false" /> - <org.chorem.lima.ui.accountsreports.AccountsReportsTableModel id="modelAccountsReportsTable"/> - <script> + + <import> + javax.swing.ListSelectionModel + org.jdesktop.swingx.decorator.HighlighterFactory + org.chorem.lima.enums.ComboBoxDatesEnum + org.chorem.lima.ui.accountsreports.AccountComboBox + </import> + + <AccountsReportsViewHandler id="handler" + javaBean="new AccountsReportsViewHandler(this)"/> + <Boolean id="selectedRow" javaBean="false"/> + <AccountsReportsTableModel id="modelAccountsReportsTable"/> + <script> <![CDATA[ - - import org.chorem.lima.enums.ComboBoxDatesEnum; - import org.chorem.lima.ui.accountsreports.AccountComboBox; AccountsReportsPeriodSearchPanel periodSearchPanel = new AccountsReportsPeriodSearchPanel(handler); AccountComboBox comboBox = new AccountComboBox(handler); @@ -39,66 +45,77 @@ } ]]> - </script> - <row weightx="1" weighty="0" anchor="center"> - <cell fill='both'><Table><row> - <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())" - onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem())); - validate(); repaint()"/></cell> - <cell><AccountsReportsPeriodSearchPanel javaBean="periodSearchPanel"/></cell> - </row></Table></cell> - <cell anchor="east"> - <JLabel id="accountSelectorLabel" text="lima.common.account"/> - </cell> - <cell anchor="west"> - <JComboBox javaBean='comboBox' /> - </cell> - <cell> - <JButton id="back" text="lima.common.buttonback" - onActionPerformed="comboBox.back()"/> - </cell> - <cell> - <JButton id="next" text="lima.common.buttonnext" - onActionPerformed="comboBox.next()"/> - </cell> - </row> - <row> - <cell fill="both" weightx="1" weighty="1" columns="6"> - <JScrollPane> - <org.chorem.lima.ui.accountsreports.AccountsReportsTable id="accountsReportsTable" rowHeight="24" - constructorParams="getHandler()" - model="{getModelAccountsReportsTable()}" - highlighters="{org.jdesktop.swingx.decorator.HighlighterFactory.createSimpleStriping(new java.awt.Color(222,222,222))}" - selectionMode="{ListSelectionModel.SINGLE_SELECTION}" - columnControlVisible="true"/> - <javax.swing.ListSelectionModel javaBean="getAccountsReportsTable().getSelectionModel()"/> - </JScrollPane> - </cell> - </row> - <row> - <cell fill="horizontal" weightx="1" columns="7"> - <Table> - <row fill="horizontal" weightx="1"> - <cell> - <JLabel text="lima.common.amountdebit" /> - </cell> - <cell> - <JLabel id="amountDebitLabel" /> - </cell> - <cell> - <JLabel text="lima.common.amountcredit"/> - </cell> - <cell> - <JLabel id="amountCreditLabel" /> - </cell> - <cell> - <JLabel id="soldeLabel" text="lima.common.solde"/> - </cell> - <cell> - <JLabel id="amountSoldeLabel"/> - </cell> - </row> - </Table> - </cell> - </row> + </script> + <row weightx="1" weighty="0" anchor="center"> + <cell fill='both'> + <Table> + <row> + <cell anchor="west"> + <JComboBox id="periodComboBox" + javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())" + onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem())); + validate(); repaint()"/> + </cell> + <cell> + <AccountsReportsPeriodSearchPanel javaBean="periodSearchPanel"/> + </cell> + </row> + </Table> + </cell> + <cell anchor="east"> + <JLabel id="accountSelectorLabel" text="lima.common.account"/> + </cell> + <cell anchor="west"> + <JComboBox javaBean='comboBox'/> + </cell> + <cell> + <JButton id="back" text="lima.common.buttonback" + onActionPerformed="comboBox.back()"/> + </cell> + <cell> + <JButton id="next" text="lima.common.buttonnext" + onActionPerformed="comboBox.next()"/> + </cell> + </row> + <row> + <cell fill="both" weightx="1" weighty="1" columns="6"> + <JScrollPane> + <AccountsReportsTable + id="accountsReportsTable" rowHeight="24" + constructorParams="getHandler()" + model="{getModelAccountsReportsTable()}" + highlighters="{HighlighterFactory.createSimpleStriping(new java.awt.Color(222,222,222))}" + selectionMode="{ListSelectionModel.SINGLE_SELECTION}" + columnControlVisible="true"/> + <ListSelectionModel + javaBean="getAccountsReportsTable().getSelectionModel()"/> + </JScrollPane> + </cell> + </row> + <row> + <cell fill="horizontal" weightx="1" columns="7"> + <Table> + <row fill="horizontal" weightx="1"> + <cell> + <JLabel text="lima.common.amountdebit"/> + </cell> + <cell> + <JLabel id="amountDebitLabel"/> + </cell> + <cell> + <JLabel text="lima.common.amountcredit"/> + </cell> + <cell> + <JLabel id="amountCreditLabel"/> + </cell> + <cell> + <JLabel id="soldeLabel" text="lima.common.solde"/> + </cell> + <cell> + <JLabel id="amountSoldeLabel"/> + </cell> + </row> + </Table> + </cell> + </row> </Table> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,13 +24,21 @@ --> <Table> - <BalanceViewHandler id="handler" javaBean="new BalanceViewHandler(this)" /> - <Boolean id="selectedRow" javaBean="false" /> - <org.chorem.lima.ui.balance.BalanceTableModel id="modelBalanceTable"/> - <script> + + <import> + javax.swing.ListSelectionModel + javax.swing.text.Document + org.jdesktop.swingx.decorator.HighlighterFactory + org.chorem.lima.business.utils.FormatsEnum + org.chorem.lima.enums.ComboBoxDatesEnum + </import> + + <BalanceViewHandler id="handler" javaBean="new BalanceViewHandler(this)"/> + <Boolean id="selectedRow" javaBean="false"/> + <BalanceTableModel id="modelBalanceTable"/> + <script> <![CDATA[ - - import org.chorem.lima.enums.ComboBoxDatesEnum; + BalancePeriodSearchPanel periodSearchPanel = new BalancePeriodSearchPanel(handler); void $afterCompleteSetup() { @@ -38,73 +46,86 @@ ]]> - </script> - <row weightx="1" weighty="0" anchor="center"> - <cell fill='both'><Table><row> - <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())" - onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem())); - validate(); repaint()"/></cell> - <cell><BalancePeriodSearchPanel javaBean="periodSearchPanel"/></cell> - </row></Table></cell> - <cell anchor="east"> - <JLabel text="lima.common.filter"/> - </cell> - <cell anchor="west"> - <JTextField id='balanceFilter' toolTipText="lima.tooltip.filter" minimumSize='{balanceFilter.getPreferredSize()}'/> - <javax.swing.text.Document javaBean="balanceFilter.getDocument()" - onInsertUpdate='handler.setAccountFilter(balanceFilter.getText())' - onRemoveUpdate='handler.setAccountFilter(balanceFilter.getText())' /> - </cell> - <cell anchor="center"> - <JCheckBox id='movmentedFilter' text='lima.common.movmentedfilter' selected='false' - onActionPerformed="getHandler().refresh()"/> - </cell> - <cell> - <EnumEditor id='DocumentEditor' - constructorParams='org.chorem.lima.business.utils.FormatsEnum.class'/> - </cell> - <cell> - <JButton text="lima.common.ok" - onActionPerformed="getHandler().createDocument()"/> - </cell> - </row> - <row> - <cell fill="both" weightx="1" weighty="1" columns="8"> - <JScrollPane> - <org.chorem.lima.ui.balance.BalanceTable id="balanceTable" rowHeight="24" - constructorParams="getHandler()" - model="{getModelBalanceTable()}" - highlighters="{org.jdesktop.swingx.decorator.HighlighterFactory.createSimpleStriping(new java.awt.Color(222,222,222))}" - selectionMode="{ListSelectionModel.SINGLE_SELECTION}" - columnControlVisible="true"/> - <javax.swing.ListSelectionModel javaBean="getBalanceTable().getSelectionModel()"/> - </JScrollPane> - </cell> - </row> - <row> - <cell fill="horizontal" weightx="1" columns="7"> - <Table> - <row fill="horizontal" weightx="1"> - <cell> - <JLabel text="lima.common.amountdebit" /> - </cell> - <cell> - <JLabel id="amountDebitLabel" /> - </cell> - <cell> - <JLabel text="lima.common.amountcredit"/> - </cell> - <cell> - <JLabel id="amountCreditLabel" /> - </cell> - <cell> - <JLabel id="soldeLabel" text="lima.common.solde"/> - </cell> - <cell> - <JLabel id="amountSoldeLabel"/> - </cell> - </row> - </Table> - </cell> - </row> + </script> + <row weightx="1" weighty="0" anchor="center"> + <cell fill='both'> + <Table> + <row> + <cell anchor="west"> + <JComboBox id="periodComboBox" + javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())" + onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem())); + validate(); repaint()"/> + </cell> + <cell> + <BalancePeriodSearchPanel javaBean="periodSearchPanel"/> + </cell> + </row> + </Table> + </cell> + <cell anchor="east"> + <JLabel text="lima.common.filter"/> + </cell> + <cell anchor="west"> + <JTextField id='balanceFilter' toolTipText="lima.tooltip.filter" + minimumSize='{balanceFilter.getPreferredSize()}'/> + <Document javaBean="balanceFilter.getDocument()" + onInsertUpdate='handler.setAccountFilter(balanceFilter.getText())' + onRemoveUpdate='handler.setAccountFilter(balanceFilter.getText())'/> + </cell> + <cell anchor="center"> + <JCheckBox id='movmentedFilter' text='lima.common.movmentedfilter' + selected='false' + onActionPerformed="getHandler().refresh()"/> + </cell> + <cell> + <EnumEditor id='DocumentEditor' + constructorParams='FormatsEnum.class'/> + </cell> + <cell> + <JButton text="lima.common.ok" + onActionPerformed="getHandler().createDocument()"/> + </cell> + </row> + <row> + <cell fill="both" weightx="1" weighty="1" columns="8"> + <JScrollPane> + <BalanceTable id="balanceTable" + rowHeight="24" + constructorParams="getHandler()" + model="{getModelBalanceTable()}" + highlighters="{HighlighterFactory.createSimpleStriping(new java.awt.Color(222,222,222))}" + selectionMode="{ListSelectionModel.SINGLE_SELECTION}" + columnControlVisible="true"/> + <ListSelectionModel + javaBean="getBalanceTable().getSelectionModel()"/> + </JScrollPane> + </cell> + </row> + <row> + <cell fill="horizontal" weightx="1" columns="7"> + <Table> + <row fill="horizontal" weightx="1"> + <cell> + <JLabel text="lima.common.amountdebit"/> + </cell> + <cell> + <JLabel id="amountDebitLabel"/> + </cell> + <cell> + <JLabel text="lima.common.amountcredit"/> + </cell> + <cell> + <JLabel id="amountCreditLabel"/> + </cell> + <cell> + <JLabel id="soldeLabel" text="lima.common.solde"/> + </cell> + <cell> + <JLabel id="amountSoldeLabel"/> + </cell> + </row> + </Table> + </cell> + </row> </Table> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/EntryBookTableCellEditor.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/EntryBookTableCellEditor.java 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/EntryBookTableCellEditor.java 2011-09-17 13:50:17 UTC (rev 3292) @@ -29,13 +29,14 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.ui.combobox.EntryBookComboBoxModel; -import org.chorem.lima.ui.combobox.EntryBookRenderer; +import org.chorem.lima.ui.renderers.RendererUtil; import org.chorem.lima.util.EntryBookToString; import org.chorem.lima.widgets.JWideComboBox; import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator; import javax.swing.AbstractCellEditor; import javax.swing.JTable; +import javax.swing.ListCellRenderer; import javax.swing.SwingUtilities; import javax.swing.table.TableCellEditor; import javax.swing.text.JTextComponent; @@ -61,8 +62,9 @@ comboBox = new JWideComboBox(); EntryBookComboBoxModel entryBookComboBoxModel = new EntryBookComboBoxModel(); comboBox.setModel(entryBookComboBoxModel); - EntryBookRenderer entryBookRenderer = new EntryBookRenderer(); - comboBox.setRenderer(entryBookRenderer); + ListCellRenderer renderer = + RendererUtil.newDecoratorListCellRenderer(EntryBook.class); + comboBox.setRenderer(renderer); // AutoCompletion AutoCompleteDecorator.decorate(comboBox, EntryBookToString.getInstance()); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -26,10 +26,14 @@ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <org.chorem.lima.entity.EntryBook id="entryBook" javaBean="null" /> - <Boolean id="addState" javaBean='true'/> + <import> + javax.swing.text.Document + org.chorem.lima.entity.EntryBook + </import> + <EntryBook id="entryBook" javaBean="null"/> + <Boolean id="addState" javaBean='true'/> - <script> + <script> <![CDATA[ getRootPane().setDefaultButton(okButton); protected void performCancel() { @@ -37,39 +41,42 @@ dispose(); } ]]> - </script> + </script> - <Table> - <row> - <cell> - <JLabel text="lima.common.code"/> - </cell> - <cell> - <JTextField id="entryBookCodeField" text="{getEntryBook().getCode()}"/> - <javax.swing.text.Document javaBean="getEntryBookCodeField().getDocument()" - onInsertUpdate='getEntryBook().setCode(getEntryBookCodeField().getText())' - onRemoveUpdate='getEntryBook().setCode(getEntryBookCodeField().getText())' /> - </cell> - </row> - <row> - <cell> - <JLabel text="lima.common.label"/> - </cell> - <cell> - <JTextField id="entryBookLabelField" editable='{isAddState()}' text="{getEntryBook().getLabel()}"/> - <javax.swing.text.Document javaBean="getEntryBookLabelField().getDocument()" - onInsertUpdate='getEntryBook().setLabel(getEntryBookLabelField().getText())' - onRemoveUpdate='getEntryBook().setLabel(getEntryBookLabelField().getText())' /> - </cell> - </row> - <row> - <cell> - <JButton id="cancelButton" text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell> - <JButton id="okButton" text="lima.common.ok" onActionPerformed="dispose()"/> - </cell> + <Table> + <row> + <cell> + <JLabel text="lima.common.code"/> + </cell> + <cell> + <JTextField id="entryBookCodeField" text="{getEntryBook().getCode()}"/> + <Document javaBean="getEntryBookCodeField().getDocument()" + onInsertUpdate='getEntryBook().setCode(getEntryBookCodeField().getText())' + onRemoveUpdate='getEntryBook().setCode(getEntryBookCodeField().getText())'/> + </cell> + </row> + <row> + <cell> + <JLabel text="lima.common.label"/> + </cell> + <cell> + <JTextField id="entryBookLabelField" editable='{isAddState()}' + text="{getEntryBook().getLabel()}"/> + <Document javaBean="getEntryBookLabelField().getDocument()" + onInsertUpdate='getEntryBook().setLabel(getEntryBookLabelField().getText())' + onRemoveUpdate='getEntryBook().setLabel(getEntryBookLabelField().getText())'/> + </cell> + </row> + <row> + <cell> + <JButton id="cancelButton" text="lima.common.cancel" + onActionPerformed="performCancel()"/> + </cell> + <cell> + <JButton id="okButton" text="lima.common.ok" + onActionPerformed="dispose()"/> + </cell> - </row> - </Table> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookImportForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookImportForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookImportForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -27,44 +27,53 @@ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <jaxx.runtime.swing.JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/> - <Boolean id="addState" javaBean='true'/> + <import> + jaxx.runtime.swing.JAXXButtonGroup + org.chorem.lima.enums.EntryBooksChartEnum + </import> + <JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/> + <Boolean id="addState" javaBean='true'/> - <script> + <script> <![CDATA[ - import org.chorem.lima.enums.EntryBooksChartEnum; getRootPane().setDefaultButton(ok); protected void performCancel() { getRadioButtons().setSelectedValue(null); dispose(); } ]]> - </script> + </script> - <Table> - <row> - <cell> - <JRadioButton text='lima.charts.entrybook.default' value='{EntryBooksChartEnum.DEFAULT}' buttonGroup="{getRadioButtons()}" - selected='true'/> + <Table> + <row> + <cell> + <JRadioButton text='lima.charts.entrybook.default' + value='{EntryBooksChartEnum.DEFAULT}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + <cell> + <JRadioButton text='lima.charts.entrybook.import' + value='{EntryBooksChartEnum.IMPORT}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <Table> + <row> + <cell fill="none"> + <JButton text="lima.common.cancel" + onActionPerformed="performCancel()"/> </cell> - <cell> - <JRadioButton text='lima.charts.entrybook.import' value='{EntryBooksChartEnum.IMPORT}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <Table> - <row> - <cell fill="none"> - <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell fill="none"> - <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> - </cell> - </row> - </Table> - </cell> - </row> - </Table> + <cell fill="none"> + <JButton id="ok" text="lima.common.ok" + onActionPerformed="dispose()"/> + </cell> + </row> + </Table> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -25,52 +25,53 @@ <Table> - <EntryBookViewHandler id="handler" javaBean="new EntryBookViewHandler(this)" /> - <!-- Selected row bindings --> - <Boolean id="selectedRow" javaBean="false" /> + <import> + java.awt.Dimension + javax.swing.ListSelectionModel + </import> - <script> - <![CDATA[ - import java.awt.Dimension; + <EntryBookViewHandler id="handler" javaBean="new EntryBookViewHandler(this)"/> + <!-- Selected row bindings --> + <Boolean id="selectedRow" javaBean="false"/> - ]]> - </script> - <row> - <cell fill="both" weightx="1" weighty="1" rows='5'> - <JScrollPane> - <EntryBookTable id="entryBooksTable" rowHeight="24" - constructorParams="getHandler()" - model="{new org.chorem.lima.ui.entrybook.EntryBookTableModel()}" - highlighters="{org.jdesktop.swingx.decorator.HighlighterFactory.createSimpleStriping(new java.awt.Color(222,222,222))}" - selectionMode="{ListSelectionModel.SINGLE_SELECTION}" - columnControlVisible="true"/> - <javax.swing.ListSelectionModel javaBean="getEntryBooksTable().getSelectionModel()" - onValueChanged="setSelectedRow(entryBooksTable.getSelectedRow() != -1)"/> - </JScrollPane> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="addButton" text="lima.charts.entrybook.add" - onActionPerformed="getHandler().addEntryBook()"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="updateButton" text="lima.common.update" enabled="{isSelectedRow()}" - onActionPerformed="getHandler().updateEntryBook()"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="removeButton" text="lima.common.remove" enabled="{isSelectedRow()}" - onActionPerformed="getHandler().deleteEntryBook()"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="importButton" text="lima.importexport.import" - onActionPerformed="getHandler().importEntryBooks()"/> - </cell> - </row> + <row> + <cell fill="both" weightx="1" weighty="1" rows='5'> + <JScrollPane> + <EntryBookTable id="entryBooksTable" rowHeight="24" + constructorParams="getHandler()" + model="{new org.chorem.lima.ui.entrybook.EntryBookTableModel()}" + highlighters="{org.jdesktop.swingx.decorator.HighlighterFactory.createSimpleStriping(new java.awt.Color(222,222,222))}" + selectionMode="{ListSelectionModel.SINGLE_SELECTION}" + columnControlVisible="true"/> + <ListSelectionModel javaBean="getEntryBooksTable().getSelectionModel()" + onValueChanged="setSelectedRow(entryBooksTable.getSelectedRow() != -1)"/> + </JScrollPane> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="addButton" text="lima.charts.entrybook.add" + onActionPerformed="getHandler().addEntryBook()"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="updateButton" text="lima.common.update" + enabled="{isSelectedRow()}" + onActionPerformed="getHandler().updateEntryBook()"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="removeButton" text="lima.common.remove" + enabled="{isSelectedRow()}" + onActionPerformed="getHandler().deleteEntryBook()"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="importButton" text="lima.importexport.import" + onActionPerformed="getHandler().importEntryBooks()"/> + </cell> + </row> </Table> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBookComboBox.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBookComboBox.java 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBookComboBox.java 2011-09-17 13:50:17 UTC (rev 3292) @@ -25,19 +25,19 @@ package org.chorem.lima.ui.entrybooksreports; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; -import javax.swing.JComboBox; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.ui.combobox.EntryBookComboBoxModel; -import org.chorem.lima.ui.combobox.EntryBookRenderer; +import org.chorem.lima.ui.renderers.RendererUtil; import org.chorem.lima.util.EntryBookToString; import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator; +import javax.swing.JComboBox; +import java.awt.event.ActionEvent; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; + public class EntryBookComboBox extends JComboBox implements KeyListener { private static final long serialVersionUID = 1L; @@ -50,9 +50,8 @@ public EntryBookComboBox(EntryBooksReportsViewHandler handler) { this.handler = handler; EntryBookComboBoxModel entryBookComboBoxModel = new EntryBookComboBoxModel(); - EntryBookRenderer entryBookRenderer = new EntryBookRenderer(); setModel(entryBookComboBoxModel); - setRenderer(entryBookRenderer); + setRenderer(RendererUtil.newDecoratorListCellRenderer(EntryBook.class)); setEditable(true); AutoCompleteDecorator.decorate(this, EntryBookToString.getInstance()); getEditor().getEditorComponent().addKeyListener(this); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,15 +24,22 @@ --> <Table> - <EntryBooksReportsViewHandler id="handler" javaBean="new EntryBooksReportsViewHandler(this)" /> - <Boolean id="selectedRow" javaBean="false" /> - <org.chorem.lima.ui.combobox.EntryBookComboBoxModel id="modelEntryBook"/> - <org.chorem.lima.ui.entrybooksreports.EntryBooksReportsTableModel id="modelTable"/> - <script> + <import> + javax.swing.ListSelectionModel + org.chorem.lima.enums.ComboBoxDatesEnum + org.chorem.lima.ui.combobox.EntryBookComboBoxModel + org.chorem.lima.ui.entrybooksreports.EntryBookComboBox + org.chorem.lima.ui.entrybooksreports.EntryBooksReportsTable + org.chorem.lima.ui.entrybooksreports.EntryBooksReportsTableModel + </import> + <EntryBooksReportsViewHandler id="handler" + javaBean="new EntryBooksReportsViewHandler(this)"/> + <Boolean id="selectedRow" javaBean="false"/> + <EntryBookComboBoxModel id="modelEntryBook"/> + <EntryBooksReportsTableModel id="modelTable"/> + <script> <![CDATA[ - - import org.chorem.lima.enums.ComboBoxDatesEnum; - import org.chorem.lima.ui.entrybooksreports.EntryBookComboBox; + EntryBooksReportsPeriodSearchPanel periodSearchPanel = new EntryBooksReportsPeriodSearchPanel(handler); EntryBookComboBox comboBox = new EntryBookComboBox(handler); @@ -40,72 +47,83 @@ } ]]> - </script> - <row weightx="1" weighty="0" anchor="center"> - <cell fill='both'><Table><row> - <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())" - onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem())); - validate(); repaint()"/></cell> - <cell><EntryBooksReportsPeriodSearchPanel javaBean="periodSearchPanel"/></cell> - </row></Table></cell> - <cell anchor="east"> - <JLabel id="entryBookSelectorLabel" text="lima.common.entrybook"/> - </cell> - <cell anchor="west"> - <JComboBox javaBean='comboBox' /> - </cell> - <cell> - <JButton id="back" text="lima.common.buttonback" - onActionPerformed="comboBox.back()"/> - </cell> - <cell> - <JButton id="next" text="lima.common.buttonnext" - onActionPerformed="comboBox.next()"/> - </cell> - <cell> - <EnumEditor id='DocumentEditor' - constructorParams='org.chorem.lima.business.utils.FormatsEnum.class'/> - </cell> - <cell> - <JButton text="lima.common.ok" - onActionPerformed="getHandler().createDocument()"/> - </cell> - </row> - <row> - <cell fill="both" weightx="1" weighty="1" columns="7"> - <JScrollPane> - <org.chorem.lima.ui.entrybooksreports.EntryBooksReportsTable - id="table" sortable="false" rowHeight="24" - constructorParams="getHandler(), getModelTable()" model="{getModelTable()}" - selectionMode="{ListSelectionModel.SINGLE_SELECTION}" /> - <javax.swing.ListSelectionModel javaBean="getTable().getSelectionModel()"/> - </JScrollPane> - </cell> - </row> - <row> - <cell fill="horizontal" weightx="1" columns="7"> - <Table> - <row fill="horizontal" weightx="1"> - <cell> - <JLabel text="lima.common.amountdebit" /> - </cell> - <cell> - <JLabel id="amountDebitLabel" /> - </cell> - <cell> - <JLabel text="lima.common.amountcredit"/> - </cell> - <cell> - <JLabel id="amountCreditLabel" /> - </cell> - <cell> - <JLabel id="soldeLabel" text="lima.common.solde"/> - </cell> - <cell> - <JLabel id="amountSoldeLabel"/> - </cell> - </row> - </Table> - </cell> - </row> + </script> + <row weightx="1" weighty="0" anchor="center"> + <cell fill='both'> + <Table> + <row> + <cell anchor="west"> + <JComboBox id="periodComboBox" + javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())" + onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem())); + validate(); repaint()"/> + </cell> + <cell> + <EntryBooksReportsPeriodSearchPanel javaBean="periodSearchPanel"/> + </cell> + </row> + </Table> + </cell> + <cell anchor="east"> + <JLabel id="entryBookSelectorLabel" text="lima.common.entrybook"/> + </cell> + <cell anchor="west"> + <JComboBox javaBean='comboBox'/> + </cell> + <cell> + <JButton id="back" text="lima.common.buttonback" + onActionPerformed="comboBox.back()"/> + </cell> + <cell> + <JButton id="next" text="lima.common.buttonnext" + onActionPerformed="comboBox.next()"/> + </cell> + <cell> + <EnumEditor id='DocumentEditor' + constructorParams='org.chorem.lima.business.utils.FormatsEnum.class'/> + </cell> + <cell> + <JButton text="lima.common.ok" + onActionPerformed="getHandler().createDocument()"/> + </cell> + </row> + <row> + <cell fill="both" weightx="1" weighty="1" columns="7"> + <JScrollPane> + <EntryBooksReportsTable + id="table" sortable="false" rowHeight="24" + constructorParams="getHandler(), getModelTable()" + model="{getModelTable()}" + selectionMode="{ListSelectionModel.SINGLE_SELECTION}"/> + <ListSelectionModel + javaBean="getTable().getSelectionModel()"/> + </JScrollPane> + </cell> + </row> + <row> + <cell fill="horizontal" weightx="1" columns="7"> + <Table> + <row fill="horizontal" weightx="1"> + <cell> + <JLabel text="lima.common.amountdebit"/> + </cell> + <cell> + <JLabel id="amountDebitLabel"/> + </cell> + <cell> + <JLabel text="lima.common.amountcredit"/> + </cell> + <cell> + <JLabel id="amountCreditLabel"/> + </cell> + <cell> + <JLabel id="soldeLabel" text="lima.common.solde"/> + </cell> + <cell> + <JLabel id="amountSoldeLabel"/> + </cell> + </row> + </Table> + </cell> + </row> </Table> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,43 +24,53 @@ --> <Table> - <FinancialPeriodViewHandler id="handler" javaBean="new FinancialPeriodViewHandler(this)" /> - <Boolean id="selectedPeriod" javaBean="false" /> + <import> + javax.swing.ListSelectionModel + org.chorem.lima.entity.FiscalPeriod + org.chorem.lima.entity.FinancialPeriod + org.chorem.lima.ui.financialperiod.FinancialPeriodTable + org.chorem.lima.ui.financialperiod.FinancialPeriodTableModel + </import> - <script> + <FinancialPeriodViewHandler id="handler" + javaBean="new FinancialPeriodViewHandler(this)"/> + <Boolean id="selectedPeriod" javaBean="false"/> + + <script> <![CDATA[ - import org.chorem.lima.entity.FiscalPeriod; - import org.chorem.lima.entity.FinancialPeriod; - + void $afterCompleteSetup() { getHandler().refresh(); } ]]> - </script> - <row> - <cell fill="both" weightx="1" weighty="1"> - <JScrollPane> - <org.chorem.lima.ui.financialperiod.FinancialPeriodTableModel - id="modelFinancialPeriodTable"/> - <org.chorem.lima.ui.financialperiod.FinancialPeriodTable - id="financialPeriodTable" sortable="false" rowHeight="24" - constructorParams="getHandler()" model="{getModelFinancialPeriodTable()}" - selectionMode="{ListSelectionModel.SINGLE_INTERVAL_SELECTION}" - columnControlVisible="true" /> - <javax.swing.ListSelectionModel javaBean="getFinancialPeriodTable().getSelectionModel()" - onValueChanged="setSelectedPeriod(financialPeriodTable.getSelectedRow() != -1)"/> - </JScrollPane> - </cell> - <cell fill="horizontal" weighty="1" anchor="north"> - <Table> - <row> - <cell> - <JButton id="blockButton" text="lima.charts.financialperiod.block" enabled="{isSelectedPeriod()}" - onActionPerformed="getHandler().blockFinancialPeriod();" /> - </cell> - </row> - </Table> - </cell> - </row> + </script> + <row> + <cell fill="both" weightx="1" weighty="1"> + <JScrollPane> + <FinancialPeriodTableModel + id="modelFinancialPeriodTable"/> + <FinancialPeriodTable + id="financialPeriodTable" sortable="false" rowHeight="24" + constructorParams="getHandler()" + model="{getModelFinancialPeriodTable()}" + selectionMode="{ListSelectionModel.SINGLE_INTERVAL_SELECTION}" + columnControlVisible="true"/> + <ListSelectionModel + javaBean="getFinancialPeriodTable().getSelectionModel()" + onValueChanged="setSelectedPeriod(financialPeriodTable.getSelectedRow() != -1)"/> + </JScrollPane> + </cell> + <cell fill="horizontal" weighty="1" anchor="north"> + <Table> + <row> + <cell> + <JButton id="blockButton" text="lima.charts.financialperiod.block" + enabled="{isSelectedPeriod()}" + onActionPerformed="getHandler().blockFinancialPeriod();"/> + </cell> + </row> + </Table> + </cell> + </row> </Table> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -22,67 +22,69 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> - + <Table> - <FinancialStatementChartViewHandler id="handler" javaBean="new FinancialStatementChartViewHandler(this)" /> - <Boolean id="selectedRow" javaBean="false" /> + <import> + javax.swing.ListSelectionModel + org.jdesktop.swingx.decorator.HighlighterFactory + </import> - <script> - <![CDATA[ - //getHandler().init(); - ]]> - </script> + <FinancialStatementChartViewHandler id="handler" + javaBean="new FinancialStatementChartViewHandler(this)"/> + <Boolean id="selectedRow" javaBean="false"/> - <row> - <cell fill="both" weightx="1" weighty="1" rows='6'> - <JScrollPane> - <FinancialStatementChartTreeTable id="treeTable" - constructorParams="getHandler()" - selectionMode="{ListSelectionModel.SINGLE_SELECTION}" - treeTableModel="{new org.chorem.lima.ui.financialstatementchart.FinancialStatementChartTreeTableModel()}" - highlighters="{org.jdesktop.swingx.decorator.HighlighterFactory.createSimpleStriping(new java.awt.Color(222,222,222))}" /> - <javax.swing.ListSelectionModel - javaBean="getTreeTable().getSelectionModel()" - onValueChanged="setSelectedRow(treeTable.getSelectedRow() != -1)"/> - </JScrollPane> - </cell> - <cell fill="horizontal"> - <JButton id="addFinancialStatementHeader" text="lima.financialstatement.header.add" - onActionPerformed="getHandler().addFinancialStatementHeader()"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="addFinancialStatementMovement" text="lima.financialstatement.movement.add" - onActionPerformed="getHandler().addFinancialStatementMovement()" - enabled="{isSelectedRow()}"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="updateButton" text="lima.common.update" - onActionPerformed="getHandler().updateFinancialStatement()" - enabled="{isSelectedRow()}"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="removeButton" text="lima.common.remove" - onActionPerformed="getHandler().removeFinancialStatement()" - enabled="{isSelectedRow()}"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="importButton" text="lima.importexport.import" - onActionPerformed="getHandler().importFinancialStatementChart()"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="checkButton" text="lima.financialstatement.check" - onActionPerformed="getHandler().financialStatementChartCheck()"/> - </cell> - </row> + <row> + <cell fill="both" weightx="1" weighty="1" rows='6'> + <JScrollPane> + <FinancialStatementChartTreeTable id="treeTable" + constructorParams="getHandler()" + selectionMode="{ListSelectionModel.SINGLE_SELECTION}" + treeTableModel="{new FinancialStatementChartTreeTableModel()}" + highlighters="{HighlighterFactory.createSimpleStriping(new java.awt.Color(222,222,222))}"/> + <ListSelectionModel + javaBean="getTreeTable().getSelectionModel()" + onValueChanged="setSelectedRow(treeTable.getSelectedRow() != -1)"/> + </JScrollPane> + </cell> + <cell fill="horizontal"> + <JButton id="addFinancialStatementHeader" + text="lima.financialstatement.header.add" + onActionPerformed="getHandler().addFinancialStatementHeader()"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="addFinancialStatementMovement" + text="lima.financialstatement.movement.add" + onActionPerformed="getHandler().addFinancialStatementMovement()" + enabled="{isSelectedRow()}"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="updateButton" text="lima.common.update" + onActionPerformed="getHandler().updateFinancialStatement()" + enabled="{isSelectedRow()}"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="removeButton" text="lima.common.remove" + onActionPerformed="getHandler().removeFinancialStatement()" + enabled="{isSelectedRow()}"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="importButton" text="lima.importexport.import" + onActionPerformed="getHandler().importFinancialStatementChart()"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="checkButton" text="lima.financialstatement.check" + onActionPerformed="getHandler().financialStatementChartCheck()"/> + </cell> + </row> </Table> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementHeaderForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementHeaderForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementHeaderForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -27,15 +27,18 @@ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <org.chorem.lima.entity.FinancialStatement id="financialStatement" javaBean='null'/> - <Boolean id="addState" javaBean='true'/> + <import> + javax.swing.text.Document + org.chorem.lima.FinancialStatementWayEnum + org.chorem.lima.entity.FinancialStatement + org.chorem.lima.entity.FinancialStatementImpl + </import> + <FinancialStatement id="financialStatement" javaBean='null'/> + <Boolean id="addState" javaBean='true'/> - <script> + <script> <![CDATA[ - import org.chorem.lima.entity.FinancialStatementImpl; - import org.chorem.lima.FinancialStatementWayEnum; - - + protected void getFinancialStatementWayValue(){ FinancialStatementWayEnum fSWE = @@ -53,49 +56,52 @@ dispose(); } ]]> - </script> + </script> - <Table> - <row> - <cell fill="horizontal"> - <JLabel text="lima.financialstatement.label"/> - </cell> - <cell fill="horizontal"> - <JTextField id="descriptionTextField" text="{getFinancialStatement().getLabel()}"/> - <javax.swing.text.Document javaBean="getDescriptionTextField().getDocument()" - onInsertUpdate='getFinancialStatement().setLabel(getDescriptionTextField().getText())' - onRemoveUpdate='getFinancialStatement().setLabel(getDescriptionTextField().getText())' /> - </cell> - </row> - <row> - <cell> - <JCheckBox id='subAmountCheckBox' text='lima.financialstatement.subamount' - selected="{getFinancialStatement().getSubAmount()}" - onActionPerformed="getFinancialStatement().setSubAmount(subAmountCheckBox.isSelected())"/> - </cell> - </row> - <row> - <cell> - <JCheckBox id='headerAmountCheckBox' text='lima.financialstatement.headeramount' - selected="{getFinancialStatement().getHeaderAmount()}" - onActionPerformed="getFinancialStatement().setHeaderAmount(headerAmountCheckBox.isSelected())"/> - </cell> - </row> - <row> - <cell> - <EnumEditor id='wayEnumEditor' - selectedItem="{getFinancialStatement().getWay()}" - constructorParams='org.chorem.lima.FinancialStatementWayEnum.class' - onActionPerformed="getFinancialStatementWayValue()"/> - </cell> - </row> - <row> - <cell fill="none"> - <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell fill="none"> - <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> - </cell> - </row> - </Table> + <Table> + <row> + <cell fill="horizontal"> + <JLabel text="lima.financialstatement.label"/> + </cell> + <cell fill="horizontal"> + <JTextField id="descriptionTextField" + text="{getFinancialStatement().getLabel()}"/> + <Document javaBean="getDescriptionTextField().getDocument()" + onInsertUpdate='getFinancialStatement().setLabel(getDescriptionTextField().getText())' + onRemoveUpdate='getFinancialStatement().setLabel(getDescriptionTextField().getText())'/> + </cell> + </row> + <row> + <cell> + <JCheckBox id='subAmountCheckBox' + text='lima.financialstatement.subamount' + selected="{getFinancialStatement().getSubAmount()}" + onActionPerformed="getFinancialStatement().setSubAmount(subAmountCheckBox.isSelected())"/> + </cell> + </row> + <row> + <cell> + <JCheckBox id='headerAmountCheckBox' + text='lima.financialstatement.headeramount' + selected="{getFinancialStatement().getHeaderAmount()}" + onActionPerformed="getFinancialStatement().setHeaderAmount(headerAmountCheckBox.isSelected())"/> + </cell> + </row> + <row> + <cell> + <EnumEditor id='wayEnumEditor' + selectedItem="{getFinancialStatement().getWay()}" + constructorParams='org.chorem.lima.FinancialStatementWayEnum.class' + onActionPerformed="getFinancialStatementWayValue()"/> + </cell> + </row> + <row> + <cell fill="none"> + <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> + </cell> + <cell fill="none"> + <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementImportForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementImportForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementImportForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -27,66 +27,84 @@ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <jaxx.runtime.swing.JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/> - <Boolean id="addState" javaBean='true'/> + <import> + jaxx.runtime.swing.JAXXButtonGroup + org.chorem.lima.enums.FinancialStatementsChartEnum + </import> + + <JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/> + <Boolean id="addState" javaBean='true'/> - <script> + <script> <![CDATA[ - import org.chorem.lima.enums.FinancialStatementsChartEnum; + getRootPane().setDefaultButton(ok); protected void performCancel() { getRadioButtons().setSelectedValue(null); dispose(); } ]]> - </script> + </script> - <Table> - <row> - <cell><JLabel text='lima.charts.financialstatement.nothing' /></cell> - </row> - <row> - <cell> - <JRadioButton text='lima.charts.financialstatement.shortened' value='{FinancialStatementsChartEnum.SHORTENED}' buttonGroup="{getRadioButtons()}" - selected='true'/> + <Table> + <row> + <cell> + <JLabel text='lima.charts.financialstatement.nothing'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.charts.financialstatement.shortened' + value='{FinancialStatementsChartEnum.SHORTENED}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.charts.financialstatement.base' + value='{FinancialStatementsChartEnum.BASE}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.charts.financialstatement.developed' + value='{FinancialStatementsChartEnum.DEVELOPED}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.importexport.import' + value='{FinancialStatementsChartEnum.IMPORT}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JCheckBox id='deleteFinancialStatementChart' + text='lima.financialstatement.delete' selected='false'/> + </cell> + </row> + <row> + <cell> + <Table> + <row> + <cell fill="none"> + <JButton text="lima.common.cancel" + onActionPerformed="performCancel()"/> </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.charts.financialstatement.base' value='{FinancialStatementsChartEnum.BASE}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.charts.financialstatement.developed' value='{FinancialStatementsChartEnum.DEVELOPED}' buttonGroup="{getRadioButtons()}" - selected='true'/> + <cell fill="none"> + <JButton id="ok" text="lima.common.ok" + onActionPerformed="dispose()"/> </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.importexport.import' value='{FinancialStatementsChartEnum.IMPORT}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <JCheckBox id='deleteFinancialStatementChart' text='lima.financialstatement.delete' selected='false'/> - </cell> - </row> - <row> - <cell> - <Table> - <row> - <cell fill="none"> - <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell fill="none"> - <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> - </cell> - </row> - </Table> - </cell> - </row> - </Table> + </row> + </Table> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementMovementForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementMovementForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementMovementForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -27,11 +27,16 @@ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <org.chorem.lima.entity.FinancialStatement id="financialStatement" javaBean='null'/> - - <Boolean id="addState" javaBean='true'/> + <import> + javax.swing.text.Document + org.chorem.lima.entity.FinancialStatement + </import> - <script> + <FinancialStatement id="financialStatement" javaBean='null'/> + + <Boolean id="addState" javaBean='true'/> + + <script> <![CDATA[ getRootPane().setDefaultButton(ok); protected void performCancel() { @@ -39,71 +44,77 @@ dispose(); } ]]> - </script> + </script> - <Table> - <row> - <cell fill="horizontal"> - <JLabel text="lima.financialstatement.label"/> - </cell> - <cell fill="horizontal"> - <JTextField id="descriptionTextField" text="{getFinancialStatement().getLabel()}"/> - <javax.swing.text.Document javaBean="getDescriptionTextField().getDocument()" - onInsertUpdate='getFinancialStatement().setLabel(getDescriptionTextField().getText())' - onRemoveUpdate='getFinancialStatement().setLabel(getDescriptionTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.financialstatement.accounts"/> - </cell> - <cell fill="horizontal"> - <JTextField id="accountsTextField" text="{getFinancialStatement().getAccounts()}"/> - <javax.swing.text.Document javaBean="getAccountsTextField().getDocument()" - onInsertUpdate='getFinancialStatement().setAccounts(getAccountsTextField().getText())' - onRemoveUpdate='getFinancialStatement().setAccounts(getAccountsTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.financialstatement.debitaccounts"/> - </cell> - <cell fill="horizontal"> - <JTextField id="debitAccountsTextField" text="{getFinancialStatement().getDebitAccounts()}"/> - <javax.swing.text.Document javaBean="getDebitAccountsTextField().getDocument()" - onInsertUpdate='getFinancialStatement().setDebitAccounts(getDebitAccountsTextField().getText())' - onRemoveUpdate='getFinancialStatement().setDebitAccounts(getDebitAccountsTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.financialstatement.creditaccounts"/> - </cell> - <cell fill="horizontal"> - <JTextField id="creditAccountsTextField" text="{getFinancialStatement().getCreditAccounts()}"/> - <javax.swing.text.Document javaBean="getCreditAccountsTextField().getDocument()" - onInsertUpdate='getFinancialStatement().setCreditAccounts(getCreditAccountsTextField().getText())' - onRemoveUpdate='getFinancialStatement().setCreditAccounts(getCreditAccountsTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.financialstatement.provisiondeprecationaccounts"/> - </cell> - <cell fill="horizontal"> - <JTextField id="provisionDeprecationAccountsTextField" text="{getFinancialStatement().getProvisionDeprecationAccounts()}"/> - <javax.swing.text.Document javaBean="getProvisionDeprecationAccountsTextField().getDocument()" - onInsertUpdate='getFinancialStatement().setProvisionDeprecationAccounts(getProvisionDeprecationAccountsTextField().getText())' - onRemoveUpdate='getFinancialStatement().setProvisionDeprecationAccounts(getProvisionDeprecationAccountsTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="none"> - <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell fill="none"> - <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> - </cell> - </row> - </Table> + <Table> + <row> + <cell fill="horizontal"> + <JLabel text="lima.financialstatement.label"/> + </cell> + <cell fill="horizontal"> + <JTextField id="descriptionTextField" + text="{getFinancialStatement().getLabel()}"/> + <Document javaBean="getDescriptionTextField().getDocument()" + onInsertUpdate='getFinancialStatement().setLabel(getDescriptionTextField().getText())' + onRemoveUpdate='getFinancialStatement().setLabel(getDescriptionTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.financialstatement.accounts"/> + </cell> + <cell fill="horizontal"> + <JTextField id="accountsTextField" + text="{getFinancialStatement().getAccounts()}"/> + <Document javaBean="getAccountsTextField().getDocument()" + onInsertUpdate='getFinancialStatement().setAccounts(getAccountsTextField().getText())' + onRemoveUpdate='getFinancialStatement().setAccounts(getAccountsTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.financialstatement.debitaccounts"/> + </cell> + <cell fill="horizontal"> + <JTextField id="debitAccountsTextField" + text="{getFinancialStatement().getDebitAccounts()}"/> + <Document javaBean="getDebitAccountsTextField().getDocument()" + onInsertUpdate='getFinancialStatement().setDebitAccounts(getDebitAccountsTextField().getText())' + onRemoveUpdate='getFinancialStatement().setDebitAccounts(getDebitAccountsTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.financialstatement.creditaccounts"/> + </cell> + <cell fill="horizontal"> + <JTextField id="creditAccountsTextField" + text="{getFinancialStatement().getCreditAccounts()}"/> + <Document javaBean="getCreditAccountsTextField().getDocument()" + onInsertUpdate='getFinancialStatement().setCreditAccounts(getCreditAccountsTextField().getText())' + onRemoveUpdate='getFinancialStatement().setCreditAccounts(getCreditAccountsTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.financialstatement.provisiondeprecationaccounts"/> + </cell> + <cell fill="horizontal"> + <JTextField id="provisionDeprecationAccountsTextField" + text="{getFinancialStatement().getProvisionDeprecationAccounts()}"/> + <Document + javaBean="getProvisionDeprecationAccountsTextField().getDocument()" + onInsertUpdate='getFinancialStatement().setProvisionDeprecationAccounts(getProvisionDeprecationAccountsTextField().getText())' + onRemoveUpdate='getFinancialStatement().setProvisionDeprecationAccounts(getProvisionDeprecationAccountsTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="none"> + <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> + </cell> + <cell fill="none"> + <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,13 +24,19 @@ --> <Table> - <FinancialStatementReportViewHandler id="handler" javaBean="new FinancialStatementReportViewHandler(this)" /> - <Boolean id="selectedRow" javaBean="false" /> - <org.chorem.lima.ui.financialstatementreport.FinancialStatementReportTableModel id="modelTable"/> - <script> + <import> + javax.swing.ListSelectionModel + org.chorem.lima.enums.ComboBoxDatesEnum + org.chorem.lima.ui.financialstatementreport.FinancialStatementReportTableModel + </import> + <FinancialStatementReportViewHandler + id="handler" + javaBean="new FinancialStatementReportViewHandler(this)"/> + <Boolean id="selectedRow" javaBean="false"/> + <FinancialStatementReportTableModel id="modelTable"/> + <script> <![CDATA[ - - import org.chorem.lima.enums.ComboBoxDatesEnum; + FinancialStatementReportPeriodSearchPanel periodSearchPanel = new FinancialStatementReportPeriodSearchPanel(modelTable); @@ -39,32 +45,42 @@ ]]> - </script> - <row weightx="1" weighty="0" anchor="center"> - <cell fill='both'><Table><row> - <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())" - onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem())); - validate(); repaint()"/></cell> - <cell><FinancialStatementReportPeriodSearchPanel javaBean="periodSearchPanel"/></cell> - </row></Table></cell> - <cell> - <EnumEditor id='DocumentEditor' - constructorParams='org.chorem.lima.business.utils.FormatsEnum.class'/> - </cell> - <cell> - <JButton text="lima.common.ok" - onActionPerformed="getHandler().createDocument()"/> - </cell> - </row> - <row> - <cell fill="both" weightx="1" weighty="1" columns="7"> - <JScrollPane> - <org.chorem.lima.ui.financialstatementreport.FinancialStatementReportTable id="table" rowHeight="24" - constructorParams="getHandler()" - model="{getModelTable()}" - selectionMode="{ListSelectionModel.SINGLE_SELECTION}"/> - <javax.swing.ListSelectionModel javaBean="getTable().getSelectionModel()"/> - </JScrollPane> - </cell> - </row> + </script> + <row weightx="1" weighty="0" anchor="center"> + <cell fill='both'> + <Table> + <row> + <cell anchor="west"> + <JComboBox id="periodComboBox" + javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())" + onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem())); + validate(); repaint()"/> + </cell> + <cell> + <FinancialStatementReportPeriodSearchPanel + javaBean="periodSearchPanel"/> + </cell> + </row> + </Table> + </cell> + <cell> + <EnumEditor id='DocumentEditor' + constructorParams='org.chorem.lima.business.utils.FormatsEnum.class'/> + </cell> + <cell> + <JButton text="lima.common.ok" + onActionPerformed="getHandler().createDocument()"/> + </cell> + </row> + <row> + <cell fill="both" weightx="1" weighty="1" columns="7"> + <JScrollPane> + <FinancialStatementReportTable id="table" rowHeight="24" + constructorParams="getHandler()" + model="{getModelTable()}" + selectionMode="{ListSelectionModel.SINGLE_SELECTION}"/> + <ListSelectionModel javaBean="getTable().getSelectionModel()"/> + </JScrollPane> + </cell> + </row> </Table> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/EntryBookSearchComboBox.java 2011-09-17 13:50:17 UTC (rev 3292) @@ -29,11 +29,12 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.ui.combobox.EntryBookComboBoxModel; -import org.chorem.lima.ui.combobox.EntryBookRenderer; +import org.chorem.lima.ui.renderers.RendererUtil; import org.chorem.lima.util.EntryBookToString; import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator; import javax.swing.JComboBox; +import javax.swing.ListCellRenderer; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; @@ -50,9 +51,10 @@ public EntryBookSearchComboBox(FinancialTransactionSearchViewHandler handler) { this.handler = handler; EntryBookComboBoxModel entryBookComboBoxModel = new EntryBookComboBoxModel(); - EntryBookRenderer entryBookRenderer = new EntryBookRenderer(); + ListCellRenderer renderer = + RendererUtil.newDecoratorListCellRenderer(EntryBook.class); setModel(entryBookComboBoxModel); - setRenderer(entryBookRenderer); + setRenderer(renderer); setEditable(true); AutoCompleteDecorator.decorate(this, EntryBookToString.getInstance()); getEditor().getEditorComponent().addKeyListener(this); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,68 +24,74 @@ --> <Table> - <FinancialTransactionUnbalancedViewHandler id="handler" javaBean="new FinancialTransactionUnbalancedViewHandler(this)" /> - <Boolean id="selectedRow" javaBean="false" /> - <org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel id="modelFiscalPeriod"/> - <script> + <import> + javax.swing.ListSelectionModel + org.chorem.lima.entity.FiscalPeriod + org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer + org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel + </import> + <FinancialTransactionUnbalancedViewHandler id="handler" + javaBean="new FinancialTransactionUnbalancedViewHandler(this)"/> + <Boolean id="selectedRow" javaBean="false"/> + <FiscalPeriodComboBoxModel id="modelFiscalPeriod"/> + <script> <![CDATA[ - - import org.chorem.lima.entity.FiscalPeriod; - - void $afterCompleteSetup() { + void $afterCompleteSetup() { getHandler().refresh(); } - ]]> - </script> + </script> - <!-- <JPopupMenu id="MenuRightPanel"> - <JMenuItem text="lima.add.transaction" onActionPerformed='addEmptyTransaction()'/> - <JMenuItem text="lima.print"/> - </JPopupMenu> - <JPopupMenu id="MenuRightTransaction"> - <JMenuItem text="lima.add" onActionPerformed='addEmptyTransaction()'/> - <JMenuItem text="lima.print"/> - </JPopupMenu> --> - - <row weightx="1" weighty="0" anchor="center"> - <cell anchor="west"> - <JButton text="lima.refresh" onActionPerformed="getHandler().refresh()"/> - </cell> - <cell anchor="east"> - <JLabel id="fiscalPeriodLabel" text="lima.charts.fiscalyear"/> - </cell> - <cell anchor="west"> - <JComboBox id="fiscalPeriodComboBox" - model="{modelFiscalPeriod}" - renderer="{new org.chorem.lima.ui.combobox.FiscalPeriodComboBoxRenderer()}" - onActionPerformed="getFinancialTransactionUnbalancedTableModel().setFiscalPeriod( (FiscalPeriod) fiscalPeriodComboBox.getSelectedItem()); + <!-- <JPopupMenu id="MenuRightPanel"> + <JMenuItem text="lima.add.transaction" onActionPerformed='addEmptyTransaction()'/> + <JMenuItem text="lima.print"/> + </JPopupMenu> + <JPopupMenu id="MenuRightTransaction"> + <JMenuItem text="lima.add" onActionPerformed='addEmptyTransaction()'/> + <JMenuItem text="lima.print"/> + </JPopupMenu> --> + + <row weightx="1" weighty="0" anchor="center"> + <cell anchor="west"> + <JButton text="lima.refresh" onActionPerformed="getHandler().refresh()"/> + </cell> + <cell anchor="east"> + <JLabel id="fiscalPeriodLabel" text="lima.charts.fiscalyear"/> + </cell> + <cell anchor="west"> + <JComboBox id="fiscalPeriodComboBox" + model="{modelFiscalPeriod}" + renderer="{new FiscalPeriodComboBoxRenderer()}" + onActionPerformed="getFinancialTransactionUnbalancedTableModel().setFiscalPeriod( (FiscalPeriod) fiscalPeriodComboBox.getSelectedItem()); getHandler().refresh()" - editable="false"/> - </cell> - <cell> - <JButton text="lima.entries.addEntry" - onActionPerformed="getHandler().addEmptyEntry()" - enabled="{isSelectedRow()}"/> - </cell> - <cell> - <JButton text="lima.common.remove" - onActionPerformed="getHandler().deleteSelectedRow()" - enabled="{isSelectedRow()}"/> - </cell> - </row> - <row> - <cell fill="both" weightx="1" weighty="1" rows="1" columns="9"> - <JScrollPane> - <org.chorem.lima.ui.financialtransactionunbalanced.FinancialTransactionUnbalancedTableModel - id="financialTransactionUnbalancedTableModel" /> - <org.chorem.lima.ui.financialtransactionunbalanced.FinancialTransactionUnbalancedTable - id="financialTransactionUnbalancedTable" sortable="false" rowHeight="22" - constructorParams="getHandler()" model="{getFinancialTransactionUnbalancedTableModel()}" - selectionMode="{ListSelectionModel.SINGLE_SELECTION}" /> - <javax.swing.ListSelectionModel javaBean="getFinancialTransactionUnbalancedTable().getSelectionModel()" - onValueChanged="setSelectedRow(financialTransactionUnbalancedTable.getSelectedRow() != -1)"/> - </JScrollPane> - </cell> - </row> + editable="false"/> + </cell> + <cell> + <JButton text="lima.entries.addEntry" + onActionPerformed="getHandler().addEmptyEntry()" + enabled="{isSelectedRow()}"/> + </cell> + <cell> + <JButton text="lima.common.remove" + onActionPerformed="getHandler().deleteSelectedRow()" + enabled="{isSelectedRow()}"/> + </cell> + </row> + <row> + <cell fill="both" weightx="1" weighty="1" rows="1" columns="9"> + <JScrollPane> + <FinancialTransactionUnbalancedTableModel + id="financialTransactionUnbalancedTableModel"/> + <FinancialTransactionUnbalancedTable + id="financialTransactionUnbalancedTable" sortable="false" + rowHeight="22" + constructorParams="getHandler()" + model="{getFinancialTransactionUnbalancedTableModel()}" + selectionMode="{ListSelectionModel.SINGLE_SELECTION}"/> + <ListSelectionModel + javaBean="getFinancialTransactionUnbalancedTable().getSelectionModel()" + onValueChanged="setSelectedRow(financialTransactionUnbalancedTable.getSelectedRow() != -1)"/> + </JScrollPane> + </cell> + </row> </Table> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -25,18 +25,22 @@ <JDialog modal="true" defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <org.chorem.lima.ui.fiscalperiod.FiscalPeriodTableModel id="modelFiscalPeriodTable"/> - <script> + <import> + java.util.Date + java.util.Calendar + org.apache.commons.lang.time.DateUtils + org.jdesktop.swingx.JXDatePicker + org.chorem.lima.entity.FiscalPeriodImpl + org.chorem.lima.entity.FiscalPeriod + org.chorem.lima.business.LimaException + org.chorem.lima.business.FiscalPeriodServiceMonitorable + org.chorem.lima.service.LimaServiceFactory + org.chorem.lima.ui.fiscalperiod.FiscalPeriodTableModel + </import> + <FiscalPeriodTableModel id="modelFiscalPeriodTable"/> + <script> <![CDATA[ - import org.chorem.lima.entity.FiscalPeriod; - import org.chorem.lima.business.FiscalPeriodServiceMonitorable; - import org.chorem.lima.service.LimaServiceFactory; - import org.chorem.lima.business.LimaException; - import org.apache.commons.lang.time.DateUtils; - import java.util.Date; - import java.util.Calendar; - import org.chorem.lima.entity.FiscalPeriodImpl; - + getRootPane().setDefaultButton(okButton); protected FiscalPeriodServiceMonitorable fiscalPeriodService = @@ -85,40 +89,42 @@ dispose(); } ]]> - </script> + </script> - <org.chorem.lima.entity.FiscalPeriod id="period" javaBean="null" /> + <FiscalPeriod id="period" javaBean="null"/> - <Table fill="both"> - <row> + <Table fill="both"> + <row> + <cell> + <JLabel text="lima.common.begindate"/> + </cell> + <cell> + <JXDatePicker id="beginDatePicker"/> + </cell> + </row> + <row> + <cell> + <JLabel text="lima.common.enddate"/> + </cell> + <cell> + <JXDatePicker id="endDatePicker"/> + </cell> + </row> + <row> + <cell> + <Table fill="none" anchor="center" weighty="1"> + <row> <cell> - <JLabel text="lima.common.begindate"/> + <JButton id="cancelButton" text="lima.common.cancel" + onActionPerformed="performCancel()"/> </cell> <cell> - <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"/> + <JButton id="okButton" text="lima.common.ok" + onActionPerformed="performOk()"/> </cell> - </row> - <row> - <cell> - <JLabel text="lima.common.enddate"/> - </cell> - <cell> - <org.jdesktop.swingx.JXDatePicker id="endDatePicker"/> - </cell> - </row> - <row> - <cell> - <Table fill="none" anchor="center" weighty="1"> - <row> - <cell> - <JButton id="cancelButton" text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell> - <JButton id="okButton" text="lima.common.ok" onActionPerformed="performOk()"/> - </cell> - </row> - </Table> - </cell> - </row> - </Table> + </row> + </Table> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -25,45 +25,52 @@ <Table> - <FiscalPeriodViewHandler id="handler" javaBean="new FiscalPeriodViewHandler(this)" /> - <Boolean id="selectedPeriod" javaBean="false" /> + <import> + javax.swing.ListSelectionModel + org.chorem.lima.entity.FiscalPeriod + org.chorem.lima.entity.FinancialPeriod + org.chorem.lima.ui.fiscalperiod.FiscalPeriodTable + org.chorem.lima.ui.fiscalperiod.FiscalPeriodTableModel + </import> + <FiscalPeriodViewHandler id="handler" + javaBean="new FiscalPeriodViewHandler(this)"/> + <Boolean id="selectedPeriod" javaBean="false"/> - <script> + <script> <![CDATA[ - import org.chorem.lima.entity.FiscalPeriod; - import org.chorem.lima.entity.FinancialPeriod; - void $afterCompleteSetup() { getHandler().refresh(); } ]]> - </script> - <row> - <cell fill="both" weightx="1" weighty="1" rows="5"> - <JScrollPane> - <org.chorem.lima.ui.fiscalperiod.FiscalPeriodTableModel - id="modelFiscalPeriodTable"/> - <org.chorem.lima.ui.fiscalperiod.FiscalPeriodTable - id="fiscalPeriodTable" sortable="false" rowHeight="24" - constructorParams="getHandler()" model="{getModelFiscalPeriodTable()}" - selectionMode="{ListSelectionModel.SINGLE_INTERVAL_SELECTION}" - columnControlVisible="true" /> - <javax.swing.ListSelectionModel javaBean="getFiscalPeriodTable().getSelectionModel()" - onValueChanged="setSelectedPeriod(fiscalPeriodTable.getSelectedRow() != -1)"/> - </JScrollPane> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="addButton" text="lima.charts.fiscalperiod.add" - onActionPerformed="getHandler().addFiscalPeriod()"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="blockButton" text="lima.charts.fiscalperiod.block" enabled="{isSelectedPeriod()}" - onActionPerformed="getHandler().blockFiscalPeriod()" /> - </cell> - </row> + </script> + <row> + <cell fill="both" weightx="1" weighty="1" rows="5"> + <JScrollPane> + <FiscalPeriodTableModel + id="modelFiscalPeriodTable"/> + <FiscalPeriodTable + id="fiscalPeriodTable" sortable="false" rowHeight="24" + constructorParams="getHandler()" model="{getModelFiscalPeriodTable()}" + selectionMode="{ListSelectionModel.SINGLE_INTERVAL_SELECTION}" + columnControlVisible="true"/> + <ListSelectionModel + javaBean="getFiscalPeriodTable().getSelectionModel()" + onValueChanged="setSelectedPeriod(fiscalPeriodTable.getSelectedRow() != -1)"/> + </JScrollPane> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="addButton" text="lima.charts.fiscalperiod.add" + onActionPerformed="getHandler().addFiscalPeriod()"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="blockButton" text="lima.charts.fiscalperiod.block" + enabled="{isSelectedPeriod()}" + onActionPerformed="getHandler().blockFiscalPeriod()"/> + </cell> + </row> </Table> Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsEntryBookForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsEntryBookForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsEntryBookForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -1,41 +1,43 @@ -<!-- - #%L - Lima :: Swing - - $Id$ - $HeadURL$ - %% - Copyright (C) 2008 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> +<!-- + #%L + Lima :: Swing + + $Id$ + $HeadURL$ + %% + Copyright (C) 2008 - 2011 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> <JDialog modal="true" defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <org.chorem.lima.entity.EntryBook id="entryBook" javaBean="null" /> - <Boolean id="addState" javaBean='true'/> + <import> + javax.swing.text.Document + org.chorem.lima.entity.EntryBook + org.chorem.lima.ui.renderers.RendererUtil + org.chorem.lima.ui.combobox.EntryBookComboBoxModel + </import> + <EntryBook id="entryBook" javaBean="null"/> + <Boolean id="addState" javaBean='true'/> - <script> + <script> <![CDATA[ - - import org.chorem.lima.ui.combobox.EntryBookComboBoxModel; - import org.chorem.lima.ui.combobox.EntryBookRenderer; - import org.chorem.lima.entity.EntryBook; - + getRootPane().setDefaultButton(okButton); /** @@ -73,72 +75,75 @@ performNew(); } ]]> - </script> + </script> - <Table> - <row> - <cell anchor="west"> - <JRadioButton - id="selectedEntryBook" - text="lima.common.entrybook" - selected="true" - buttonGroup="EntryBookGroup" - onActionPerformed="performNew()"/> - </cell> - </row> - <row> - <cell> - <JLabel id="entryBookSelectorLabel" text="lima.common.entrybook"/> - </cell> - <cell> - <org.chorem.lima.ui.combobox.EntryBookComboBoxModel id="modelEntryBookComboBox"/> - <JComboBox id="entryBookComboBox" - model="{getModelEntryBookComboBox()}" - renderer="{new org.chorem.lima.ui.combobox.EntryBookRenderer()}" - editable="false" - onItemStateChanged="getEntryBook().setCode(((EntryBook)getEntryBookComboBox().getSelectedItem()).getCode()); getEntryBook().setLabel(((EntryBook)getEntryBookComboBox().getSelectedItem()).getLabel())"/> - </cell> - </row> - <row> - <cell anchor="west"> - <JRadioButton - id="newEntryBook" - text="lima.home.entrybooks.create" - selected="false" - buttonGroup="EntryBookGroup" - onActionPerformed="performNew()"/> - </cell> - </row> - <row> - <cell> - <JLabel text="lima.common.code"/> - </cell> - <cell> - <JTextField id="entryBookCodeField" text="{getEntryBook().getCode()}"/> - <javax.swing.text.Document javaBean="getEntryBookCodeField().getDocument()" - onInsertUpdate='getEntryBook().setCode(getEntryBookCodeField().getText())' - onRemoveUpdate='getEntryBook().setCode(getEntryBookCodeField().getText())' /> - </cell> - </row> - <row> - <cell> - <JLabel text="lima.common.label"/> - </cell> - <cell> - <JTextField id="entryBookLabelField" editable='{isAddState()}' text="{getEntryBook().getLabel()}"/> - <javax.swing.text.Document javaBean="getEntryBookLabelField().getDocument()" - onInsertUpdate='getEntryBook().setLabel(getEntryBookLabelField().getText())' - onRemoveUpdate='getEntryBook().setLabel(getEntryBookLabelField().getText())' /> - </cell> - </row> - <row> - <cell> - <JButton id="cancelButton" text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell> - <JButton id="okButton" text="lima.common.ok" onActionPerformed="dispose()"/> - </cell> + <Table> + <row> + <cell anchor="west"> + <JRadioButton + id="selectedEntryBook" + text="lima.common.entrybook" + selected="true" + buttonGroup="EntryBookGroup" + onActionPerformed="performNew()"/> + </cell> + </row> + <row> + <cell> + <JLabel id="entryBookSelectorLabel" text="lima.common.entrybook"/> + </cell> + <cell> + <EntryBookComboBoxModel id="modelEntryBookComboBox"/> + <JComboBox id="entryBookComboBox" + model="{getModelEntryBookComboBox()}" + renderer="{RendererUtil.newDecoratorListCellRenderer(EntryBook.class)}" + editable="false" + onItemStateChanged="getEntryBook().setCode(((EntryBook)getEntryBookComboBox().getSelectedItem()).getCode()); getEntryBook().setLabel(((EntryBook)getEntryBookComboBox().getSelectedItem()).getLabel())"/> + </cell> + </row> + <row> + <cell anchor="west"> + <JRadioButton + id="newEntryBook" + text="lima.home.entrybooks.create" + selected="false" + buttonGroup="EntryBookGroup" + onActionPerformed="performNew()"/> + </cell> + </row> + <row> + <cell> + <JLabel text="lima.common.code"/> + </cell> + <cell> + <JTextField id="entryBookCodeField" text="{getEntryBook().getCode()}"/> + <Document javaBean="getEntryBookCodeField().getDocument()" + onInsertUpdate='getEntryBook().setCode(getEntryBookCodeField().getText())' + onRemoveUpdate='getEntryBook().setCode(getEntryBookCodeField().getText())'/> + </cell> + </row> + <row> + <cell> + <JLabel text="lima.common.label"/> + </cell> + <cell> + <JTextField id="entryBookLabelField" editable='{isAddState()}' + text="{getEntryBook().getLabel()}"/> + <Document javaBean="getEntryBookLabelField().getDocument()" + onInsertUpdate='getEntryBook().setLabel(getEntryBookLabelField().getText())' + onRemoveUpdate='getEntryBook().setLabel(getEntryBookLabelField().getText())'/> + </cell> + </row> + <row> + <cell> + <JButton id="cancelButton" text="lima.common.cancel" + onActionPerformed="performCancel()"/> + </cell> + <cell> + <JButton id="okButton" text="lima.common.ok" + onActionPerformed="dispose()"/> + </cell> - </row> - </Table> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/HomeView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,104 +24,132 @@ --> <Table> - <Dimension id="fixedSize" javaBean='new Dimension(500,200)' /> - <Dimension id="miniSize" javaBean='new Dimension(300,150)' /> - - - - <script> - <![CDATA[ - import static org.nuiton.i18n.I18n._; - import java.awt.Color; - import java.awt.Font; - import javax.swing.BoxLayout; - import javax.swing.border.EtchedBorder; - import javax.swing.ImageIcon; - - ]]> - </script> - <row> + <import> + java.awt.Color + java.awt.Font + javax.swing.BoxLayout + javax.swing.border.EtchedBorder + javax.swing.ImageIcon + static org.nuiton.i18n.I18n._ + </import> + + <Dimension id="fixedSize" javaBean='new Dimension(500,200)'/> + <Dimension id="miniSize" javaBean='new Dimension(300,150)'/> + + <row> <cell anchor="southeast"> - <JPanel - id='accountPanel' - border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}' - minimumSize='{getMiniSize()}' - preferredSize='{getFixedSize()}' - layout='{new BoxLayout(accountPanel, BoxLayout.X_AXIS)}'> - <Table> - <row> - <cell weightx="0" weighty="0.1" anchor="northwest"><JLabel icon='{new ImageIcon(getClass().getResource("/images/accounts.png"))}'/></cell> - <cell weightx="1" weighty="0.1" anchor="center"><JLabel foreground='{Color.DARK_GRAY}' font='{new Font("sans-serif", Font.BOLD, 16)}' text='lima.charts.account'/></cell> - </row> - <row fill="both"> - <cell columns="2" weightx="1" weighty="0.9"> - <JEditorPane javaBean='new org.chorem.lima.ui.home.AccountsPane(this)' /> - </cell> - </row> - </Table> - </JPanel> - </cell> - <cell anchor="southwest"> - <JPanel - id = 'entryBookPanel' - border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}' - minimumSize='{getMiniSize()}' - preferredSize='{getFixedSize()}' - layout='{new BoxLayout(entryBookPanel, BoxLayout.X_AXIS)}'> - <Table> - <row> - <cell weightx="0" weighty="0.1" anchor="northwest"><JLabel icon='{new ImageIcon(getClass().getResource("/images/entrybooks.png"))}'/></cell> - <cell weightx="1" weighty="0.1" anchor="center"><JLabel foreground='{Color.DARK_GRAY}' font='{new Font("sans-serif", Font.BOLD, 16)}' text='lima.common.entrybooks'/></cell> - </row> - <row fill="both"> - <cell columns="2" weightx="1" weighty="0.9"> - <JEditorPane javaBean='new org.chorem.lima.ui.home.EntryBooksPane(this)' /> - </cell> - </row> - </Table> - </JPanel> - </cell> + <JPanel + id='accountPanel' + border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}' + minimumSize='{getMiniSize()}' + preferredSize='{getFixedSize()}' + layout='{new BoxLayout(accountPanel, BoxLayout.X_AXIS)}'> + <Table> + <row> + <cell weightx="0" weighty="0.1" anchor="northwest"> + <JLabel + icon='{new ImageIcon(getClass().getResource("/images/accounts.png"))}'/> + </cell> + <cell weightx="1" weighty="0.1" anchor="center"> + <JLabel foreground='{Color.DARK_GRAY}' + font='{new Font("sans-serif", Font.BOLD, 16)}' + text='lima.charts.account'/> + </cell> + </row> + <row fill="both"> + <cell columns="2" weightx="1" weighty="0.9"> + <JEditorPane + javaBean='new AccountsPane(this)'/> + </cell> + </row> + </Table> + </JPanel> + </cell> + <cell anchor="southwest"> + <JPanel + id='entryBookPanel' + border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}' + minimumSize='{getMiniSize()}' + preferredSize='{getFixedSize()}' + layout='{new BoxLayout(entryBookPanel, BoxLayout.X_AXIS)}'> + <Table> + <row> + <cell weightx="0" weighty="0.1" anchor="northwest"> + <JLabel + icon='{new ImageIcon(getClass().getResource("/images/entrybooks.png"))}'/> + </cell> + <cell weightx="1" weighty="0.1" anchor="center"> + <JLabel foreground='{Color.DARK_GRAY}' + font='{new Font("sans-serif", Font.BOLD, 16)}' + text='lima.common.entrybooks'/> + </cell> + </row> + <row fill="both"> + <cell columns="2" weightx="1" weighty="0.9"> + <JEditorPane + javaBean='new EntryBooksPane(this)'/> + </cell> + </row> + </Table> + </JPanel> + </cell> </row> <row> - <cell anchor="northeast"> - <JPanel - id = 'fiscalPeriodPanel' - border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}' - minimumSize='{getMiniSize()}' - preferredSize='{getFixedSize()}' - layout='{new BoxLayout(fiscalPeriodPanel, BoxLayout.X_AXIS)}'> - <Table> - <row> - <cell weightx="0" weighty="0.1" anchor="northwest"><JLabel icon='{new ImageIcon(getClass().getResource("/images/fiscalperiods.png"))}'/></cell> - <cell weightx="1" weighty="0.1" anchor="center"><JLabel foreground='{Color.DARK_GRAY}' font='{new Font("sans-serif", Font.BOLD, 16)}' text='lima.charts.fiscalyear'/></cell> - </row> - <row fill="both"> - <cell columns="2" weightx="1" weighty="0.9"> - <JEditorPane javaBean='new org.chorem.lima.ui.home.FiscalPeriodsPane(this)' /> - </cell> - </row> - </Table> - </JPanel> - </cell> - <cell anchor="northwest"> - <JPanel - id = 'financialTransactionPanel' - border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}' - minimumSize='{getMiniSize()}' - preferredSize='{getFixedSize()}' - layout='{new BoxLayout(financialTransactionPanel, BoxLayout.X_AXIS)}'> - <Table> - <row> - <cell weightx="0" weighty="0.1" anchor="northwest"><JLabel icon='{new ImageIcon(getClass().getResource("/images/entries.png"))}'/></cell> - <cell weightx="1" weighty="0.1" anchor="center"><JLabel foreground='{Color.DARK_GRAY}' font='{new Font("sans-serif", Font.BOLD, 16)}' text='lima.daily'/></cell> - </row> - <row fill="both"> - <cell columns="2" weightx="1" weighty="0.9"> - <JEditorPane javaBean='new org.chorem.lima.ui.home.FinancialTransactionsPane(this)' /> - </cell> - </row> - </Table> - </JPanel> + <cell anchor="northeast"> + <JPanel + id='fiscalPeriodPanel' + border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}' + minimumSize='{getMiniSize()}' + preferredSize='{getFixedSize()}' + layout='{new BoxLayout(fiscalPeriodPanel, BoxLayout.X_AXIS)}'> + <Table> + <row> + <cell weightx="0" weighty="0.1" anchor="northwest"> + <JLabel + icon='{new ImageIcon(getClass().getResource("/images/fiscalperiods.png"))}'/> + </cell> + <cell weightx="1" weighty="0.1" anchor="center"> + <JLabel foreground='{Color.DARK_GRAY}' + font='{new Font("sans-serif", Font.BOLD, 16)}' + text='lima.charts.fiscalyear'/> + </cell> + </row> + <row fill="both"> + <cell columns="2" weightx="1" weighty="0.9"> + <JEditorPane + javaBean='new FiscalPeriodsPane(this)'/> + </cell> + </row> + </Table> + </JPanel> </cell> + <cell anchor="northwest"> + <JPanel + id='financialTransactionPanel' + border='{BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)}' + minimumSize='{getMiniSize()}' + preferredSize='{getFixedSize()}' + layout='{new BoxLayout(financialTransactionPanel, BoxLayout.X_AXIS)}'> + <Table> + <row> + <cell weightx="0" weighty="0.1" anchor="northwest"> + <JLabel + icon='{new ImageIcon(getClass().getResource("/images/entries.png"))}'/> + </cell> + <cell weightx="1" weighty="0.1" anchor="center"> + <JLabel foreground='{Color.DARK_GRAY}' + font='{new Font("sans-serif", Font.BOLD, 16)}' + text='lima.daily'/> + </cell> + </row> + <row fill="both"> + <cell columns="2" weightx="1" weighty="0.9"> + <JEditorPane + javaBean='new FinancialTransactionsPane(this)'/> + </cell> + </row> + </Table> + </JPanel> + </cell> </row> </Table> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -26,10 +26,14 @@ <JDialog modal="true" defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <jaxx.runtime.swing.JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/> - <Boolean id="validOk" javaBean='true'/> - - <script> + <import> + jaxx.runtime.swing.JAXXButtonGroup + </import> + + <JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/> + <Boolean id="validOk" javaBean='true'/> + + <script> <![CDATA[ getRootPane().setDefaultButton(ok); @@ -38,30 +42,40 @@ dispose(); } ]]> - </script> + </script> - <Table> - <row fill="horizontal"> - <cell> - <JRadioButton id="newLetter" text='lima.entries.lettering.radiobutton.new' value='{true}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - <cell><JTextField editable="false" visible="{newLetter.isSelected()}" id='newLetterTextField' /></cell> - </row> - <row> - <cell> - <JRadioButton id="listLetter" text='lima.entries.lettering.radiobutton.list' value='{false}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - <cell><JComboBox id='LetterListComboBox' visible="{listLetter.isSelected()}" javaBean="new LetterComboBox()"/></cell> - </row> - <row> - <cell fill="none"> - <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell fill="none"> - <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> - </cell> - </row> - </Table> + <Table> + <row fill="horizontal"> + <cell> + <JRadioButton id="newLetter" + text='lima.entries.lettering.radiobutton.new' + value='{true}' buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + <cell> + <JTextField editable="false" visible="{newLetter.isSelected()}" + id='newLetterTextField'/> + </cell> + </row> + <row> + <cell> + <JRadioButton id="listLetter" + text='lima.entries.lettering.radiobutton.list' + value='{false}' buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + <cell> + <JComboBox id='LetterListComboBox' visible="{listLetter.isSelected()}" + javaBean="new LetterComboBox()"/> + </cell> + </row> + <row> + <cell fill="none"> + <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> + </cell> + <cell fill="none"> + <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file 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 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,53 +24,70 @@ --> <Table> - <LetteringViewHandler id="handler" javaBean="new LetteringViewHandler(this)" /> - <Boolean id="selectedRow" javaBean="false" /> - - <script> + + <import> + javax.swing.ListSelectionModel + org.chorem.lima.entity.FiscalPeriod + org.chorem.lima.entity.FinancialPeriod + org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer + org.chorem.lima.enums.ComboBoxDatesEnum + </import> + + <LetteringViewHandler id="handler" javaBean="new LetteringViewHandler(this)"/> + <Boolean id="selectedRow" javaBean="false"/> + + <script> <![CDATA[ - import org.chorem.lima.entity.FiscalPeriod; - import org.chorem.lima.entity.FinancialPeriod; - import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxRenderer; - - import org.chorem.lima.enums.ComboBoxDatesEnum; + LetteringPeriodSearchPanel periodSearchPanel = new LetteringPeriodSearchPanel(handler); void $afterCompleteSetup() { } ]]> - </script> - - <row weightx="1" weighty="0" anchor="center"> - <cell fill='both'><Table><row> - <cell anchor="west"><JComboBox id="periodComboBox" javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())" - onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem())); - validate(); repaint()"/></cell> - <cell><LetteringPeriodSearchPanel javaBean="periodSearchPanel"/></cell> - </row></Table></cell> - <cell> - <JButton text="lima.entries.lettering.add" - onActionPerformed="handler.addLetter()" toolTipText="lima.tooltip.lettering" enabled="{isSelectedRow()}"/> - </cell> - <cell> - <JButton text="lima.entries.lettering.remove" - onActionPerformed="handler.removeLetter()" enabled="{isSelectedRow()}"/> - </cell> + </script> - </row> - <row> - <cell fill="both" weightx="1" weighty="1" rows="3" columns="11"> - <JScrollPane> - <org.chorem.lima.ui.lettering.LetteringTableModel - id="tableModel"/> - <org.chorem.lima.ui.lettering.LetteringTable - id="table" sortable="false" rowHeight="22" - constructorParams="getHandler()" model="{getTableModel()}" - selectionMode="{ListSelectionModel.MULTIPLE_INTERVAL_SELECTION }" /> - <javax.swing.ListSelectionModel javaBean="getTable().getSelectionModel()" - onValueChanged="setSelectedRow(table.getSelectedRow() != -1)"/> - </JScrollPane> - </cell> - </row> + <row weightx="1" weighty="0" anchor="center"> + <cell fill='both'> + <Table> + <row> + <cell anchor="west"> + <JComboBox id="periodComboBox" + javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())" + onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem())); + validate(); repaint()"/> + </cell> + <cell> + <LetteringPeriodSearchPanel javaBean="periodSearchPanel"/> + </cell> + </row> + </Table> + </cell> + <cell> + <JButton text="lima.entries.lettering.add" + onActionPerformed="handler.addLetter()" + toolTipText="lima.tooltip.lettering" + enabled="{isSelectedRow()}"/> + </cell> + <cell> + <JButton text="lima.entries.lettering.remove" + onActionPerformed="handler.removeLetter()" + enabled="{isSelectedRow()}"/> + </cell> + + </row> + <row> + <cell fill="both" weightx="1" weighty="1" rows="3" columns="11"> + <JScrollPane> + <LetteringTableModel + id="tableModel"/> + <LetteringTable + id="table" sortable="false" rowHeight="22" + constructorParams="getHandler()" model="{getTableModel()}" + selectionMode="{ListSelectionModel.MULTIPLE_INTERVAL_SELECTION }"/> + <ListSelectionModel javaBean="getTable().getSelectionModel()" + onValueChanged="setSelectedRow(table.getSelectedRow() != -1)"/> + </JScrollPane> + </cell> + </row> </Table> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateAccountsPanel.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateAccountsPanel.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateAccountsPanel.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,47 +24,58 @@ --> <JPanel> - <jaxx.runtime.swing.JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/> + <import> + jaxx.runtime.swing.JAXXButtonGroup + org.chorem.lima.enums.AccountsChartEnum + </import> + <JAXXButtonGroup id="radioButtons"/> - <script> - <![CDATA[ - import org.chorem.lima.enums.AccountsChartEnum; - ]]> - </script> - <Table> - <row> - <cell><JLabel text='lima.opening.accounts' /></cell> - </row> - <row> - <cell> - <JRadioButton text='lima.charts.account.shortened' value='{AccountsChartEnum.SHORTENED}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.charts.account.base' value='{AccountsChartEnum.BASE}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.charts.account.developed' value='{AccountsChartEnum.DEVELOPED}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.importexport.importcsv' value='{AccountsChartEnum.IMPORT}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.importexport.importebp' value='{AccountsChartEnum.IMPORTEBP}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - </Table> + <Table> + <row> + <cell> + <JLabel text='lima.opening.accounts'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.charts.account.shortened' + value='{AccountsChartEnum.SHORTENED}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.charts.account.base' + value='{AccountsChartEnum.BASE}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.charts.account.developed' + value='{AccountsChartEnum.DEVELOPED}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.importexport.importcsv' + value='{AccountsChartEnum.IMPORT}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.importexport.importebp' + value='{AccountsChartEnum.IMPORTEBP}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + </Table> </JPanel> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateEntryBookPanel.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateEntryBookPanel.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateEntryBookPanel.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,18 +24,17 @@ --> <JPanel> - <script> - <![CDATA[ - ]]> - </script> - <Table> - <row> - <cell><JLabel text='lima.opening.entrybook' /></cell> - </row> - <row> - <cell> - <JCheckBox id='importEntryBook' text='lima.importexport.defaultentrybooks' selected='true'/> - </cell> - </row> - </Table> + <Table> + <row> + <cell> + <JLabel text='lima.opening.entrybook'/> + </cell> + </row> + <row> + <cell> + <JCheckBox id='importEntryBook' + text='lima.importexport.defaultentrybooks' selected='true'/> + </cell> + </row> + </Table> </JPanel> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -23,16 +23,19 @@ #L% --> <JPanel> - <script> + <import> + java.util.Calendar + java.util.Date + org.apache.commons.lang.time.DateUtils + org.jdesktop.swingx.JXDatePicker + org.chorem.lima.entity.FiscalPeriod + org.chorem.lima.business.FiscalPeriodServiceMonitorable + org.chorem.lima.business.LimaException + org.chorem.lima.service.LimaServiceFactory + </import> + <script> <![CDATA[ - import org.chorem.lima.entity.FiscalPeriod; - import org.chorem.lima.business.FiscalPeriodServiceMonitorable; - import org.chorem.lima.service.LimaServiceFactory; - import org.chorem.lima.business.LimaException; - import org.apache.commons.lang.time.DateUtils; - import java.util.Date; - import java.util.Calendar; - + protected FiscalPeriodServiceMonitorable fiscalPeriodService = LimaServiceFactory.getInstance().getService( FiscalPeriodServiceMonitorable.class); @@ -64,27 +67,27 @@ getEndDatePicker().setDate(endDate); ]]> - </script> + </script> - <Table fill="both"> - <row> - <cell columns ="3"> - <JLabel text="lima.charts.fiscalperiod.create"/> - </cell> - </row> - <row> - <cell> - <JLabel text="lima.common.begindate"/> - </cell> - <cell> - <org.jdesktop.swingx.JXDatePicker id="beginDatePicker"/> - </cell> - <cell> - <JLabel text="lima.common.enddate"/> - </cell> - <cell> - <org.jdesktop.swingx.JXDatePicker id="endDatePicker"/> - </cell> - </row> - </Table> + <Table fill="both"> + <row> + <cell columns="3"> + <JLabel text="lima.charts.fiscalperiod.create"/> + </cell> + </row> + <row> + <cell> + <JLabel text="lima.common.begindate"/> + </cell> + <cell> + <JXDatePicker id="beginDatePicker"/> + </cell> + <cell> + <JLabel text="lima.common.enddate"/> + </cell> + <cell> + <JXDatePicker id="endDatePicker"/> + </cell> + </row> + </Table> </JPanel> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,124 +24,137 @@ --> <JPanel> - <org.chorem.lima.ui.identity.IdentityHandler id="handler" javaBean="new org.chorem.lima.ui.identity.IdentityHandler()" /> - <org.chorem.lima.entity.Identity id="identity" javaBean='handler.getIdentity()'/> + <import> + javax.swing.text.Document + org.chorem.lima.entity.Identity + org.chorem.lima.ui.identity.IdentityHandler + </import> - <script> + <IdentityHandler id="handler" + javaBean="new org.chorem.lima.ui.identity.IdentityHandler()"/> + <Identity id="identity" javaBean='handler.getIdentity()'/> + + <script> <![CDATA[ - ]]> - </script> -<Table> - <row> - <cell fill="horizontal"> - <JLabel text="lima.identity.name"/> - </cell> - <cell fill="horizontal"> - <JTextField id="nameTextField" text="{getIdentity().getName()}"/> - <javax.swing.text.Document javaBean="getNameTextField().getDocument()" - onInsertUpdate='getIdentity().setName(getNameTextField().getText())' - onRemoveUpdate='getIdentity().setName(getNameTextField().getText())' /> - </cell> - <cell fill="horizontal"> - <JLabel text="lima.identity.description"/> - </cell> - <cell fill="horizontal"> - <JTextField id="descriptionTextField" text="{getIdentity().getDescription()}"/> - <javax.swing.text.Document javaBean="getDescriptionTextField().getDocument()" - onInsertUpdate='getIdentity().setDescription(getDescriptionTextField().getText())' - onRemoveUpdate='getIdentity().setDescription(getDescriptionTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.identity.address"/> - </cell> - <cell fill="horizontal"> - <JTextField id="addressTextField" text="{getIdentity().getAddress()}"/> - <javax.swing.text.Document javaBean="getAddressTextField().getDocument()" - onInsertUpdate='getIdentity().setAddress(getAddressTextField().getText())' - onRemoveUpdate='getIdentity().setAddress(getAddressTextField().getText())' /> - </cell> - <cell fill="horizontal"> - <JLabel text="lima.identity.address2"/> - </cell> - <cell fill="horizontal"> - <JTextField id="address2TextField" text="{getIdentity().getAddress2()}"/> - <javax.swing.text.Document javaBean="getAddress2TextField().getDocument()" - onInsertUpdate='getIdentity().setAddress2(getAddress2TextField().getText())' - onRemoveUpdate='getIdentity().setAddress2(getAddress2TextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.identity.zipCode"/> - </cell> - <cell fill="horizontal"> - <JTextField id="zipCodeTextField" text="{getIdentity().getZipCode()}"/> - <javax.swing.text.Document javaBean="getZipCodeTextField().getDocument()" - onInsertUpdate='getIdentity().setZipCode(getZipCodeTextField().getText())' - onRemoveUpdate='getIdentity().setZipCode(getZipCodeTextField().getText())' /> - </cell> - <cell fill="horizontal"> - <JLabel text="lima.identity.city"/> - </cell> - <cell fill="horizontal"> - <JTextField id="cityTextField" text="{getIdentity().getCity()}"/> - <javax.swing.text.Document javaBean="getCityTextField().getDocument()" - onInsertUpdate='getIdentity().setCity(getCityTextField().getText())' - onRemoveUpdate='getIdentity().setCity(getCityTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.identity.businessNumber"/> - </cell> - <cell fill="horizontal"> - <JTextField id="businessNumberTextField" text="{getIdentity().getBusinessNumber()}"/> - <javax.swing.text.Document javaBean="getBusinessNumberTextField().getDocument()" - onInsertUpdate='getIdentity().setBusinessNumber(getBusinessNumberTextField().getText())' - onRemoveUpdate='getIdentity().setBusinessNumber(getBusinessNumberTextField().getText())' /> - </cell> - <cell fill="horizontal"> - <JLabel text="lima.identity.vatNumber"/> - </cell> - <cell fill="horizontal"> - <JTextField id="vatNumberTextField" text="{getIdentity().getVatNumber()}"/> - <javax.swing.text.Document javaBean="getVatNumberTextField().getDocument()" - onInsertUpdate='getIdentity().setVatNumber(getVatNumberTextField().getText())' - onRemoveUpdate='getIdentity().setVatNumber(getVatNumberTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.identity.classificationCode"/> - </cell> - <cell fill="horizontal"> - <JTextField id="classificationCodeTextField" text="{getIdentity().getClassificationCode()}"/> - <javax.swing.text.Document javaBean="getClassificationCodeTextField().getDocument()" - onInsertUpdate='getIdentity().setClassificationCode(getClassificationCodeTextField().getText())' - onRemoveUpdate='getIdentity().setClassificationCode(getClassificationCodeTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.identity.phoneNumber"/> - </cell> - <cell fill="horizontal"> - <JTextField id="phoneNumberTextField" text="{getIdentity().getPhoneNumber()}"/> - <javax.swing.text.Document javaBean="getPhoneNumberTextField().getDocument()" - onInsertUpdate='getIdentity().setPhoneNumber(getPhoneNumberTextField().getText())' - onRemoveUpdate='getIdentity().setPhoneNumber(getPhoneNumberTextField().getText())' /> - </cell> - <cell fill="horizontal"> - <JLabel text="lima.identity.email"/> - </cell> - <cell fill="horizontal"> - <JTextField id="emailTextField" text="{getIdentity().getEmail()}"/> - <javax.swing.text.Document javaBean="getEmailTextField().getDocument()" - onInsertUpdate='getIdentity().setEmail(getEmailTextField().getText())' - onRemoveUpdate='getIdentity().setEmail(getEmailTextField().getText())' /> - </cell> - </row> - </Table> + ]]> + </script> + <Table> + <row> + <cell fill="horizontal"> + <JLabel text="lima.identity.name"/> + </cell> + <cell fill="horizontal"> + <JTextField id="nameTextField" text="{getIdentity().getName()}"/> + <Document javaBean="getNameTextField().getDocument()" + onInsertUpdate='getIdentity().setName(getNameTextField().getText())' + onRemoveUpdate='getIdentity().setName(getNameTextField().getText())'/> + </cell> + <cell fill="horizontal"> + <JLabel text="lima.identity.description"/> + </cell> + <cell fill="horizontal"> + <JTextField id="descriptionTextField" + text="{getIdentity().getDescription()}"/> + <Document javaBean="getDescriptionTextField().getDocument()" + onInsertUpdate='getIdentity().setDescription(getDescriptionTextField().getText())' + onRemoveUpdate='getIdentity().setDescription(getDescriptionTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.identity.address"/> + </cell> + <cell fill="horizontal"> + <JTextField id="addressTextField" text="{getIdentity().getAddress()}"/> + <Document javaBean="getAddressTextField().getDocument()" + onInsertUpdate='getIdentity().setAddress(getAddressTextField().getText())' + onRemoveUpdate='getIdentity().setAddress(getAddressTextField().getText())'/> + </cell> + <cell fill="horizontal"> + <JLabel text="lima.identity.address2"/> + </cell> + <cell fill="horizontal"> + <JTextField id="address2TextField" + text="{getIdentity().getAddress2()}"/> + <Document javaBean="getAddress2TextField().getDocument()" + onInsertUpdate='getIdentity().setAddress2(getAddress2TextField().getText())' + onRemoveUpdate='getIdentity().setAddress2(getAddress2TextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.identity.zipCode"/> + </cell> + <cell fill="horizontal"> + <JTextField id="zipCodeTextField" text="{getIdentity().getZipCode()}"/> + <Document javaBean="getZipCodeTextField().getDocument()" + onInsertUpdate='getIdentity().setZipCode(getZipCodeTextField().getText())' + onRemoveUpdate='getIdentity().setZipCode(getZipCodeTextField().getText())'/> + </cell> + <cell fill="horizontal"> + <JLabel text="lima.identity.city"/> + </cell> + <cell fill="horizontal"> + <JTextField id="cityTextField" text="{getIdentity().getCity()}"/> + <Document javaBean="getCityTextField().getDocument()" + onInsertUpdate='getIdentity().setCity(getCityTextField().getText())' + onRemoveUpdate='getIdentity().setCity(getCityTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.identity.businessNumber"/> + </cell> + <cell fill="horizontal"> + <JTextField id="businessNumberTextField" + text="{getIdentity().getBusinessNumber()}"/> + <Document javaBean="getBusinessNumberTextField().getDocument()" + onInsertUpdate='getIdentity().setBusinessNumber(getBusinessNumberTextField().getText())' + onRemoveUpdate='getIdentity().setBusinessNumber(getBusinessNumberTextField().getText())'/> + </cell> + <cell fill="horizontal"> + <JLabel text="lima.identity.vatNumber"/> + </cell> + <cell fill="horizontal"> + <JTextField id="vatNumberTextField" + text="{getIdentity().getVatNumber()}"/> + <Document javaBean="getVatNumberTextField().getDocument()" + onInsertUpdate='getIdentity().setVatNumber(getVatNumberTextField().getText())' + onRemoveUpdate='getIdentity().setVatNumber(getVatNumberTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.identity.classificationCode"/> + </cell> + <cell fill="horizontal"> + <JTextField id="classificationCodeTextField" + text="{getIdentity().getClassificationCode()}"/> + <Document javaBean="getClassificationCodeTextField().getDocument()" + onInsertUpdate='getIdentity().setClassificationCode(getClassificationCodeTextField().getText())' + onRemoveUpdate='getIdentity().setClassificationCode(getClassificationCodeTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.identity.phoneNumber"/> + </cell> + <cell fill="horizontal"> + <JTextField id="phoneNumberTextField" + text="{getIdentity().getPhoneNumber()}"/> + <Document javaBean="getPhoneNumberTextField().getDocument()" + onInsertUpdate='getIdentity().setPhoneNumber(getPhoneNumberTextField().getText())' + onRemoveUpdate='getIdentity().setPhoneNumber(getPhoneNumberTextField().getText())'/> + </cell> + <cell fill="horizontal"> + <JLabel text="lima.identity.email"/> + </cell> + <cell fill="horizontal"> + <JTextField id="emailTextField" text="{getIdentity().getEmail()}"/> + <Document javaBean="getEmailTextField().getDocument()" + onInsertUpdate='getIdentity().setEmail(getEmailTextField().getText())' + onRemoveUpdate='getIdentity().setEmail(getEmailTextField().getText())'/> + </cell> + </row> + </Table> </JPanel> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,15 +24,16 @@ --> <JDialog modal="true"> - <OpeningViewHandler id="handler" javaBean="new OpeningViewHandler(this)" /> - <script> + <import> + javax.swing.BorderFactory + javax.swing.ImageIcon + </import> + + <OpeningViewHandler id="handler" javaBean="new OpeningViewHandler(this)"/> + + <script> <![CDATA[ - import javax.swing.BorderFactory; - import javax.swing.ImageIcon; - - - getRootPane().setDefaultButton(ok); protected void performNext() { dispose(); @@ -41,46 +42,57 @@ dispose(); } ]]> - </script> + </script> - <Table> - <row weighty="0.9"> - <cell columns="3" fill="both"> - <Table> - <row> - <cell weightx="0.1"><JLabel id='identityIcon' - icon='{new ImageIcon(getClass().getResource("/images/identity.png"))}'/></cell> - <cell weightx="0.9" rows="4" fill="both"> - <JPanel id='panel'> - <JLabel text='lima.opening.welcome' /> - <JButton text='lima.opening.import' onActionPerformed="handler.importSave()"/> - </JPanel> - </cell> - </row> - <row> - <cell><JLabel id='accountsIcon' - icon='{new ImageIcon(getClass().getResource("/images/accounts.png"))}'/></cell> - </row> - <row> - <cell><JLabel id='entrybooksIcon' - icon='{new ImageIcon(getClass().getResource("/images/entrybooks.png"))}'/></cell> - </row> - <row> - <cell><JLabel id='fiscalperiodsIcon' - icon='{new ImageIcon(getClass().getResource("/images/fiscalperiods.png"))}'/></cell> - </row> - </Table> - </cell> - </row> - <row weighty="0.1"> - <cell weightx="0.8"><JLabel text=''/> + <Table> + <row weighty="0.9"> + <cell columns="3" fill="both"> + <Table> + <row> + <cell weightx="0.1"> + <JLabel id='identityIcon' + icon='{new ImageIcon(getClass().getResource("/images/identity.png"))}'/> </cell> - <cell weightx="0.1" fill="none"> - <JButton text="lima.common.close" onActionPerformed="performCancel()"/> + <cell weightx="0.9" rows="4" fill="both"> + <JPanel id='panel'> + <JLabel text='lima.opening.welcome'/> + <JButton text='lima.opening.import' + onActionPerformed="handler.importSave()"/> + </JPanel> </cell> - <cell weightx="0.1" fill="none"> - <JButton id="ok" text="lima.common.next" onActionPerformed="handler.next()"/> + </row> + <row> + <cell> + <JLabel id='accountsIcon' + icon='{new ImageIcon(getClass().getResource("/images/accounts.png"))}'/> </cell> - </row> - </Table> + </row> + <row> + <cell> + <JLabel id='entrybooksIcon' + icon='{new ImageIcon(getClass().getResource("/images/entrybooks.png"))}'/> + </cell> + </row> + <row> + <cell> + <JLabel id='fiscalperiodsIcon' + icon='{new ImageIcon(getClass().getResource("/images/fiscalperiods.png"))}'/> + </cell> + </row> + </Table> + </cell> + </row> + <row weighty="0.1"> + <cell weightx="0.8"> + <JLabel text=''/> + </cell> + <cell weightx="0.1" fill="none"> + <JButton text="lima.common.close" onActionPerformed="performCancel()"/> + </cell> + <cell weightx="0.1" fill="none"> + <JButton id="ok" text="lima.common.next" + onActionPerformed="handler.next()"/> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartImportForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartImportForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartImportForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -26,66 +26,84 @@ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <jaxx.runtime.swing.JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/> - <Boolean id="addState" javaBean='true'/> + <import> + jaxx.runtime.swing.JAXXButtonGroup + org.chorem.lima.enums.VatStatementsChartEnum + </import> - <script> + <JAXXButtonGroup id="radioButtons" javaBean='new JAXXButtonGroup()'/> + <Boolean id="addState" javaBean='true'/> + + <script> <![CDATA[ - import org.chorem.lima.enums.VatStatementsChartEnum; + getRootPane().setDefaultButton(ok); protected void performCancel() { getRadioButtons().setSelectedValue(null); dispose(); } ]]> - </script> + </script> - <Table> - <row> - <cell><JLabel text='lima.charts.vatstatement.nothing' /></cell> - </row> - <row> - <cell> - <JRadioButton text='lima.charts.vatstatement.shortened' value='{VatStatementsChartEnum.SHORTENED}' buttonGroup="{getRadioButtons()}" - selected='true'/> + <Table> + <row> + <cell> + <JLabel text='lima.charts.vatstatement.nothing'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.charts.vatstatement.shortened' + value='{VatStatementsChartEnum.SHORTENED}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.charts.vatstatement.base' + value='{VatStatementsChartEnum.BASE}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.charts.vatstatement.developed' + value='{VatStatementsChartEnum.DEVELOPED}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JRadioButton text='lima.importexport.import' + value='{VatStatementsChartEnum.IMPORT}' + buttonGroup="{getRadioButtons()}" + selected='true'/> + </cell> + </row> + <row> + <cell> + <JCheckBox id='deleteVatStatementChart' text='lima.vatstatement.delete' + selected='false'/> + </cell> + </row> + <row> + <cell> + <Table> + <row> + <cell fill="none"> + <JButton text="lima.common.cancel" + onActionPerformed="performCancel()"/> </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.charts.vatstatement.base' value='{VatStatementsChartEnum.BASE}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.charts.vatstatement.developed' value='{VatStatementsChartEnum.DEVELOPED}' buttonGroup="{getRadioButtons()}" - selected='true'/> + <cell fill="none"> + <JButton id="ok" text="lima.common.ok" + onActionPerformed="dispose()"/> </cell> - </row> - <row> - <cell> - <JRadioButton text='lima.importexport.import' value='{VatStatementsChartEnum.IMPORT}' buttonGroup="{getRadioButtons()}" - selected='true'/> - </cell> - </row> - <row> - <cell> - <JCheckBox id='deleteVatStatementChart' text='lima.vatstatement.delete' selected='false'/> - </cell> - </row> - <row> - <cell> - <Table> - <row> - <cell fill="none"> - <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell fill="none"> - <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> - </cell> - </row> - </Table> - </cell> - </row> - </Table> + </row> + </Table> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartMovementForm.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartMovementForm.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartMovementForm.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -26,14 +26,18 @@ defaultCloseOperation="{JDialog.DO_NOTHING_ON_CLOSE}" onWindowClosing="performCancel();"> - <org.chorem.lima.entity.VatStatement id="vatStatement" javaBean='null'/> - <Boolean id="addState" javaBean='true'/> + <import> + javax.swing.text.Document + org.chorem.lima.entity.VatStatement + org.chorem.lima.entity.VatStatementImpl + </import> - <script> + <VatStatement id="vatStatement" javaBean='null'/> + <Boolean id="addState" javaBean='true'/> + + <script> <![CDATA[ - - import org.chorem.lima.entity.VatStatementImpl; - + getRootPane().setDefaultButton(ok); protected void performCancel() { @@ -42,59 +46,61 @@ } ]]> - </script> + </script> - <Table> - - <row> - <cell fill="horizontal"> - <JLabel text="lima.vatstatement.label"/> - </cell> - <cell fill="horizontal"> - <JTextField id="labelTextField" text="{getVatStatement().getLabel()}"/> - <javax.swing.text.Document javaBean="getLabelTextField().getDocument()" - onInsertUpdate='getVatStatement().setLabel(getLabelTextField().getText())' - onRemoveUpdate='getVatStatement().setLabel(getLabelTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.vatstatement.boxname"/> - </cell> - <cell fill="horizontal"> - <JTextField id="boxNameTextField" text="{getVatStatement().getBoxName()}"/> - <javax.swing.text.Document javaBean="getBoxNameTextField().getDocument()" - onInsertUpdate='getVatStatement().setBoxName(getBoxNameTextField().getText())' - onRemoveUpdate='getVatStatement().setBoxName(getBoxNameTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.vatstatement.accounts"/> - </cell> - <cell fill="horizontal"> - <JTextField id="accountsTextField" text="{getVatStatement().getAccounts()}"/> - <javax.swing.text.Document javaBean="getAccountsTextField().getDocument()" - onInsertUpdate='getVatStatement().setAccounts(getAccountsTextField().getText())' - onRemoveUpdate='getVatStatement().setAccounts(getAccountsTextField().getText())' /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel text="lima.vatstatement.mastervatstatement"/> - </cell> - <cell fill="horizontal"> - <JTextField editable="{false}" id="masterVatStatementTextField" - text="{getVatStatement().getMasterVatStatement().getLabel()}" /> - </cell> - </row> - <row> - <cell fill="none"> - <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> - </cell> - <cell fill="none"> - <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> - </cell> - </row> - </Table> + <Table> + + <row> + <cell fill="horizontal"> + <JLabel text="lima.vatstatement.label"/> + </cell> + <cell fill="horizontal"> + <JTextField id="labelTextField" text="{getVatStatement().getLabel()}"/> + <Document javaBean="getLabelTextField().getDocument()" + onInsertUpdate='getVatStatement().setLabel(getLabelTextField().getText())' + onRemoveUpdate='getVatStatement().setLabel(getLabelTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.vatstatement.boxname"/> + </cell> + <cell fill="horizontal"> + <JTextField id="boxNameTextField" + text="{getVatStatement().getBoxName()}"/> + <Document javaBean="getBoxNameTextField().getDocument()" + onInsertUpdate='getVatStatement().setBoxName(getBoxNameTextField().getText())' + onRemoveUpdate='getVatStatement().setBoxName(getBoxNameTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.vatstatement.accounts"/> + </cell> + <cell fill="horizontal"> + <JTextField id="accountsTextField" + text="{getVatStatement().getAccounts()}"/> + <Document javaBean="getAccountsTextField().getDocument()" + onInsertUpdate='getVatStatement().setAccounts(getAccountsTextField().getText())' + onRemoveUpdate='getVatStatement().setAccounts(getAccountsTextField().getText())'/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="lima.vatstatement.mastervatstatement"/> + </cell> + <cell fill="horizontal"> + <JTextField editable="{false}" id="masterVatStatementTextField" + text="{getVatStatement().getMasterVatStatement().getLabel()}"/> + </cell> + </row> + <row> + <cell fill="none"> + <JButton text="lima.common.cancel" onActionPerformed="performCancel()"/> + </cell> + <cell fill="none"> + <JButton id="ok" text="lima.common.ok" onActionPerformed="dispose()"/> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -24,53 +24,58 @@ --> <Table> - <VatChartViewHandler id="handler" javaBean="new VatChartViewHandler(this)" /> - <Boolean id="selectedRow" javaBean="false" /> + <import> + javax.swing.ListSelectionModel + </import> - <script> + <VatChartViewHandler id="handler" javaBean="new VatChartViewHandler(this)"/> + <Boolean id="selectedRow" javaBean="false"/> + + <script> <![CDATA[ //getHandler().init(); ]]> - </script> + </script> - <row> - <cell fill="both" weightx="1" weighty="1" rows='6'> - <JScrollPane> - <org.chorem.lima.ui.vatchart.VatChartTreeTableModel id="vatTreeTableModel"/> - <org.chorem.lima.ui.vatchart.VatChartTreeTable id="treeTable" - constructorParams="getHandler()" - selectionMode="{ListSelectionModel.SINGLE_SELECTION}" - treeTableModel="{getVatTreeTableModel()}" /> - <javax.swing.ListSelectionModel - javaBean="getTreeTable().getSelectionModel()" - onValueChanged="setSelectedRow(treeTable.getSelectedRow() != -1)"/> - </JScrollPane> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="addVatStatementMovement" text="lima.vatstatement.movement.add" - onActionPerformed="getHandler().addVatStatementMovement()" /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="updateButton" text="lima.common.update" - onActionPerformed="getHandler().updateVatStatement()" - enabled="{isSelectedRow()}" /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="removeButton" text="lima.common.remove" - onActionPerformed="getHandler().removeVatStatement()" - enabled="{isSelectedRow()}" /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JButton id="importButton" text="lima.importexport.import" - onActionPerformed="getHandler().importVatStatementChart()" /> - </cell> - </row> + <row> + <cell fill="both" weightx="1" weighty="1" rows='6'> + <JScrollPane> + <VatChartTreeTableModel id="vatTreeTableModel"/> + <VatChartTreeTable id="treeTable" + constructorParams="getHandler()" + selectionMode="{ListSelectionModel.SINGLE_SELECTION}" + treeTableModel="{getVatTreeTableModel()}"/> + <ListSelectionModel + javaBean="getTreeTable().getSelectionModel()" + onValueChanged="setSelectedRow(treeTable.getSelectedRow() != -1)"/> + </JScrollPane> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="addVatStatementMovement" + text="lima.vatstatement.movement.add" + onActionPerformed="getHandler().addVatStatementMovement()"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="updateButton" text="lima.common.update" + onActionPerformed="getHandler().updateVatStatement()" + enabled="{isSelectedRow()}"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="removeButton" text="lima.common.remove" + onActionPerformed="getHandler().removeVatStatement()" + enabled="{isSelectedRow()}"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JButton id="importButton" text="lima.importexport.import" + onActionPerformed="getHandler().importVatStatementChart()"/> + </cell> + </row> </Table> \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/util/ReportDialogView.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/util/ReportDialogView.jaxx 2011-09-17 12:59:34 UTC (rev 3291) +++ trunk/lima-swing/src/main/java/org/chorem/lima/util/ReportDialogView.jaxx 2011-09-17 13:50:17 UTC (rev 3292) @@ -22,28 +22,29 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> - + <JDialog modal="true"> - <script> + <script> <![CDATA[ protected void performOk() { dispose(); } ]]> - </script> - - <Table> - <row weightx="1" weighty="1"> - <cell fill="both"> - <JScrollPane id="scrollPane"> - <JTextArea id="textArea" editable="false"/> - </JScrollPane> - </cell> - </row> - <row anchor="east"> - <cell> - <JButton id="okButton" text="lima.common.ok" onActionPerformed="performOk()"/> - </cell> - </row> - </Table> + </script> + + <Table> + <row weightx="1" weighty="1"> + <cell fill="both"> + <JScrollPane id="scrollPane"> + <JTextArea id="textArea" editable="false"/> + </JScrollPane> + </cell> + </row> + <row anchor="east"> + <cell> + <JButton id="okButton" text="lima.common.ok" + onActionPerformed="performOk()"/> + </cell> + </row> + </Table> </JDialog> \ No newline at end of file