Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
5b045f48
by Tony Chemit at 2021-02-11T21:54:08+01:00
24 changed files:
- client/datasource/editor/api/src/main/i18n/getters/java.getter
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/ObserveKeyStrokesEditorApi.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/ConfigureMenuAction.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/id/ChangeId.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/id/ShowTechnicalInformations.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/move/MoveRequestBuilder.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/edit/actions/MoveEdit.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/list/ContentListUI.jaxx
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/list/ContentListUIHandler.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/list/actions/MoveMultiple.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/open/ContentOpenableUI.jaxx
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/open/ContentOpenableUI.jcss
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/open/ContentOpenableUIHandler.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/open/actions/MoveOpenable.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUIHandler.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/actions/ShowUniqueKeysReferential.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/actions/ShowUsagesReferential.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/navigation/ContentUIMenuAction.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/navigation/NavigationTreeShowPopupHandler.java
- client/datasource/editor/api/src/main/resources/fr/ird/observe/client/datasource/editor/api/content/data/list/CommonContentListUI.jcss
- client/datasource/editor/api/src/main/resources/fr/ird/observe/client/datasource/editor/api/content/data/open/CommonContentOpenableUI.jcss
- client/i18n/src/main/i18n/translations/observe_en_GB.properties
- client/i18n/src/main/i18n/translations/observe_es_ES.properties
- client/i18n/src/main/i18n/translations/observe_fr_FR.properties
Changes:
| ... | ... | @@ -190,10 +190,10 @@ observe.ui.action.test.remote |
| 190 | 190 |
observe.ui.action.test.remote.tip
|
| 191 | 191 |
observe.ui.action.test.server
|
| 192 | 192 |
observe.ui.action.test.server.tip
|
| 193 |
-observe.ui.choice.apply
|
|
| 194 | 193 |
observe.ui.choice.cancel
|
| 195 | 194 |
observe.ui.choice.cancel.tip
|
| 196 | 195 |
observe.ui.choice.confirm.delete
|
| 196 |
+observe.ui.choice.confirm.move
|
|
| 197 | 197 |
observe.ui.choice.confirm.replace
|
| 198 | 198 |
observe.ui.choice.continue
|
| 199 | 199 |
observe.ui.choice.doNotSave
|
| ... | ... | @@ -65,8 +65,13 @@ public class ObserveKeyStrokesEditorApi extends ObserveKeyStrokesSupport { |
| 65 | 65 |
public static final KeyStroke KEY_STROKE_RESET_DATA = KeyStroke.getKeyStroke("pressed F4");
|
| 66 | 66 |
public static final KeyStroke KEY_STROKE_SAVE_DATA = KeyStroke.getKeyStroke("pressed F5");
|
| 67 | 67 |
public static final KeyStroke KEY_STROKE_DELETE_DATA_GLOBAL = KeyStroke.getKeyStroke("pressed F6");
|
| 68 |
+ public static final KeyStroke KEY_STROKE_MOVE = KeyStroke.getKeyStroke("pressed F7");
|
|
| 68 | 69 |
public static final KeyStroke KEY_STROKE_DUPLICATE = KeyStroke.getKeyStroke("pressed F7");
|
| 69 | 70 |
public static final KeyStroke KEY_STROKE_GENERATE = KeyStroke.getKeyStroke("pressed F9");
|
| 71 |
+ public static final KeyStroke KEY_STROKE_CHANGE_ID = KeyStroke.getKeyStroke("pressed F9");
|
|
| 72 |
+ public static final KeyStroke KEY_STROKE_SHOW_TECHNICAL_INFORMATIONS = KeyStroke.getKeyStroke("pressed F10");
|
|
| 73 |
+ public static final KeyStroke KEY_STROKE_SHOW_USAGES = KeyStroke.getKeyStroke("pressed F11");
|
|
| 74 |
+ public static final KeyStroke KEY_STROKE_SHOW_UNIQUE_KEYS = KeyStroke.getKeyStroke("pressed F12");
|
|
| 70 | 75 |
|
| 71 | 76 |
public static final KeyStroke KEY_STROKE_COPY_VALUES_AND_SAVE = KeyStroke.getKeyStroke("ctrl pressed T");
|
| 72 | 77 |
|
| ... | ... | @@ -26,6 +26,7 @@ import fr.ird.observe.client.datasource.editor.api.content.ContentUI; |
| 26 | 26 |
import org.nuiton.jaxx.runtime.swing.action.MenuAction;
|
| 27 | 27 |
|
| 28 | 28 |
import javax.swing.JPopupMenu;
|
| 29 |
+import javax.swing.KeyStroke;
|
|
| 29 | 30 |
|
| 30 | 31 |
/**
|
| 31 | 32 |
* Created on 25/11/2020.
|
| ... | ... | @@ -41,4 +42,12 @@ public interface ConfigureMenuAction<U extends ContentUI> extends MenuAction { |
| 41 | 42 |
default JPopupMenu getPopupMenu() {
|
| 42 | 43 |
return getUi().getConfigurePopup();
|
| 43 | 44 |
}
|
| 45 |
+ |
|
| 46 |
+ @Override
|
|
| 47 |
+ default KeyStroke getMenuKeyStroke() {
|
|
| 48 |
+ // always use the given key-stroke to avoid change between two content
|
|
| 49 |
+ // a same such action is unique on a form, so can be determine once for all
|
|
| 50 |
+ return (KeyStroke) getValue(ACCELERATOR_KEY);
|
|
| 51 |
+ }
|
|
| 52 |
+ |
|
| 44 | 53 |
}
|
| ... | ... | @@ -24,6 +24,7 @@ package fr.ird.observe.client.datasource.editor.api.content.actions.id; |
| 24 | 24 |
|
| 25 | 25 |
import com.google.common.collect.ImmutableSet;
|
| 26 | 26 |
import fr.ird.observe.client.datasource.api.ObserveSwingDataSource;
|
| 27 |
+import fr.ird.observe.client.datasource.editor.api.ObserveKeyStrokesEditorApi;
|
|
| 27 | 28 |
import fr.ird.observe.client.datasource.editor.api.content.ContentUI;
|
| 28 | 29 |
import fr.ird.observe.client.datasource.editor.api.content.actions.ConfigureMenuAction;
|
| 29 | 30 |
import fr.ird.observe.client.datasource.editor.api.content.actions.ContentUIActionSupport;
|
| ... | ... | @@ -92,7 +93,7 @@ public class ChangeId<U extends ContentUI> extends ContentUIActionSupport<U> imp |
| 92 | 93 |
}
|
| 93 | 94 |
|
| 94 | 95 |
public ChangeId(ChangeIdRequest request, ChangeIdExecutor executor) {
|
| 95 |
- super(t("observe.common.ReferentialDto.action.changeId.tip"), t("observe.common.ReferentialDto.action.changeId.tip"), "changeId", null);
|
|
| 96 |
+ super(t("observe.common.ReferentialDto.action.changeId.tip"), t("observe.common.ReferentialDto.action.changeId.tip"), "changeId", ObserveKeyStrokesEditorApi.KEY_STROKE_CHANGE_ID);
|
|
| 96 | 97 |
this.request = Objects.requireNonNull(request);
|
| 97 | 98 |
this.executor = Objects.requireNonNull(executor);
|
| 98 | 99 |
}
|
| ... | ... | @@ -22,6 +22,7 @@ package fr.ird.observe.client.datasource.editor.api.content.actions.id; |
| 22 | 22 |
* #L%
|
| 23 | 23 |
*/
|
| 24 | 24 |
|
| 25 |
+import fr.ird.observe.client.datasource.editor.api.ObserveKeyStrokesEditorApi;
|
|
| 25 | 26 |
import fr.ird.observe.client.datasource.editor.api.content.ContentMode;
|
| 26 | 27 |
import fr.ird.observe.client.datasource.editor.api.content.ContentUI;
|
| 27 | 28 |
import fr.ird.observe.client.datasource.editor.api.content.actions.ConfigureMenuAction;
|
| ... | ... | @@ -110,7 +111,7 @@ public class ShowTechnicalInformations<U extends ContentUI> extends ContentUIAct |
| 110 | 111 |
|
| 111 | 112 |
public ShowTechnicalInformations(ShowIdRequest request, ShowIdExecutor executor) {
|
| 112 | 113 |
super(n("observe.ui.action.show.technical.information.tip"), n("observe.ui.action.show.technical.information.tip"),
|
| 113 |
- "show-information", null);
|
|
| 114 |
+ "show-information", ObserveKeyStrokesEditorApi.KEY_STROKE_SHOW_TECHNICAL_INFORMATIONS);
|
|
| 114 | 115 |
this.request = Objects.requireNonNull(request);
|
| 115 | 116 |
this.executor = Objects.requireNonNull(executor);
|
| 116 | 117 |
}
|
| ... | ... | @@ -188,8 +188,8 @@ public class MoveRequestBuilder { |
| 188 | 188 |
selectTargetAction.putValue(Action.ACCELERATOR_KEY, keyStroke);
|
| 189 | 189 |
selectTargetAction.putValue(Action.NAME, t);
|
| 190 | 190 |
selectTarget.setFocusable(false);
|
| 191 |
- keyStroke = ObserveKeyStrokesEditorApi.KEY_STROKE_APPLY;
|
|
| 192 |
- t = ObserveKeyStrokesEditorApi.suffixTextWithKeyStroke(t("observe.ui.choice.apply"), keyStroke);
|
|
| 191 |
+ keyStroke = ObserveKeyStrokesEditorApi.KEY_STROKE_MOVE;
|
|
| 192 |
+ t = ObserveKeyStrokesEditorApi.suffixTextWithKeyStroke(t("observe.ui.choice.confirm.move"), keyStroke);
|
|
| 193 | 193 |
|
| 194 | 194 |
applyAction = new AbstractAction() {
|
| 195 | 195 |
@Override
|
| ... | ... | @@ -200,7 +200,6 @@ public class MoveRequestBuilder { |
| 200 | 200 |
};
|
| 201 | 201 |
applyAction.putValue(Action.ACCELERATOR_KEY, keyStroke);
|
| 202 | 202 |
applyAction.putValue(Action.NAME, t);
|
| 203 |
-// selectTarget.setAction(selectTargetAction);
|
|
| 204 | 203 |
}
|
| 205 | 204 |
|
| 206 | 205 |
public MoveRequestBuilder setParentTargetReferenceType(Class<? extends DtoReference> parentTargetReferenceType) {
|
| ... | ... | @@ -296,7 +295,7 @@ public class MoveRequestBuilder { |
| 296 | 295 |
|
| 297 | 296 |
JLayeredPane parent = (JLayeredPane) optionPane.getParent().getParent();
|
| 298 | 297 |
|
| 299 |
- InputMap inputMap = parent.getRootPane().getInputMap(2);
|
|
| 298 |
+ InputMap inputMap = parent.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
|
|
| 300 | 299 |
|
| 301 | 300 |
inputMap.put(KeyStroke.getKeyStroke("pressed ENTER"), "none");
|
| 302 | 301 |
inputMap.put(KeyStroke.getKeyStroke("ctrl pressed ENTER"), "none");
|
| ... | ... | @@ -305,6 +304,7 @@ public class MoveRequestBuilder { |
| 305 | 304 |
}
|
| 306 | 305 |
};
|
| 307 | 306 |
jButton = UsageUIHandlerSupport.findButton(optionPane, continueActionText);
|
| 307 |
+ jButton.setIcon(UIHelper.getUIManagerActionIcon("move"));
|
|
| 308 | 308 |
Objects.requireNonNull(jButton);
|
| 309 | 309 |
jButton.setEnabled(false);
|
| 310 | 310 |
editor.getModel().addPropertyChangeListener("selectedItem", evt -> jButton.setEnabled(evt.getNewValue() != null));
|
| ... | ... | @@ -23,6 +23,7 @@ package fr.ird.observe.client.datasource.editor.api.content.data.edit.actions; |
| 23 | 23 |
*/
|
| 24 | 24 |
|
| 25 | 25 |
import com.google.common.collect.ImmutableSet;
|
| 26 |
+import fr.ird.observe.client.datasource.editor.api.ObserveKeyStrokesEditorApi;
|
|
| 26 | 27 |
import fr.ird.observe.client.datasource.editor.api.content.actions.ConfigureMenuAction;
|
| 27 | 28 |
import fr.ird.observe.client.datasource.editor.api.content.actions.move.MoveExecutor;
|
| 28 | 29 |
import fr.ird.observe.client.datasource.editor.api.content.actions.move.MoveRequest;
|
| ... | ... | @@ -56,7 +57,7 @@ public final class MoveEdit<D extends EditableDto, U extends ContentEditUI<D, U> |
| 56 | 57 |
}
|
| 57 | 58 |
|
| 58 | 59 |
protected MoveEdit(Class<D> dataType, MoveExecutor executor) {
|
| 59 |
- super(dataType, null, null, "move", null);
|
|
| 60 |
+ super(dataType, null, null, "move", ObserveKeyStrokesEditorApi.KEY_STROKE_MOVE);
|
|
| 60 | 61 |
this.executor = executor;
|
| 61 | 62 |
setText(ContentOpenableUII18nHelper.getActionMove(getDataType()));
|
| 62 | 63 |
setTooltipText(ContentOpenableUII18nHelper.getActionMove(getDataType()));
|
| ... | ... | @@ -80,6 +80,6 @@ public abstract ContentListUIHandler<D, R, U> getHandler(); |
| 80 | 80 |
</row>
|
| 81 | 81 |
</Table>
|
| 82 | 82 |
|
| 83 |
+ <JMenuItem id='move'/>
|
|
| 83 | 84 |
<JMenuItem id='showTechnicalInformations'/>
|
| 84 |
- <JMenuItem id='move' styleClass="ifOpen"/>
|
|
| 85 | 85 |
</fr.ird.observe.client.datasource.editor.api.content.ContentUI>
|
| ... | ... | @@ -139,9 +139,9 @@ public abstract class ContentListUIHandler<D extends DataDto, R extends DataDtoR |
| 139 | 139 |
GotoOpenData.installAction(ui);
|
| 140 | 140 |
GotoSelectedData.installAction(ui);
|
| 141 | 141 |
installDeleteAction();
|
| 142 |
- ShowTechnicalInformations.installAction(ui);
|
|
| 143 | 142 |
installCreateNewAction();
|
| 144 | 143 |
installMoveAction();
|
| 144 |
+ ShowTechnicalInformations.installAction(ui);
|
|
| 145 | 145 |
}
|
| 146 | 146 |
|
| 147 | 147 |
@Override
|
| ... | ... | @@ -23,6 +23,7 @@ package fr.ird.observe.client.datasource.editor.api.content.data.list.actions; |
| 23 | 23 |
*/
|
| 24 | 24 |
|
| 25 | 25 |
import com.google.common.collect.ImmutableSet;
|
| 26 |
+import fr.ird.observe.client.datasource.editor.api.ObserveKeyStrokesEditorApi;
|
|
| 26 | 27 |
import fr.ird.observe.client.datasource.editor.api.content.actions.ConfigureMenuAction;
|
| 27 | 28 |
import fr.ird.observe.client.datasource.editor.api.content.actions.move.MoveExecutor;
|
| 28 | 29 |
import fr.ird.observe.client.datasource.editor.api.content.actions.move.MoveRequest;
|
| ... | ... | @@ -62,7 +63,7 @@ public final class MoveMultiple<D extends DataDto, R extends DataDtoReference, U |
| 62 | 63 |
}
|
| 63 | 64 |
|
| 64 | 65 |
protected MoveMultiple(Class<D> dataType, MoveExecutor executor) {
|
| 65 |
- super(dataType, null, null, "move", null);
|
|
| 66 |
+ super(dataType, null, null, "move", ObserveKeyStrokesEditorApi.KEY_STROKE_MOVE);
|
|
| 66 | 67 |
this.executor = executor;
|
| 67 | 68 |
setText(ContentListUII18nHelper.getActionMove(getDataType()));
|
| 68 | 69 |
setTooltipText(ContentListUII18nHelper.getActionMoveTip(getDataType()));
|
| ... | ... | @@ -70,7 +70,7 @@ public void resetEdit() { |
| 70 | 70 |
</cell>
|
| 71 | 71 |
</row>
|
| 72 | 72 |
</Table>
|
| 73 |
+ <JMenuItem id='move'/>
|
|
| 73 | 74 |
<JMenuItem id='showTechnicalInformations'/>
|
| 74 |
- <JMenuItem id='move' styleClass="ifOpen"/>
|
|
| 75 | 75 |
|
| 76 | 76 |
</fr.ird.observe.client.datasource.editor.api.content.ContentUI>
|
| ... | ... | @@ -44,7 +44,11 @@ |
| 44 | 44 |
}
|
| 45 | 45 |
|
| 46 | 46 |
#delete {
|
| 47 |
- visible:{states.isUpdatingMode()};
|
|
| 47 |
+ /*visible:{states.isUpdatingMode()};*/
|
|
| 48 |
+ enabled:{!states.isModified()};
|
|
| 49 |
+}
|
|
| 50 |
+ |
|
| 51 |
+#move {
|
|
| 48 | 52 |
enabled:{!states.isModified()};
|
| 49 | 53 |
}
|
| 50 | 54 |
|
| ... | ... | @@ -95,8 +95,8 @@ public abstract class ContentOpenableUIHandler<D extends OpenableDto, U extends |
| 95 | 95 |
installCreateNewAction();
|
| 96 | 96 |
installResetAction();
|
| 97 | 97 |
installSaveAction();
|
| 98 |
- installMoveAction();
|
|
| 99 | 98 |
installDeleteAction();
|
| 99 |
+ installMoveAction();
|
|
| 100 | 100 |
ShowTechnicalInformations.installAction(ui);
|
| 101 | 101 |
}
|
| 102 | 102 |
|
| ... | ... | @@ -23,6 +23,7 @@ package fr.ird.observe.client.datasource.editor.api.content.data.open.actions; |
| 23 | 23 |
*/
|
| 24 | 24 |
|
| 25 | 25 |
import com.google.common.collect.ImmutableSet;
|
| 26 |
+import fr.ird.observe.client.datasource.editor.api.ObserveKeyStrokesEditorApi;
|
|
| 26 | 27 |
import fr.ird.observe.client.datasource.editor.api.content.actions.ConfigureMenuAction;
|
| 27 | 28 |
import fr.ird.observe.client.datasource.editor.api.content.actions.move.MoveExecutor;
|
| 28 | 29 |
import fr.ird.observe.client.datasource.editor.api.content.actions.move.MoveRequest;
|
| ... | ... | @@ -63,7 +64,7 @@ public final class MoveOpenable<D extends OpenableDto, U extends ContentOpenable |
| 63 | 64 |
}
|
| 64 | 65 |
|
| 65 | 66 |
protected MoveOpenable(Class<D> dataType, MoveExecutor executor) {
|
| 66 |
- super(dataType, null, null, "move", null);
|
|
| 67 |
+ super(dataType, null, null, "move", ObserveKeyStrokesEditorApi.KEY_STROKE_MOVE);
|
|
| 67 | 68 |
this.executor = executor;
|
| 68 | 69 |
setText(ContentOpenableUII18nHelper.getActionMove(getDataType()));
|
| 69 | 70 |
setTooltipText(ContentOpenableUII18nHelper.getActionMove(getDataType()));
|
| ... | ... | @@ -135,10 +135,10 @@ public class ContentReferentialUIHandler<D extends ReferentialDto, R extends Ref |
| 135 | 135 |
BackToListReferential.installAction(ui);
|
| 136 | 136 |
DetailReferential.installAction(ui);
|
| 137 | 137 |
DeleteReferential.installAction(ui);
|
| 138 |
+ ChangeId.installAction(ui);
|
|
| 138 | 139 |
ShowTechnicalInformations.installAction(ui);
|
| 139 |
- ShowUniqueKeysReferential.installAction(ui);
|
|
| 140 | 140 |
ShowUsagesReferential.installAction(ui);
|
| 141 |
- ChangeId.installAction(ui);
|
|
| 141 |
+ ShowUniqueKeysReferential.installAction(ui);
|
|
| 142 | 142 |
installCreateAction();
|
| 143 | 143 |
installModifyAction();
|
| 144 | 144 |
installSaveAction();
|
| ... | ... | @@ -22,6 +22,7 @@ package fr.ird.observe.client.datasource.editor.api.content.referential.actions; |
| 22 | 22 |
* #L%
|
| 23 | 23 |
*/
|
| 24 | 24 |
|
| 25 |
+import fr.ird.observe.client.datasource.editor.api.ObserveKeyStrokesEditorApi;
|
|
| 25 | 26 |
import fr.ird.observe.client.datasource.editor.api.content.actions.ConfigureMenuAction;
|
| 26 | 27 |
import fr.ird.observe.client.datasource.editor.api.content.referential.ContentReferentialUI;
|
| 27 | 28 |
import fr.ird.observe.client.datasource.editor.api.content.referential.ContentReferentialUII18nHelper;
|
| ... | ... | @@ -67,7 +68,7 @@ public final class ShowUniqueKeysReferential<D extends ReferentialDto, R extends |
| 67 | 68 |
}
|
| 68 | 69 |
|
| 69 | 70 |
public ShowUniqueKeysReferential(Class<D> dataType) {
|
| 70 |
- super(dataType, t("observe.referential.Referential.action.show.unique.keys.tip"), t("observe.referential.Referential.action.show.unique.keys.tip"), "show-keys", null);
|
|
| 71 |
+ super(dataType, t("observe.referential.Referential.action.show.unique.keys.tip"), t("observe.referential.Referential.action.show.unique.keys.tip"), "show-keys", ObserveKeyStrokesEditorApi.KEY_STROKE_SHOW_UNIQUE_KEYS);
|
|
| 71 | 72 |
}
|
| 72 | 73 |
|
| 73 | 74 |
@Override
|
| ... | ... | @@ -23,6 +23,7 @@ package fr.ird.observe.client.datasource.editor.api.content.referential.actions; |
| 23 | 23 |
*/
|
| 24 | 24 |
|
| 25 | 25 |
import fr.ird.observe.client.ClientUIContext;
|
| 26 |
+import fr.ird.observe.client.datasource.editor.api.ObserveKeyStrokesEditorApi;
|
|
| 26 | 27 |
import fr.ird.observe.client.datasource.editor.api.content.actions.ConfigureMenuAction;
|
| 27 | 28 |
import fr.ird.observe.client.datasource.editor.api.content.referential.ContentReferentialUI;
|
| 28 | 29 |
import fr.ird.observe.client.datasource.editor.api.content.referential.ContentReferentialUIModel;
|
| ... | ... | @@ -53,7 +54,7 @@ public final class ShowUsagesReferential<D extends ReferentialDto, R extends Ref |
| 53 | 54 |
}
|
| 54 | 55 |
|
| 55 | 56 |
public ShowUsagesReferential(Class<D> dataType) {
|
| 56 |
- super(dataType, t("observe.referential.Referential.action.show.usages.tip"), t("observe.referential.Referential.action.show.usages.tip"), "show-usages", null);
|
|
| 57 |
+ super(dataType, t("observe.referential.Referential.action.show.usages.tip"), t("observe.referential.Referential.action.show.usages.tip"), "show-usages", ObserveKeyStrokesEditorApi.KEY_STROKE_SHOW_USAGES);
|
|
| 57 | 58 |
}
|
| 58 | 59 |
|
| 59 | 60 |
@Override
|
| ... | ... | @@ -80,7 +80,7 @@ public class ContentUIMenuAction extends AbstractAction implements MenuAction { |
| 80 | 80 |
toolTipText = ObserveKeyStrokesSupport.removeKeyStroke(toolTipText);
|
| 81 | 81 |
putValue(SHORT_DESCRIPTION, toolTipText);
|
| 82 | 82 |
String name = (String) getValue(NAME);
|
| 83 |
- if (name!=null && name.isEmpty()) {
|
|
| 83 |
+ if (name != null && name.isEmpty()) {
|
|
| 84 | 84 |
putValue(NAME, toolTipText);
|
| 85 | 85 |
}
|
| 86 | 86 |
}
|
| ... | ... | @@ -114,19 +114,11 @@ public class ContentUIMenuAction extends AbstractAction implements MenuAction { |
| 114 | 114 |
editor.setEnabled(action.isEnabled());
|
| 115 | 115 |
}
|
| 116 | 116 |
|
| 117 |
- @Override
|
|
| 118 |
- public void initUI() {
|
|
| 119 |
- if (!isWithKeyStroke()) {
|
|
| 120 |
- KeyStroke keyStroke = getMenuKeyStroke();
|
|
| 121 |
- setKeyStroke(keyStroke);
|
|
| 122 |
- }
|
|
| 123 |
- AbstractButton editor = getEditor();
|
|
| 124 |
- getPopupMenu().add(editor);
|
|
| 125 |
- initEditor();
|
|
| 126 |
- }
|
|
| 127 |
- |
|
| 128 | 117 |
@Override
|
| 129 | 118 |
public KeyStroke getMenuKeyStroke() {
|
| 119 |
+ if (isWithKeyStroke()) {
|
|
| 120 |
+ return (KeyStroke) getValue(ACCELERATOR_KEY);
|
|
| 121 |
+ }
|
|
| 130 | 122 |
int usedCount = (int) Arrays.stream(getPopupMenu().getSubElements()).filter(p -> !((ContentUIMenuAction) ((AbstractButton) p).getAction()).isWithKeyStroke()).count();
|
| 131 | 123 |
return getMenuKeyStroke(usedCount);
|
| 132 | 124 |
}
|
| ... | ... | @@ -93,12 +93,12 @@ public class NavigationTreeShowPopupHandler implements KeyListener, MouseListene |
| 93 | 93 |
popup.addSeparator();
|
| 94 | 94 |
length = popup.getSubElements().length;
|
| 95 | 95 |
}
|
| 96 |
- Arrays.stream(selectedContentUI.getInsertPopup().getSubElements()).forEach(a -> new ContentUIMenuAction(popup, (AbstractButton) a).init());
|
|
| 96 |
+ Arrays.stream(selectedContentUI.getConfigurePopup().getSubElements()).forEach(a -> ContentUIMenuAction.createWithKeyStroke(popup, (AbstractButton) a).init());
|
|
| 97 | 97 |
if (popup.getSubElements().length > length) {
|
| 98 | 98 |
popup.addSeparator();
|
| 99 | 99 |
}
|
| 100 |
- Arrays.stream(selectedContentUI.getConfigurePopup().getSubElements()).forEach(a -> new ContentUIMenuAction(popup, (AbstractButton) a).init());
|
|
| 101 | 100 |
length = popup.getSubElements().length;
|
| 101 |
+ Arrays.stream(selectedContentUI.getInsertPopup().getSubElements()).forEach(a -> new ContentUIMenuAction(popup, (AbstractButton) a).init());
|
|
| 102 | 102 |
if (length == 0) {
|
| 103 | 103 |
popup.add(noAction);
|
| 104 | 104 |
}
|
| ... | ... | @@ -24,6 +24,3 @@ |
| 24 | 24 |
enabled: true;
|
| 25 | 25 |
}
|
| 26 | 26 |
|
| 27 |
-.ifOpen {
|
|
| 28 |
- enabled:{states.isUpdatingMode()};
|
|
| 29 |
-}
|
| ... | ... | @@ -49,6 +49,3 @@ BeanCheckBox { |
| 49 | 49 |
horizontalTextPosition:{BeanCheckBox.LEFT};
|
| 50 | 50 |
}
|
| 51 | 51 |
|
| 52 |
-.ifOpen {
|
|
| 53 |
- enabled:{states.isUpdatingMode() && !states.isModified()};
|
|
| 54 |
-}
|
| ... | ... | @@ -1300,6 +1300,7 @@ observe.ui.choice.cancel=Cancel |
| 1300 | 1300 |
observe.ui.choice.cancel.tip=To cancel, press ESCAPE key.
|
| 1301 | 1301 |
observe.ui.choice.confirm.delete=Confirm delete
|
| 1302 | 1302 |
observe.ui.choice.confirm.insert=Confirm to insert
|
| 1303 |
+observe.ui.choice.confirm.move=Move
|
|
| 1303 | 1304 |
observe.ui.choice.confirm.replace=Replace
|
| 1304 | 1305 |
observe.ui.choice.continue=Continue
|
| 1305 | 1306 |
observe.ui.choice.dcp.default=Other opérations or objects (FOB)
|
| ... | ... | @@ -1300,6 +1300,7 @@ observe.ui.choice.cancel=Cancelar |
| 1300 | 1300 |
observe.ui.choice.cancel.tip=To cancel, press ESCAPE key. \#TODO
|
| 1301 | 1301 |
observe.ui.choice.confirm.delete=Eliminar
|
| 1302 | 1302 |
observe.ui.choice.confirm.insert=Confirmer l'insertion \#TODO
|
| 1303 |
+observe.ui.choice.confirm.move=Cambiar
|
|
| 1303 | 1304 |
observe.ui.choice.confirm.replace=Reemplazar
|
| 1304 | 1305 |
observe.ui.choice.continue=Continuar
|
| 1305 | 1306 |
observe.ui.choice.dcp.default=Other opérations or objects (FOB) \#TODO
|
| ... | ... | @@ -1300,6 +1300,7 @@ observe.ui.choice.cancel=Annuler |
| 1300 | 1300 |
observe.ui.choice.cancel.tip=Pour annuler, presser la touche ÉCHAP.
|
| 1301 | 1301 |
observe.ui.choice.confirm.delete=Supprimer
|
| 1302 | 1302 |
observe.ui.choice.confirm.insert=Confirmer l'insertion
|
| 1303 |
+observe.ui.choice.confirm.move=Déplacer
|
|
| 1303 | 1304 |
observe.ui.choice.confirm.replace=Remplacer
|
| 1304 | 1305 |
observe.ui.choice.continue=Continuer
|
| 1305 | 1306 |
observe.ui.choice.dcp.default=Autre opérations et types d'objets (FOB)
|