From: Frederic D. <de...@us...> - 2004-03-31 08:29:38
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/commun Modified Files: FudaaLib.java FudaaCommonImplementation.java Log Message: Maj post Index: FudaaCommonImplementation.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/FudaaCommonImplementation.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** FudaaCommonImplementation.java 10 Mar 2004 09:13:30 -0000 1.16 --- FudaaCommonImplementation.java 31 Mar 2004 08:17:51 -0000 1.17 *************** *** 8,23 **** */ package org.fudaa.fudaa.commun; import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.print.PrinterJob; import java.io.File; - import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import javax.swing.JInternalFrame; import javax.swing.JMenu; ! ! import org.fudaa.ctulu.CtuluLib; import com.memoire.bu.BuBrowserPreferencesPanel; --- 8,24 ---- */ package org.fudaa.fudaa.commun; + import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.print.PrinterJob; import java.io.File; import java.net.MalformedURLException; import java.net.URL; + import java.util.Timer; + import java.util.TimerTask; import javax.swing.JInternalFrame; import javax.swing.JMenu; ! import javax.swing.event.InternalFrameEvent; import com.memoire.bu.BuBrowserPreferencesPanel; *************** *** 39,50 **** import com.memoire.bu.BuTaskOperation; import com.memoire.bu.BuUserPreferencesPanel; - import com.memoire.fu.FuLib; import org.fudaa.dodico.commun.DodicoAnalyze; - import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionBuAdapter; import org.fudaa.dodico.commun.ProgressionInterface; import org.fudaa.dodico.fichiers.FileOperationSynthese; - import org.fudaa.ebli.filechooser.EbliFileChooser; import org.fudaa.ebli.impression.EbliFillePrevisualisation; --- 40,49 ---- import com.memoire.bu.BuTaskOperation; import com.memoire.bu.BuUserPreferencesPanel; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.commun.DodicoAnalyze; import org.fudaa.dodico.commun.ProgressionBuAdapter; import org.fudaa.dodico.commun.ProgressionInterface; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.ebli.filechooser.EbliFileChooser; import org.fudaa.ebli.impression.EbliFillePrevisualisation; *************** *** 52,56 **** import org.fudaa.ebli.impression.EbliMiseEnPagePreferencesPanel; import org.fudaa.ebli.impression.EbliPageable; - import org.fudaa.fudaa.commun.aide.FudaaAidePreferencesPanel; import org.fudaa.fudaa.commun.aide.FudaaAstuces; --- 51,54 ---- *************** *** 62,205 **** */ public abstract class FudaaCommonImplementation ! extends BuCommonImplementation ! implements FudaaUI { /** * Description du champ */ ! protected BuPreferencesFrame preferences_; protected EbliFillePrevisualisation previsuFille_; ! protected FudaaUndoCmdMngListener cmdListener_; /** * Description du champ */ ! protected BuHelpFrame aide_; ! /** * URL pour l'aide locale. */ ! public final static String LOCAL_MAN=getUserDirUrl()+"/aide/"; /** * URL pour l'aide distante. */ ! public final static String REMOTE_MAN= ! "http://www.utc.fr/fudaa/aide/aide_html/"; ! ! /** ! * Return le chemin de la propriete user.dir dans le format ! * file://.... ! * @return le chemin de l'utilisateur sous forme d'url valide ! */ public static final String getUserDirUrl() { return FudaaLib.pathToUrl(System.getProperty("user.dir")); } - - public FudaaUndoCmdMngListener getUndoCmdListener() { ! if (cmdListener_ == null) ! cmdListener_= new FudaaUndoCmdMngListener(this); return cmdListener_; } public void addMenu(JMenu _m, int _idx) { ! BuMenuBar b= getMainMenuBar(); b.add(_m, _idx); b.computeMnemonics(); b.revalidate(); } public int getNbMenuInMenuBar() { return getMainMenuBar().getMenuCount(); } /** ! * Permet d'afficher une url <code>_url</code> dans un browser. Le ! * browser est choisi en fonction des preferences (<code>browser.type</code>) ! * */ public void displayURL(String _url) { ! if ((_url == null) || (_url.length() == 0)) ! _url= FudaaImplementation.LOCAL_MAN; ! if ((_url.startsWith("file")) && (_url.endsWith("/"))) ! _url= _url + "index.html"; ! if (CtuluLib.DEBUG) ! CtuluLib.debug("FudaaCommonImplementation.displayURL " + _url); if (BuPreferences.BU.getIntegerProperty("browser.type") == 1) { ! if (aide_ == null) ! aide_= new BuHelpFrame(); addInternalFrame(aide_); aide_.setDocumentUrl(_url); } else { if (_url == null) { ! BuInformationsSoftware il= getInformationsSoftware(); ! _url= il.http; } FudaaBrowserControl.displayURL(_url); } } /** ! * Permet d'afficher l'url correspondant a la chaine <code>_s</code>. ! * Si la chaine n'est pas une URL valide un panneau d'erreur est ! * renvoye. * @see #displayURL(String) */ public void displayURLFormString(String _s) { try { ! String url= new URL(_s).toString(); ! if (CtuluLib.DEBUG) ! CtuluLib.debug(getClass().getName() + CtuluLib.ESPACE + "url= " + url); ! if (url != null) ! displayURL(url); } catch (MalformedURLException e) { FudaaLib.showError( ! this, ! FudaaResource.getS("Erreur"), ! FudaaResource.getS("Le document est introuvable") ! + CtuluLib.ESPACE ! + _s); e.printStackTrace(); } } /** * Permet d'afficher le contenu du fichier f dans un browser. * @see #displayURL(String) */ public void displayURL(File _f) { try { ! String url= _f.toURL().toString(); ! if (CtuluLib.DEBUG) ! CtuluLib.debug(getClass().getName() + " " + "url= " + url); ! if (url != null) ! displayURL(url); } catch (MalformedURLException e) { FudaaLib.showError( ! this, ! FudaaResource.getS("Erreur"), ! FudaaResource.getS("Le document est introuvable") ! + _f.getAbsolutePath()); e.printStackTrace(); } } /** ! * @return valeur Astuces */ public FudaaAstuces getAstuces() { return FudaaAstuces.FUDAA; } /** * Renvoie les preferences de l'application */ public abstract BuPreferences getApplicationPreferences(); /** * Description de la methode ! * * @param _evt */ public void actionPerformed(ActionEvent _evt) { ! String action= _evt.getActionCommand(); ! int i= action.indexOf('('); if (i >= 0) { ! action= action.substring(i + 1, action.length() - 1); } if (("PREVISUALISER".equals(action)) ! || ("MISEENPAGE".equals(action)) ! || ("IMPRIMER".equals(action))) { gestionnaireImpression(action); } else if (action.equals("PREFERENCE")) { --- 60,210 ---- */ public abstract class FudaaCommonImplementation ! extends BuCommonImplementation ! implements FudaaUI { ! /** * Description du champ */ ! protected BuPreferencesFrame preferences_; protected EbliFillePrevisualisation previsuFille_; ! protected FudaaUndoCmdMngListener cmdListener_; /** * Description du champ */ ! protected BuHelpFrame aide_; ! /** * URL pour l'aide locale. */ ! public final static String LOCAL_MAN = getUserDirUrl() + "/aide/"; /** * URL pour l'aide distante. */ ! public final static String REMOTE_MAN = ! "http://www.utc.fr/fudaa/aide/aide_html/"; ! ! /** ! * Return le chemin de la propriete user.dir dans le format file://.... ! * ! * @return le chemin de l'utilisateur sous forme d'url valide ! */ public static final String getUserDirUrl() { return FudaaLib.pathToUrl(System.getProperty("user.dir")); } public FudaaUndoCmdMngListener getUndoCmdListener() { ! if (cmdListener_ == null) ! cmdListener_ = new FudaaUndoCmdMngListener(this); return cmdListener_; } + public void addMenu(JMenu _m, int _idx) { ! BuMenuBar b = getMainMenuBar(); b.add(_m, _idx); b.computeMnemonics(); b.revalidate(); } + public int getNbMenuInMenuBar() { return getMainMenuBar().getMenuCount(); } + /** ! * Permet d'afficher une url <code>_url</code> dans un browser. Le browser est choisi en ! * fonction des preferences (<code>browser.type</code>) */ public void displayURL(String _url) { ! if ((_url == null) || (_url.length() == 0)) ! _url = FudaaImplementation.LOCAL_MAN; ! if ((_url.startsWith("file")) && (_url.endsWith("/"))) ! _url = _url + "index.html"; ! if (CtuluLib.DEBUG) ! CtuluLib.debug("FudaaCommonImplementation.displayURL " + _url); if (BuPreferences.BU.getIntegerProperty("browser.type") == 1) { ! if (aide_ == null) ! aide_ = new BuHelpFrame(); addInternalFrame(aide_); aide_.setDocumentUrl(_url); } else { if (_url == null) { ! BuInformationsSoftware il = getInformationsSoftware(); ! _url = il.http; } FudaaBrowserControl.displayURL(_url); } } + /** ! * Permet d'afficher l'url correspondant a la chaine <code>_s</code>. Si la chaine n'est pas ! * une URL valide un panneau d'erreur est renvoye. ! * * @see #displayURL(String) */ public void displayURLFormString(String _s) { try { ! String url = new URL(_s).toString(); ! if (CtuluLib.DEBUG) ! CtuluLib.debug(getClass().getName() + CtuluLib.ESPACE + "url= " + url); ! if (url != null) ! displayURL(url); } catch (MalformedURLException e) { FudaaLib.showError( ! this, ! FudaaResource.getS("Erreur"), ! FudaaResource.getS("Le document est introuvable") ! + CtuluLib.ESPACE ! + _s); e.printStackTrace(); } } + /** * Permet d'afficher le contenu du fichier f dans un browser. + * * @see #displayURL(String) */ public void displayURL(File _f) { try { ! String url = _f.toURL().toString(); ! if (CtuluLib.DEBUG) ! CtuluLib.debug(getClass().getName() + " " + "url= " + url); ! if (url != null) ! displayURL(url); } catch (MalformedURLException e) { FudaaLib.showError( ! this, ! FudaaResource.getS("Erreur"), ! FudaaResource.getS("Le document est introuvable") ! + _f.getAbsolutePath()); e.printStackTrace(); } } + /** ! * @return valeur Astuces */ public FudaaAstuces getAstuces() { return FudaaAstuces.FUDAA; } + /** * Renvoie les preferences de l'application */ public abstract BuPreferences getApplicationPreferences(); + /** * Description de la methode ! * * @param _evt */ public void actionPerformed(ActionEvent _evt) { ! String action = _evt.getActionCommand(); ! int i = action.indexOf('('); if (i >= 0) { ! action = action.substring(i + 1, action.length() - 1); } if (("PREVISUALISER".equals(action)) ! || ("MISEENPAGE".equals(action)) ! || ("IMPRIMER".equals(action))) { gestionnaireImpression(action); } else if (action.equals("PREFERENCE")) { *************** *** 209,212 **** --- 214,218 ---- } } + /** * Description de la methode *************** *** 222,238 **** super.print(); } private void gestionnaireImpression(String _commande) { ! JInternalFrame frame= getCurrentInternalFrame(); final EbliPageable target; if (frame instanceof EbliPageable) ! target= (EbliPageable)frame; else if (frame instanceof EbliFillePrevisualisation) ! target= ((EbliFillePrevisualisation)frame).getEbliPageable(); else { new BuDialogWarning( ! this, ! getInformationsSoftware(), ! FudaaResource.getS("Cette fenêtre n'est pas imprimable")) ! .activate(); return; } --- 228,245 ---- super.print(); } + private void gestionnaireImpression(String _commande) { ! JInternalFrame frame = getCurrentInternalFrame(); final EbliPageable target; if (frame instanceof EbliPageable) ! target = (EbliPageable) frame; else if (frame instanceof EbliFillePrevisualisation) ! target = ((EbliFillePrevisualisation) frame).getEbliPageable(); else { new BuDialogWarning( ! this, ! getInformationsSoftware(), ! FudaaResource.getS("Cette fenêtre n'est pas imprimable")) ! .activate(); return; } *************** *** 241,257 **** } else if ("MISEENPAGE".equals(_commande)) cmdMiseEnPage(target); ! else if ("PREVISUALISER".equals(_commande)) ! cmdPrevisualisation(target); } /** * Impression de la page <code>_target</code> dans un nouveau thread. */ public void cmdImprimer(EbliPageable _target) { ! final PrinterJob printJob= PrinterJob.getPrinterJob(); ! final BuMainPanel mp= getMainPanel(); printJob.setPageable(_target); if (printJob.printDialog()) { mp.setProgression(5); new BuTaskOperation(this, FudaaResource.FUDAA.getString("Impression")) { public void act() { try { --- 248,266 ---- } else if ("MISEENPAGE".equals(_commande)) cmdMiseEnPage(target); ! else if ("PREVISUALISER".equals(_commande)) ! cmdPrevisualisation(target); } + /** * Impression de la page <code>_target</code> dans un nouveau thread. */ public void cmdImprimer(EbliPageable _target) { ! final PrinterJob printJob = PrinterJob.getPrinterJob(); ! final BuMainPanel mp = getMainPanel(); printJob.setPageable(_target); if (printJob.printDialog()) { mp.setProgression(5); new BuTaskOperation(this, FudaaResource.FUDAA.getString("Impression")) { + public void act() { try { *************** *** 268,278 **** } } public void cmdMiseEnPage(EbliPageable _target) { new EbliMiseEnPageDialog(_target, getApp(), getInformationsSoftware()) ! .activate(); } public void cmdPrevisualisation(EbliPageable _target) { if (previsuFille_ == null) { ! previsuFille_= new EbliFillePrevisualisation(getApp(), _target); } else { previsuFille_.setEbliPageable(_target); --- 277,289 ---- } } + public void cmdMiseEnPage(EbliPageable _target) { new EbliMiseEnPageDialog(_target, getApp(), getInformationsSoftware()) ! .activate(); } + public void cmdPrevisualisation(EbliPageable _target) { if (previsuFille_ == null) { ! previsuFille_ = new EbliFillePrevisualisation(getApp(), _target); } else { previsuFille_.setEbliPageable(_target); *************** *** 280,292 **** addInternalFrame(previsuFille_); } public void contextHelp(String _url) { ! String url= new String(_url.trim()); if ((url == null) || (url.length() == 0) || (url.startsWith("#"))) { ! url= "index.html"; } super.contextHelp(url); } protected void buildPreferences() { ! preferences_= new BuPreferencesFrame(); preferences_.addTab(new BuUserPreferencesPanel(this)); preferences_.addTab(new BuLanguagePreferencesPanel(this)); --- 291,305 ---- addInternalFrame(previsuFille_); } + public void contextHelp(String _url) { ! String url = new String(_url.trim()); if ((url == null) || (url.length() == 0) || (url.startsWith("#"))) { ! url = "index.html"; } super.contextHelp(url); } + protected void buildPreferences() { ! preferences_ = new BuPreferencesFrame(); preferences_.addTab(new BuUserPreferencesPanel(this)); preferences_.addTab(new BuLanguagePreferencesPanel(this)); *************** *** 296,326 **** preferences_.addTab(new EbliMiseEnPagePreferencesPanel()); preferences_.addTab( ! new FudaaAidePreferencesPanel(this, getApplicationPreferences())); } /** * Description de la methode */ protected final void preferences() { ! if (preferences_ == null) ! buildPreferences(); addInternalFrame(preferences_); } public void error(String _titre, String _text) { error(_titre, _text, true); } /** ! * */ public void error(String _titre, String _text, boolean printErr) { FudaaLib.showError(this, _titre, _text); ! if (printErr) ! CtuluLib.error(_titre + CtuluLib.ESPACE + _text); } /** ! * */ public void message(String _titre, String _text) { FudaaLib.showMessage(this, _titre, _text); } /** * @see org.fudaa.fudaa.commun.FudaaUI#confirmation(java.lang.String, java.lang.String) --- 309,344 ---- preferences_.addTab(new EbliMiseEnPagePreferencesPanel()); preferences_.addTab( ! new FudaaAidePreferencesPanel(this, getApplicationPreferences())); } + /** * Description de la methode */ protected final void preferences() { ! if (preferences_ == null) ! buildPreferences(); addInternalFrame(preferences_); } + public void error(String _titre, String _text) { error(_titre, _text, true); } + /** ! * * */ public void error(String _titre, String _text, boolean printErr) { FudaaLib.showError(this, _titre, _text); ! if (printErr) ! CtuluLib.error(_titre + CtuluLib.ESPACE + _text); } + /** ! * * */ public void message(String _titre, String _text) { FudaaLib.showMessage(this, _titre, _text); } + /** * @see org.fudaa.fudaa.commun.FudaaUI#confirmation(java.lang.String, java.lang.String) *************** *** 329,332 **** --- 347,351 ---- return FudaaLib.showConfirmation(this, _titre, _text); } + /** * @see org.fudaa.fudaa.commun.FudaaUI#manageErrorOperationAndIsFatal(org.fudaa.dodico.fichiers.FileOperationSynthese) *************** *** 335,345 **** if (_opResult.getClosingException() != null) { CtuluLib.error( ! "FATAL :can't close " + _opResult.getAnalyze().getResource()); } ! if (_opResult.getAnalyze() != null) { ! return manageAnalyzeAndIsFatal(_opResult.getAnalyze()); } return false; } /** * @param _msg --- 354,365 ---- if (_opResult.getClosingException() != null) { CtuluLib.error( ! "FATAL :can't close " + _opResult.getAnalyze().getResource()); } ! if (_opResult.getAnalyze() != null) { ! return manageAnalyzeAndIsFatal(_opResult.getAnalyze()); } return false; } + /** * @param _msg *************** *** 348,351 **** --- 368,372 ---- error(BuResource.BU.getString("Erreur"), _msg); } + /** * @param _msg *************** *** 354,427 **** message(BuResource.BU.getString("Message"), _msg); } public File ouvrirFileChooser(String[] _extension, String _desc) { return ouvrirFileChooser(_extension, _desc, getFrame(), false); } public File ouvrirFileChooser( ! String[] _extension, ! String _desc, ! boolean _newFile) { return ouvrirFileChooser(_extension, _desc, getFrame(), _newFile); } public static File ouvrirFileChooser( ! String[] _extension, ! String _desc, ! Component _parent) { return ouvrirFileChooser(_extension, _desc, _parent, false); } public static File ouvrirFileChooser( ! String[] _extension, ! String _desc, ! Component _parent, ! boolean _saveDialog) { ! BuFileFilter flt= null; ! String titre= _desc; if (_extension != null) { ! flt= new BuFileFilter(_extension, _desc); } return ouvrirFileChooser(titre, flt, _parent, _saveDialog); } public static File ouvrirFileChooser( ! String _titre, ! BuFileFilter _filtre, ! Component _parent, ! boolean _saveDialog) { ! BuFileChooser fileChooser= new EbliFileChooser(true); fileChooser.setFileHidingEnabled(true); fileChooser.setMultiSelectionEnabled(false); fileChooser.setDialogTitle(_titre); ! if (_filtre != null) ! fileChooser.setFileFilter(_filtre); ! int returnVal= ! _saveDialog ! ? fileChooser.showSaveDialog(_parent) ! : fileChooser.showOpenDialog(_parent); if (returnVal == BuFileChooser.APPROVE_OPTION) { ! File f= fileChooser.getSelectedFile(); return f; ! } else ! return null; } ! /** * Renvoie true si fatal error. */ public boolean manageAnalyzeAndIsFatal(DodicoAnalyze _analyze) { ! if (_analyze == null) ! return false; if (!_analyze.isEmpty()) { _analyze.printResume(); } if (_analyze.getFatalError() != null) { ! DodicoAnalyze.Field f= _analyze.getFatalError(); error( ! _analyze.getDesc(), ! f.getOffset() < 0 ? f.getMessage() : f.toString(), ! false); return true; } return false; } /** ! * */ public ProgressionInterface createProgressionInterface(BuTask _bu) { --- 375,454 ---- message(BuResource.BU.getString("Message"), _msg); } + public File ouvrirFileChooser(String[] _extension, String _desc) { return ouvrirFileChooser(_extension, _desc, getFrame(), false); } + public File ouvrirFileChooser( ! String[] _extension, ! String _desc, ! boolean _newFile) { return ouvrirFileChooser(_extension, _desc, getFrame(), _newFile); } + public static File ouvrirFileChooser( ! String[] _extension, ! String _desc, ! Component _parent) { return ouvrirFileChooser(_extension, _desc, _parent, false); } + public static File ouvrirFileChooser( ! String[] _extension, ! String _desc, ! Component _parent, ! boolean _saveDialog) { ! BuFileFilter flt = null; ! String titre = _desc; if (_extension != null) { ! flt = new BuFileFilter(_extension, _desc); } return ouvrirFileChooser(titre, flt, _parent, _saveDialog); } + public static File ouvrirFileChooser( ! String _titre, ! BuFileFilter _filtre, ! Component _parent, ! boolean _saveDialog) { ! BuFileChooser fileChooser = new EbliFileChooser(true); fileChooser.setFileHidingEnabled(true); fileChooser.setMultiSelectionEnabled(false); fileChooser.setDialogTitle(_titre); ! if (_filtre != null) ! fileChooser.setFileFilter(_filtre); ! int returnVal = ! _saveDialog ! ? fileChooser.showSaveDialog(_parent) ! : fileChooser.showOpenDialog(_parent); if (returnVal == BuFileChooser.APPROVE_OPTION) { ! File f = fileChooser.getSelectedFile(); return f; ! } else ! return null; } ! /** * Renvoie true si fatal error. */ public boolean manageAnalyzeAndIsFatal(DodicoAnalyze _analyze) { ! if (_analyze == null) ! return false; if (!_analyze.isEmpty()) { _analyze.printResume(); } if (_analyze.getFatalError() != null) { ! DodicoAnalyze.Field f = _analyze.getFatalError(); error( ! _analyze.getDesc(), ! f.getOffset() < 0 ? f.getMessage() : f.toString(), ! false); return true; } return false; } + /** ! * * */ public ProgressionInterface createProgressionInterface(BuTask _bu) { *************** *** 439,456 **** /** ! * */ public void setMainMessage(String _s) { getMainPanel().setMessage(_s); } public void unsetMainMessage() { getMainPanel().setMessage(CtuluLib.EMPTY_STRING); getMainPanel().setProgression(0); } public void setMainProgression(int _i) { getMainPanel().setProgression(_i); } public void unsetMainProgression() { getMainPanel().setProgression(0); } } --- 466,588 ---- /** ! * * */ public void setMainMessage(String _s) { getMainPanel().setMessage(_s); } + + + /** + * @param _sec le nombre de secondes a attendre avant d'effacer le message principal + */ + public void clearMainMessage(int _sec) { + new Timer().schedule(new TimerTask() { + + public void run() { + unsetMainMessage(); + } + }, _sec * 1000); + } + + /** + * Efface le message principal apres 2 sec. + */ + public void clearMainMessageInTwoSec() { + clearMainMessage(2); + } + + /** + * Ecrit temporairement un message + * @param _msg le message a ecrire + * @param _nbSec le nombre de seconde avant de l'effacer + */ + public void setMainMessageAndClear(String _msg, int _nbSec) { + setMainMessage(_msg); + clearMainMessage(_nbSec); + } + + /** + * @param _msg le message a afficher pendant 2 secondes + */ + public void setMainMessageAndClear(String _msg) { + setMainMessageAndClear(_msg, 2); + } + + /** + * @see org.fudaa.fudaa.commun.FudaaUI#unsetMainMessage() + */ public void unsetMainMessage() { getMainPanel().setMessage(CtuluLib.EMPTY_STRING); getMainPanel().setProgression(0); } + + /** + * @see org.fudaa.fudaa.commun.FudaaUI#setMainProgression(int) + */ public void setMainProgression(int _i) { getMainPanel().setProgression(_i); } + + /** + * @see org.fudaa.fudaa.commun.FudaaUI#unsetMainProgression() + */ public void unsetMainProgression() { getMainPanel().setProgression(0); } + /** + * @see javax.swing.event.InternalFrameListener#internalFrameActivated(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameActivated(InternalFrameEvent _evt) { + super.internalFrameActivated(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameActivated(_evt); + } + + /** + * @see javax.swing.event.InternalFrameListener#internalFrameClosed(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameClosed(InternalFrameEvent _evt) { + super.internalFrameClosed(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameClosed(_evt); + } + + /** + * @see javax.swing.event.InternalFrameListener#internalFrameClosing(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameClosing(InternalFrameEvent _evt) { + super.internalFrameClosing(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameClosing(_evt); + } + + /** + * @see javax.swing.event.InternalFrameListener#internalFrameDeactivated(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameDeactivated(InternalFrameEvent _evt) { + super.internalFrameDeactivated(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameDeactivated(_evt); + } + + /** + * @see javax.swing.event.InternalFrameListener#internalFrameDeiconified(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameDeiconified(InternalFrameEvent _evt) { + super.internalFrameDeiconified(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameDeiconified(_evt); + } + + /** + * @see javax.swing.event.InternalFrameListener#internalFrameIconified(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameIconified(InternalFrameEvent _evt) { + super.internalFrameIconified(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameIconified(_evt); + } + + /** + * @see javax.swing.event.InternalFrameListener#internalFrameOpened(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameOpened(InternalFrameEvent _evt) { + super.internalFrameOpened(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameOpened(_evt); + } + } Index: FudaaLib.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/FudaaLib.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** FudaaLib.java 10 Mar 2004 09:13:30 -0000 1.16 --- FudaaLib.java 31 Mar 2004 08:17:51 -0000 1.17 *************** *** 289,319 **** } ! /** ! * ! * @param _fileName le nom de fichier ! * @param _fileFormatList la liste des formats ! * @return le format correspondant au nom de fichier ! */ ! public static FileFormat guessFormat( ! String _fileName, ! List _fileFormatList) { ! if ((_fileName == null) || (_fileFormatList == null)) ! return null; ! int idx= _fileName.indexOf('.'); ! if ((idx > 0) && (idx < _fileName.length())) { ! String ext= _fileName.substring(idx + 1); ! FileFormat temp= null; ! for (int i= _fileFormatList.size() - 1; i >= 0; i--) { ! temp= (FileFormat)_fileFormatList.get(i); ! if (temp.isExtension(ext)) ! return temp; ! } ! } else if ( ! _fileFormatList.contains(SerafinFileFormat.getInstance()) ! && (_fileName.startsWith("geo"))) { ! return SerafinFileFormat.getInstance(); ! } ! return null; ! } } --- 289,293 ---- } ! } |