This is an automated email from the git hooks/post-receive script. New commit to branch feature/3 in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit 574d2186e55b212d39c95d1869f1f48eea3df021 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Dec 17 15:56:02 2016 +0100 Pouvoir utiliser le raccourci clavier Ctrl + Shift + X pour annuler une nouvelle entrée dans un formulaire de type tableau (Closes #3) --- .../application/swing/ui/content/ObserveFocusManager.java | 4 ++-- .../application/swing/ui/content/table/ContentTableUI.jaxx | 4 ---- .../application/swing/ui/content/table/ContentTableUI.jcss | 13 ++----------- .../swing/ui/content/table/ContentTableUIHandler.java | 6 ++++++ 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ObserveFocusManager.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ObserveFocusManager.java index 0b92926..8f9eab6 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ObserveFocusManager.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ObserveFocusManager.java @@ -1017,8 +1017,8 @@ public class ObserveFocusManager { if (ui.getSaveNewEntry().isVisible() && ui.getSaveNewEntry().isEnabled()) { return ui.getSaveNewEntry(); } - if (ui.getResetNewEntry().isVisible() && ui.getResetNewEntry().isEnabled()) { - return ui.getResetNewEntry(); + if (ui.getResetEntry().isVisible() && ui.getResetEntry().isEnabled()) { + return ui.getResetEntry(); } return ui.getResetEntry(); } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUI.jaxx index f310a91..de3f9f8 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUI.jaxx @@ -145,10 +145,6 @@ public abstract SwingValidator<D> getValidatorTable(); <JButton id='newEntry'/> </cell> <cell weightx='1'> - <!-- annuler la création d'une nouvelle entrée (en mode creation) --> - <JButton id='resetNewEntry'/> - </cell> - <cell weightx='1'> <!-- réinitialiser l'entrée en cours d'édition (en mode mise a jour) --> <JButton id='resetEntry'/> </cell> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUI.jcss index 68cb4ea..84a958c 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUI.jcss @@ -80,22 +80,13 @@ visible:{tableModel.isEditable() && !tableModel.isCreate()}; } -#resetNewEntry{ - _observeAction:{ResetTableEntryUIAction.ACTION_NAME}; - _text:{t(getResetNewEntryText())}; - _toolTipText:{t(getResetNewEntryTip())}; - actionIcon:"revert"; - enabled:true; - visible:{tableModel.isEditable() && tableModel.isCreate()}; -} - #resetEntry { _observeAction:{ResetTableEntryUIAction.ACTION_NAME}; _text:{t(getResetEntryText())}; _toolTipText:{t(getResetEntryTip())}; actionIcon:"revert"; - enabled:{model.isCanResetRow()}; - visible:{tableModel.isEditable() && !tableModel.isEmpty() && !tableModel.isCreate()}; + enabled:{tableModel.isCreate() || model.isCanResetRow()}; + visible:{tableModel.isEditable() && (tableModel.isCreate() || !tableModel.isEmpty())}; } #saveEntry{ diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUIHandler.java index 84c3908..e0df339 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/ContentTableUIHandler.java @@ -266,6 +266,12 @@ public abstract class ContentTableUIHandler<E extends IdDto, D extends IdDto, U } if (canEdit) { +// +// if (getModel().isCreatingMode()) { +// getUi().getResetEntry().setText(getUi().getResetNewEntryText()); +// } else { +// getUi().getResetEntry().setText(getUi().getResetEntryText()); +// } // on force l'ecran en non modification //FIXME normalement, on ne devrait pas a avoir a faire ca ? -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.