|
From: <bma...@us...> - 2011-09-14 12:26:06
|
Revision: 6431
http://fudaa.svn.sourceforge.net/fudaa/?rev=6431&view=rev
Author: bmarchan
Date: 2011-09-14 12:26:00 +0000 (Wed, 14 Sep 2011)
Log Message:
-----------
Mod : Possibilit?\195?\169 d'exporter la vue sous forme d'image
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivFille2d.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivFille2d.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivFille2d.java 2011-09-14 12:20:39 UTC (rev 6430)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivFille2d.java 2011-09-14 12:26:00 UTC (rev 6431)
@@ -9,6 +9,7 @@
import java.awt.Dimension;
+import org.fudaa.ctulu.CtuluLibImage;
import org.fudaa.ebli.calque.ZEbliFilleCalques;
/**
@@ -53,17 +54,22 @@
* @param _view Le nom de la vue courante.
*/
protected void changeTitle(String _view) {
- String title=PivResource.getS("Vue 2D");
+ String titre=PivResource.getS("Vue 2D");
if (_view!=null) {
- title+=" - "+_view;
+ titre+=" - "+_view;
}
- setTitle(title);
+ setTitle(titre);
}
-// public final String[] getEnabledActions() {
-// return new String[] { "RECHERCHER", "IMPRIMER", "MISEENPAGE", "PREVISUALISER", CtuluExportDataInterface.EXPORT_CMD,
-// /*CtuluImageProducer.SNAPSHOT_COMMAND, */"TOUTSELECTIONNER", "INVERSESELECTION", "CLEARSELECTION", "IMPORT_IMAGE" };
-// }
+ @Override
+ public final String[] getEnabledActions() {
+ String[] acts=super.getEnabledActions();
+ String[] rets=new String[acts.length+2];
+ System.arraycopy(acts, 0, rets, 0, acts.length);
+ rets[rets.length-2]=CtuluLibImage.SNAPSHOT_COMMAND;
+ rets[rets.length-1]=CtuluLibImage.SNAPSHOT_CLIPBOARD_COMMAND;
+ return rets;
+ }
// public void importImage() {
// getMdlVisuPanel().importImage();
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2011-09-14 12:20:39 UTC (rev 6430)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2011-09-14 12:26:00 UTC (rev 6431)
@@ -604,6 +604,7 @@
setEnabledForAction("CREER", true);
setEnabledForAction("OUVRIR", true);
setEnabledForAction("IMPORTER", true);
+ setEnabledForAction("EXPORTER", true);
BuMenuRecentFiles mr= (BuMenuRecentFiles)mb.getMenu("REOUVRIR");
if (mr != null) {
@@ -614,6 +615,7 @@
// les menus exporter et importer sont construit dynamiquement
buildImportMenu();
+ buildExportMenu();
// BuMenu mnExport = (BuMenu) mb.getMenu("EXPORTER");
// menu.addMenuItem(FSigImageImportAction.getCommonTitle(), "IMPORT_IMAGE", FSigImageImportAction.getCommonImage(),
@@ -677,8 +679,30 @@
mnImport.add(new PivImportGridAction((this)));
}
+ /**
+ * Constriut le menu export
+ */
+ protected void buildExportMenu() {
+ BuMenu mnExport = (BuMenu)getMainMenuBar().getMenu("EXPORTER");
+ BuMenuItem itExportImage = new BuMenuItem();
+ super.initExportImageButton(itExportImage);
+ mnExport.add(itExportImage);
+
+ BuMenuItem itExportImageToClip = new BuMenuItem();
+ super.initExportImageToClipborad(itExportImageToClip);
+ mnExport.add(itExportImageToClip);
+ }
+
/**
+ * @return True pour export de la fenetre active sous forme d'image.
+ */
+ @Override
+ protected boolean buildImageToolIcon() {
+ return true;
+ }
+
+ /**
* Suppression des commandes par d\xE9faut dans Fudaa.
*/
protected void removeUnusedActions() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|