|
From: <de...@us...> - 2014-02-03 22:09:39
|
Revision: 8600
http://sourceforge.net/p/fudaa/svn/8600
Author: deniger
Date: 2014-02-03 22:09:30 +0000 (Mon, 03 Feb 2014)
Log Message:
-----------
CRUE-610
Modified Paths:
--------------
trunk/soft/fudaa-crue/ui-common/src/main/java/org/fudaa/fudaa/crue/common/UserPreferencesSaver.java
trunk/soft/fudaa-crue/ui-modelling/src/main/resources/org/fudaa/fudaa/crue/modelling/action/Bundle.properties
trunk/soft/fudaa-crue/ui-planimetry/src/main/java/org/fudaa/fudaa/crue/planimetry/PlanimetryVisuPanel.java
trunk/soft/fudaa-crue/ui-planimetry/src/main/java/org/fudaa/fudaa/crue/planimetry/layer/PlanimetryLigneBriseeLayer.java
trunk/soft/fudaa-crue/ui-report/src/main/resources/org/fudaa/fudaa/crue/report/actions/Bundle.properties
Added Paths:
-----------
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingShowViewListAction.java
trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/actions/ReportShowViewListAction.java
Modified: trunk/soft/fudaa-crue/ui-common/src/main/java/org/fudaa/fudaa/crue/common/UserPreferencesSaver.java
===================================================================
--- trunk/soft/fudaa-crue/ui-common/src/main/java/org/fudaa/fudaa/crue/common/UserPreferencesSaver.java 2014-02-03 22:07:59 UTC (rev 8599)
+++ trunk/soft/fudaa-crue/ui-common/src/main/java/org/fudaa/fudaa/crue/common/UserPreferencesSaver.java 2014-02-03 22:09:30 UTC (rev 8600)
@@ -179,7 +179,7 @@
return GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
}
- private static void ensureComponentWillBeVisible(final Component window, final Point initLocation) {
+ public static void ensureComponentWillBeVisible(final Component window, final Point initLocation) {
final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
ensureComponentWillBeVisible(window, initLocation, screenSize);
Copied: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingShowViewListAction.java (from rev 8404, trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingHelpAction.java)
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingShowViewListAction.java (rev 0)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingShowViewListAction.java 2014-02-03 22:09:30 UTC (rev 8600)
@@ -0,0 +1,56 @@
+package org.fudaa.fudaa.crue.modelling.action;
+
+import java.awt.MouseInfo;
+import java.awt.Point;
+import java.awt.event.ActionEvent;
+import java.util.Collection;
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.JPopupMenu;
+import javax.swing.JSeparator;
+import javax.swing.SwingUtilities;
+import org.fudaa.fudaa.crue.common.PerspectiveEnum;
+import org.fudaa.fudaa.crue.common.UserPreferencesSaver;
+import org.fudaa.fudaa.crue.common.action.AbstractPerspectiveAwareAction;
+import static org.fudaa.fudaa.crue.modelling.perspective.ActiveModelisation.ACTIONS_MODELLING_VIEWS;
+import org.openide.awt.*;
+import org.openide.util.Lookup;
+import org.openide.util.NbBundle;
+import org.openide.util.lookup.Lookups;
+import org.openide.windows.WindowManager;
+
+@ActionID(category = "View",
+ id = "org.fudaa.fudaa.crue.modelling.ModellingShowViewListAction")
+//iconBase ne semble pas fonctionner !
+@ActionRegistration(displayName = "#CTL_ModellingShowViewListAction")
+@ActionReference(path = "Shortcuts", name = "A-V")
+public final class ModellingShowViewListAction extends AbstractPerspectiveAwareAction {
+
+ public ModellingShowViewListAction() {
+ super(PerspectiveEnum.MODELLING, false);
+ putValue(Action.NAME, NbBundle.getMessage(ModellingShowViewListAction.class, "CTL_ModellingShowViewListAction"));
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ JPopupMenu menu = new JPopupMenu();
+ Collection all = Lookups.forPath(ACTIONS_MODELLING_VIEWS).lookupAll(Object.class);
+ for (Object object : all) {
+ if (object instanceof AbstractAction) {
+ menu.add((AbstractAction) object);
+ } else if (object instanceof JSeparator) {
+ menu.addSeparator();
+ }
+ }
+ final Point location = MouseInfo.getPointerInfo().getLocation();
+ UserPreferencesSaver.ensureComponentWillBeVisible(menu, location);
+ SwingUtilities.convertPointFromScreen(location, WindowManager.getDefault().getMainWindow());
+ menu.show(WindowManager.getDefault().getMainWindow(), location.x, location.y);
+ }
+
+ @Override
+ public Action createContextAwareInstance(Lookup lkp) {
+ return new ModellingShowViewListAction();
+ }
+
+}
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/resources/org/fudaa/fudaa/crue/modelling/action/Bundle.properties
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/resources/org/fudaa/fudaa/crue/modelling/action/Bundle.properties 2014-02-03 22:07:59 UTC (rev 8599)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/resources/org/fudaa/fudaa/crue/modelling/action/Bundle.properties 2014-02-03 22:09:30 UTC (rev 8600)
@@ -10,6 +10,7 @@
CTL_ModellingLaunchRunQuickAction=Lancer un run rapide
CTL_ModellingLaunchRunOptionsAction=Lancer un run avec options...
CTL_ModellingHelpAction=Aide sur la perspective Mod\u00e9lisation
+CTL_ModellingShowViewListAction=Liste des vues perspective Mod\u00e9lisation
ModellingConvertCrue10.Action=Convertir en sc\u00e9nario Crue10
ModellingConvertCrue9.Action=Convertir en sc\u00e9nario Crue9
ExportFileChooser.ApproveText=Exporter
Modified: trunk/soft/fudaa-crue/ui-planimetry/src/main/java/org/fudaa/fudaa/crue/planimetry/PlanimetryVisuPanel.java
===================================================================
--- trunk/soft/fudaa-crue/ui-planimetry/src/main/java/org/fudaa/fudaa/crue/planimetry/PlanimetryVisuPanel.java 2014-02-03 22:07:59 UTC (rev 8599)
+++ trunk/soft/fudaa-crue/ui-planimetry/src/main/java/org/fudaa/fudaa/crue/planimetry/PlanimetryVisuPanel.java 2014-02-03 22:09:30 UTC (rev 8600)
@@ -92,7 +92,7 @@
return action;
}
- public void installSelectionShortcuts() {
+ public final void installSelectionShortcuts() {
Action selectAll = createAction("TOUTSELECTIONNER", KeyStroke.getKeyStroke(KeyEvent.VK_A, InputEvent.CTRL_MASK));
Action invAction = createAction("INVERSESELECTION", KeyStroke.getKeyStroke(KeyEvent.VK_I, InputEvent.CTRL_MASK));
Action clearAction = createAction("CLEARSELECTION", KeyStroke.getKeyStroke(KeyEvent.VK_A, InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK));
@@ -140,11 +140,15 @@
SceneSelectPreviousAction sceneSelectPreviousAction = new SceneSelectPreviousAction(gisEditor_.getSceneEditor());
SceneSelectNextAction sceneSelectNextAction = new SceneSelectNextAction(gisEditor_.getSceneEditor());
CalqueSelectNormalSelectionAction normalSelection = new CalqueSelectNormalSelectionAction(gisEditor_.getSupport());
- EbliLib.updateMapKeyStroke(this, new Action[]{sceneSelectPreviousAction, sceneSelectNextAction, normalSelection});
+ final KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S, InputEvent.ALT_MASK);
+ getScene().getAtomicSelectionAction().setKey(keyStroke);
+ EbliLib.updateMapKeyStroke(this, new Action[]{sceneSelectPreviousAction, sceneSelectNextAction, normalSelection, getScene().
+ getAtomicSelectionAction()});
installSelectionShortcuts();
selectNext = (JMenuItem) sceneSelectNextAction.buildMenuItem(EbliComponentFactory.INSTANCE);
selectPrevious = (JMenuItem) sceneSelectPreviousAction.buildMenuItem(EbliComponentFactory.INSTANCE);
FSigEditor.activeDeferredModificationAsDefault();
+ getScene().setUseSelectedLayerFirstForSelection(false);
}
public PlanimetryVisuPanelConfigurer getConfigurer() {
@@ -172,10 +176,10 @@
findSelectedLayer();
}
- @Override
- public void setEnabled(boolean _newValue) {
- }
- };
+ @Override
+ public void setEnabled(boolean _newValue) {
+ }
+ };
return res;
}
@@ -214,6 +218,7 @@
}
action.updateStateBeforeShow();
if (itemAtomicActivation == null) {
+ getScene().getAtomicSelectionAction().setKey(KeyStroke.getKeyStroke("Alt s"));
getScene().getAtomicSelectionAction().updateStateBeforeShow();
itemAtomicActivation = (JMenuItem) getScene().getAtomicSelectionAction().buildMenuItem(EbliComponentFactory.INSTANCE);
}
@@ -263,8 +268,6 @@
selection.add(selectPrevious);
selection.add(selectNext);
-
-
selection.addSeparator();
if (!EbliActionMap.getInstance().isEmpty()) {
addSelectionAction(selection, true);
Modified: trunk/soft/fudaa-crue/ui-planimetry/src/main/java/org/fudaa/fudaa/crue/planimetry/layer/PlanimetryLigneBriseeLayer.java
===================================================================
--- trunk/soft/fudaa-crue/ui-planimetry/src/main/java/org/fudaa/fudaa/crue/planimetry/layer/PlanimetryLigneBriseeLayer.java 2014-02-03 22:07:59 UTC (rev 8599)
+++ trunk/soft/fudaa-crue/ui-planimetry/src/main/java/org/fudaa/fudaa/crue/planimetry/layer/PlanimetryLigneBriseeLayer.java 2014-02-03 22:09:30 UTC (rev 8600)
@@ -26,6 +26,7 @@
public PlanimetryLigneBriseeLayer(PlanimetryLigneBriseeLayerModel _modele, FSigEditor _editor) {
super(_modele, _editor);
+ setSelectClosedLineInterior(true);
}
@Override
Copied: trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/actions/ReportShowViewListAction.java (from rev 8404, trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/actions/ReportCloseAction.java)
===================================================================
--- trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/actions/ReportShowViewListAction.java (rev 0)
+++ trunk/soft/fudaa-crue/ui-report/src/main/java/org/fudaa/fudaa/crue/report/actions/ReportShowViewListAction.java 2014-02-03 22:09:30 UTC (rev 8600)
@@ -0,0 +1,54 @@
+package org.fudaa.fudaa.crue.report.actions;
+
+import java.awt.MouseInfo;
+import java.awt.Point;
+import java.awt.event.ActionEvent;
+import java.util.Collection;
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.JPopupMenu;
+import javax.swing.JSeparator;
+import javax.swing.SwingUtilities;
+import org.fudaa.fudaa.crue.common.PerspectiveEnum;
+import org.fudaa.fudaa.crue.common.UserPreferencesSaver;
+import org.fudaa.fudaa.crue.common.action.AbstractPerspectiveAwareAction;
+import static org.fudaa.fudaa.crue.report.perspective.ActiveReport.ACTIONS_REPORT_VIEWS;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionRegistration;
+import org.openide.util.Lookup;
+import org.openide.util.NbBundle;
+import org.openide.util.lookup.Lookups;
+import org.openide.windows.WindowManager;
+
+@ActionID(category = "View",
+ id = "org.fudaa.fudaa.crue.report.actions.ReportShowViewListAction")
+@ActionRegistration(displayName = "#CTL_ReportShowViewListAction")
+public final class ReportShowViewListAction extends AbstractPerspectiveAwareAction {
+
+ public ReportShowViewListAction() {
+ super(PerspectiveEnum.POST, false);
+ putValue(Action.NAME, NbBundle.getMessage(ReportShowViewListAction.class, "CTL_ReportShowViewListAction"));
+ }
+
+ @Override
+ public Action createContextAwareInstance(Lookup actionContext) {
+ return new ReportShowViewListAction();
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ JPopupMenu menu = new JPopupMenu();
+ Collection all = Lookups.forPath(ACTIONS_REPORT_VIEWS).lookupAll(Object.class);
+ for (Object object : all) {
+ if (object instanceof AbstractAction) {
+ menu.add((AbstractAction) object);
+ } else if (object instanceof JSeparator) {
+ menu.addSeparator();
+ }
+ }
+ final Point location = MouseInfo.getPointerInfo().getLocation();
+ UserPreferencesSaver.ensureComponentWillBeVisible(menu, location);
+ SwingUtilities.convertPointFromScreen(location, WindowManager.getDefault().getMainWindow());
+ menu.show(WindowManager.getDefault().getMainWindow(), location.x, location.y);
+ }
+}
Modified: trunk/soft/fudaa-crue/ui-report/src/main/resources/org/fudaa/fudaa/crue/report/actions/Bundle.properties
===================================================================
--- trunk/soft/fudaa-crue/ui-report/src/main/resources/org/fudaa/fudaa/crue/report/actions/Bundle.properties 2014-02-03 22:07:59 UTC (rev 8599)
+++ trunk/soft/fudaa-crue/ui-report/src/main/resources/org/fudaa/fudaa/crue/report/actions/Bundle.properties 2014-02-03 22:09:30 UTC (rev 8600)
@@ -1,4 +1,5 @@
CTL_ReportCloseAction=Fermer
+CTL_ReportShowViewListAction=Liste des vues perspective Rapports
CTL_ReportSaveAction=Sauvegarder
CTL_ReportReloadAction=Recharger
ReportSetAsAlternatifNodeAction.DisplayName=Utiliser comme run alternatif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|