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 boolean confirmExit() { BuInformationsSoftware il = getInformationsSoftware(); BuDialogConfirmation bd = new BuDialogConfirmation(getApp(), il, _("Voulez-vous vraiment quitter ce logiciel ?")); int r = bd.activate(); return (r == JOptionPane.YES_OPTION); }
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 void preview() { JInternalFrame frame = getMainPanel().getCurrentInternalFrame(); if (frame instanceof BuPrintable) { /* * Image[] images=BuPrinter.preview (getFrame(),frame.getTitle(),(BuPrintable)frame); if(images!=null) { * BuPreviewFrame pf=new BuPreviewFrame(this,images); addInternalFrame(pf); } */ BuPrinter.preview(this, frame.getTitle(), (BuPrintable) frame); } else { BuInformationsSoftware il = getInformationsSoftware(); /* BuDialogError bd= */new BuDialogError(this, il, _("La prvisualisation n'est pas disponible pour") + "\"" + frame.getTitle() + "\".").activate(); } }