|
From: <de...@us...> - 2012-10-16 14:01:11
|
Revision: 7748
http://fudaa.svn.sourceforge.net/fudaa/?rev=7748&view=rev
Author: deniger
Date: 2012-10-16 14:01:00 +0000 (Tue, 16 Oct 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/animation/EbliAnimationOutputAbstract.java
trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/animation/EbliAnimationOutputImage.java
trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/animation/EbliAnimationOutputInterface.java
Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/animation/EbliAnimationOutputAbstract.java
===================================================================
--- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/animation/EbliAnimationOutputAbstract.java 2012-10-16 07:23:24 UTC (rev 7747)
+++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/animation/EbliAnimationOutputAbstract.java 2012-10-16 14:01:00 UTC (rev 7748)
@@ -23,19 +23,18 @@
* @version $Id: EbliAnimationOutputAbstract.java,v 1.3 2007-06-28 09:26:48 deniger Exp $
*/
public abstract class EbliAnimationOutputAbstract implements EbliAnimationOutputInterface {
+
public static String getHtmlDes(final EbliAnimationOutputInterface _out) {
final CtuluHtmlWriter res = new CtuluHtmlWriter(true);
if (_out.getDestFile() != null) {
res.addTagAndText("b", CtuluLib.getS("Fichier:")).append(CtuluLibString.ESPACE).append(
- _out.getDestFile().getAbsolutePath()).append("<br>");
+ _out.getDestFile().getAbsolutePath()).append("<br>");
}
res.addTagAndText("b", EbliLib.getS("Dur\xE9e d'affichage d'une image:")).append(CtuluLibString.ESPACE).append(
- Float.toString(_out.getDelay()));
+ Float.toString(_out.getDelay()));
return res.getHtml();
}
-
private boolean isActived_;
-
final String ext_;
boolean warnIfFileExists_ = true;
protected float delay_ = 0.5F;
@@ -48,14 +47,18 @@
ext_ = _ext;
}
+ public void setWarnIfFileExists(boolean warnIfFileExists) {
+ this.warnIfFileExists_ = warnIfFileExists;
+ }
+
protected boolean canOverwrittenFile(final Component _parent) {
if (warnIfFileExists_) {
if (destFile_.exists()) {
String yesText = EbliLib.getS("Enregistrer et ecraser");
String noText = EbliLib.getS("Ne pas Enregistrer");
if (!CtuluLibDialog.showConfirmation(_parent, EbliLib.getS("Enregistrement animation"), EbliLib.getS(
- "Le fichier de sortie {0} existe. Il sera ecras\xE9 \xE0 la fin de l'animation.", destFile_.getName())
- + "\n" + EbliLib.getS("Voulez-vous sauvegarder l'animation ?"), yesText, noText)) {
+ "Le fichier de sortie {0} existe. Il sera ecras\xE9 \xE0 la fin de l'animation.", destFile_.getName())
+ + "\n" + EbliLib.getS("Voulez-vous sauvegarder l'animation ?"), yesText, noText)) {
return false;
}
}
@@ -110,9 +113,8 @@
}
/**
- * Si l'utilisateur veut qu'une image soit affich\xE9e plus longtemps, elle doit \xEAtre ajout\xE9e plusieurs fois au flux
- * (sauf pour la sortie gif).
- *
+ * Si l'utilisateur veut qu'une image soit affich\xE9e plus longtemps, elle doit \xEAtre ajout\xE9e plusieurs fois au flux (sauf pour la sortie gif).
+ *
* @return le nombre de fois que l'on doit reajouter une image pour avoir le bon delai.
*/
public int getNbRepeat() {
@@ -124,8 +126,7 @@
}
/**
- * @return le nombre de fois que l'on doit ajouter une frame au flux de sortie afin d'avoir un bon fps pour une sortie
- * avi.
+ * @return le nombre de fois que l'on doit ajouter une frame au flux de sortie afin d'avoir un bon fps pour une sortie avi.
*/
public int getNbRepeatForAvi() {
final int fps = getAskedFps();
@@ -200,5 +201,4 @@
}
}
-
}
Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/animation/EbliAnimationOutputImage.java
===================================================================
--- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/animation/EbliAnimationOutputImage.java 2012-10-16 07:23:24 UTC (rev 7747)
+++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/animation/EbliAnimationOutputImage.java 2012-10-16 14:01:00 UTC (rev 7748)
@@ -38,6 +38,7 @@
* @version $Id: EbliAnimationOutputImage.java,v 1.17 2007-06-28 09:26:48 deniger Exp $
*/
public class EbliAnimationOutputImage implements EbliAnimationOutputInterface {
+
private boolean isActivated_;
File dir_;
String pref_ = "image-";
@@ -59,10 +60,10 @@
return null;
}
- public void setDelay(final float _secPerImage) {}
+ public void setDelay(final float _secPerImage) {
+ }
public void setFile(final File _dest) {
-
}
public void setHeight(final int _h) {
@@ -82,6 +83,10 @@
}
}
+ public void setWarnIfFileExists(boolean warnIfFileExists) {
+ ask_ = warnIfFileExists;
+ }
+
public void appendFrame(final BufferedImage _im, final boolean _last) {
if (isActivated()) {
idx_++;
@@ -145,7 +150,7 @@
final File[] fileToDelete = getFileWith(dir, txtPrefix_.getText(), (String) cbFmt_.getSelectedItem());
if (fileToDelete != null && (fileToDelete.length > 0)) {
final String mes = EbliLib.getS("Le r\xE9pertoire de sortie contient d\xE9j\xE0 des fichiers images de type {0}."
- + " Ils seront tous effac\xE9s lors de l'animation.", pref_ + "*." + fmt_);
+ + " Ils seront tous effac\xE9s lors de l'animation.", pref_ + "*." + fmt_);
CtuluLibDialog.showWarn(this, EbliLib.getS("sortie images"), mes);
ask_ = false;
}
@@ -164,7 +169,6 @@
public String getShortName() {
return fmt_;
}
-
boolean ask_;
public static File[] getFileWith(final File _dir, final String _pref, final String _fmt) {
@@ -172,7 +176,6 @@
return null;
}
final FileFilter ft = new FileFilter() {
-
String end_ = CtuluLibString.DOT + _fmt;
public boolean accept(File _pathname) {
@@ -203,7 +206,7 @@
String yesText = EbliLib.getS("Enregistrer et ecraser");
String noText = EbliLib.getS("Ne pas Enregistrer");
String mes = EbliLib.getS("Le r\xE9pertoire de sortie contient d\xE9j\xE0 des fichiers images de type {0}."
- + " Ils seront tous effac\xE9s lors de l'animation.", pref_ + "*." + fmt_);
+ + " Ils seront tous effac\xE9s lors de l'animation.", pref_ + "*." + fmt_);
mes += CtuluLibString.LINE_SEP;
mes += EbliLib.getS("Voulez-vous continuer l'enregistrement des images ?");
final boolean b = CtuluLibDialog.showConfirmation(_parent, EbliLib.getS("sortie images"), mes, yesText, noText);
Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/animation/EbliAnimationOutputInterface.java
===================================================================
--- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/animation/EbliAnimationOutputInterface.java 2012-10-16 07:23:24 UTC (rev 7747)
+++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/animation/EbliAnimationOutputInterface.java 2012-10-16 14:01:00 UTC (rev 7748)
@@ -28,6 +28,8 @@
*/
boolean init(CtuluImageProducer _p, Component _parent, int _nbImg);
+ void setWarnIfFileExists(boolean warnIfFileExists);
+
/**
* @return le nom de la sortie
*/
@@ -85,5 +87,4 @@
void setWidth(int _w);
void setHeight(int _h);
-
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|