public static void main(String[] _args) { new BuDialogMessage(null,null,"Hello world!").activate(); System.exit(0); } }
public void displayURL(String _url) { String url=_url; BuInformationsSoftware il=getInformationsSoftware(); if(url==null) url=il.man; BuDialogMessage bd=new BuDialogMessage(this,il,url); bd.activate(); }
public void displayURL(String _url) { BuInformationsSoftware il = getInformationsSoftware(); new BuDialogMessage(this, il, (_url == null) ? il.man : _url).activate(); }
void coType_itemStateChanged(ItemEvent e) { if (!enableEvents) return; if (e.getStateChange()==ItemEvent.DESELECTED) return; // Avertissement des modifications du modle de donnes. BuDialogMessage di=new BuDialogMessage(RefondeImplementation.application(), RefondeImplementation.informationsSoftware(), "Attention : Le projet sera dgrad pour correspondre\n"+ "au type de modle de donnes choisi."); di.activate(); } }
public void about() { BuInformationsSoftware il = getInformationsSoftware(); BuDialogMessage bd = new BuDialogMessage(getApp(), il, il.about()); bd.activate(); }
private final void step3() { BuInformationsSoftware il=DjaImplementation.informationsSoftware(); if(BuPreferences.BU.getStringProperty("locale.language").equals("")) { BuLanguagePreferencesPanel pp= new BuLanguagePreferencesPanel(il.languages); new BuDialogMessage(null,il,pp).activate(); pp.validatePreferences(); Locale.setDefault(new Locale(pp.getLocaleString(),"")); } BuPreferences.BU.applyLanguage(il.languages); }
public void setSlafTheme(String _arg) { try { int i = Integer.parseInt(_arg); BuSlafCustomTheme[] themes = BuSlafCustomTheme.getList(); // System.err.println("SLAF THEME"+i+" "+themes[i]); Class c = Class.forName("com.memoire.slaf.SlafLookAndFeel"); Method m = c.getMethod("setCurrentTheme", new Class[] { String.class }); m.invoke(null, new Object[] { themes[i].getKey() }); setLookAndFeel("com.memoire.slaf.SlafLookAndFeel"); } catch (Exception ex) { FuLog.warning("could not set the Slaf theme", ex); BuDialogMessage dm = new BuDialogMessage(app_, getInformationsSoftware(), _("Le thme pour Slaf n'a pu tre mis en place") + "."); dm.activate(); } }
public void license() { BuInformationsSoftware il = getInformationsSoftware(); BuDialogMessage bd = new BuDialogMessage(getApp(), il, il.license()); bd.activate(); }
tm = _("L'aspect n'a pu tre trouv") + ". [" + tm + "]"; BuDialogMessage dm = new BuDialogMessage(app_, getInformationsSoftware(), tm); dm.activate(); tm = _("L'aspect n'a pu mettre jour l'arbre des composants") + ". [" + tm + "]"; BuDialogMessage dm = new BuDialogMessage(app_, getInformationsSoftware(), tm); dm.activate();
public void setMetalTheme(String _arg) { try { int i = Integer.parseInt(_arg); BuMetalCustomTheme[] themes = BuMetalCustomTheme.getList(); MetalLookAndFeel.setCurrentTheme(themes[i]); setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch (Exception ex) { BuDialogMessage dm = new BuDialogMessage(app_, getInformationsSoftware(), _("Le thme pour Metal n'a pu tre mis en place") + "."); dm.activate(); } }
public static void runCommand (BuCommonInterface _app, String _cmd, boolean _confirm) { if( (!_confirm) ||(JOptionPane.YES_OPTION== (new BuDialogConfirmation (_app,null, FuLib.replace(_cmd,"; ",";\n").trim()+"\n"+ __("Voulez-vous continuer ?")) .activate()))) { String s=FuLib.runShellCommand(_cmd); if(!"".equals(s)) new BuDialogMessage(_app,null,s).activate(); } } }
public void saveFile(String _path, DjaGrid _grid) { try { DjaLoadSaveInterface ls = null; for (int i = 0; i < EXTENSIONS.length; i++) { DjaLoadSaveInterface lsi = DjaLoadSaveLib.get(EXTENSIONS[i]); if ((lsi != null) && (lsi.getFilter().accept(_path))) { ls = lsi; break; } } if (ls == null) throw new Exception("No filter found"); ls.save(new File(_path), _grid.getObjects()); getMainMenuBar().addRecentFile(_path, "graphe"); } catch (Exception ex) { new BuDialogMessage(getApp(), getInformationsSoftware(), "Can not save " + _path + "\n" + ex.getMessage()) .activate(); } }
public void run() { BuPreviewFrame pf=new BuPreviewFrame (null,images,_parent,_name,_composant); pf.setVisible(true); if(_desktop!=null) { _desktop.addInternalFrame(pf); _desktop.activateInternalFrame(pf); } else { new BuDialogMessage(null,null,pf).activate(); } } };
/** * Permet d'afficher un message d'information contenant <code>_message</code>. * * @param _message le message a afficher. Si nul, le dialogue n'est pas affiche. */ public void showBuMessage(final String _message, final boolean _modale) { if (_message == null) { return; } final BuDialogMessage message = new BuDialogMessage(appli_, getInformationsSoftware(), _message); final Point p = getLocation(); if (p != null) { message.setLocation(p); } message.setModal(_modale); message.activate(); }
public void openFile(String _path) { try { DjaLoadSaveInterface ls = null; for (int i = 0; i < EXTENSIONS.length; i++) { DjaLoadSaveInterface lsi = DjaLoadSaveLib.get(EXTENSIONS[i]); if ((lsi != null) && (lsi.getFilter().accept(_path))) { ls = lsi; break; } } if (ls == null) throw new Exception("No filter found"); DjaGridInteractive grille = new DjaGridInteractive(true, ls.load(new File(_path))); nbdoc_++; DjaFrame f = new DjaFrame(this, _path, grille, false); f.setLocation(155 + nbdoc_ * 25, -15 + nbdoc_ * 25); addInternalFrame(f); getMainMenuBar().addRecentFile(_path, "graphe"); } catch (Exception ex) { new BuDialogMessage(getApp(), getInformationsSoftware(), "Can not open " + _path + "\n" + ex.getMessage()) .activate(); } }
/** * Afficher la trace d'xcution d'un exe. */ private void cmdAfficherTraceExe(ICalcul _serveur) { String trace; if (_serveur instanceof ICalculRefonde) trace= ((ICalculRefonde)_serveur).traceExecution(); else if (_serveur instanceof ICalculOlb) trace= ((ICalculOlb)_serveur).traceExecution(); else trace= ((ICalculDunes)_serveur).traceExecution(); BuLabelMultiLine lb= new BuLabelMultiLine(trace); lb.setFont(new Font("Monospaced", Font.PLAIN, 10)); BuDialogMessage di= new BuDialogMessage(this, getInformationsSoftware(), lb); di.setTitle("Trace d'excution"); di.setResizable(true); di.activate(); } /*
String msg= "Le calcul de largeur de bande s'est termin avec des erreurs"; new BuDialogMessage(this, getInformationsSoftware(), msg).activate(); cmdAfficherTraceExe(SERVEUR_OLB); return; else msg= "Le calcul de Refonde s'est termin avec des erreurs"; new BuDialogMessage(this, getInformationsSoftware(), msg).activate(); cmdAfficherTraceExe(SERVEUR_REFONDE); clearDeskTop();
if (_doma.getMaillage() == null && !SERVEUR_DUNES.estOK()) { String msg= "Le maillage s'est termin avec des erreurs"; new BuDialogMessage(this, getInformationsSoftware(), msg).activate(); cmdAfficherTraceExe(SERVEUR_DUNES); return; String msg= "Le calcul de largeur de bande s'est termin avec des erreurs"; new BuDialogMessage(this, getInformationsSoftware(), msg).activate(); cmdAfficherTraceExe(SERVEUR_OLB); return;
String msg= "Le calcul de largeur de bande s'est termin avec des erreurs"; new BuDialogMessage(this, getInformationsSoftware(), msg).activate(); cmdAfficherTraceExe(SERVEUR_OLB); return;