public void run() { BuPreviewFrame pf=new BuPreviewFrame (_app,images,frame,_name,_composant); _app.addInternalFrame(pf); _app.activateInternalFrame(pf); } };
public BuInformationsSoftware getInformationsSoftware() { return implementation_.getInformationsSoftware(); }
public void actionPerformed(ActionEvent _evt) { implementation_.actionPerformed(_evt); }
public void start() { // next lines soon removed getMainPanel().updateSplits(); menusOrganisationFenetres(); }
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 actionPerformed(ActionEvent _evt) { String action = _evt.getActionCommand(); String arg = ""; BuMainPanel mp = getMainPanel(); BuInformationsSoftware il = getInformationsSoftware(); if (action.equals("FERMER")) close(); else if (action.equals("IMPRIMER")) print(); else if (action.equals("PREVISUALISER")) preview(); else if (action.equals("QUITTER")) exit(); else if (action.equals("DEFAIRE")) undo(); else if (action.equals("REFAIRE")) redo(); else if (action.equals("COUPER")) cut(); else if (action.equals("COPIER")) copy(); else if (action.equals("COLLER")) paste(); else if (action.equals("DUPLIQUER")) duplicate(); else if (action.equals("TOUTSELECTIONNER")) select(); else if (action.equals("RECHERCHER")) find(); else if (action.equals("REMPLACER")) replace(); else if (action.equals("PLEINECRAN")) fullscreen(); else if (action.equals("CASCADE")) mp.waterfall(); else if (action.equals("MOSAIQUE")) mp.tile(); else if (action.equals("ASPECT_AMIGA")) setLookAndFeel("swing.addon.plaf.threeD.ThreeDLookAndFeel"); else if (action.equals("ASPECT_FHLAF")) setLookAndFeel("com.shfarr.ui.plaf.fh.FhLookAndFeel");
protected void menusOrganisationFenetres() { if (!hasDesktop()) return; BuDesktop desktop = getMainPanel().getDesktop(); boolean appli = (getApp() instanceof JFrame); JInternalFrame frame = desktop.getCurrentInternalFrame(); boolean b; b = (desktop.getNormalFramesCount() > 0); setEnabledForAction("CASCADE", b); setEnabledForAction("MOSAIQUE", b); b = (desktop.getIconifiedFramesCount() > 0); setEnabledForAction("RANGERICONES", b); b = (desktop.getPalettesCount() > 0); setEnabledForAction("RANGERPALETTES", b); b = (frame != null); setEnabledForAction("PLEINECRAN", b && appli); if (isCloseFrameMode()) { b = (frame != null) && frame.isClosable(); setEnabledForAction("FERMER", b); } // TMP // desktop.adjustSize(); } }
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(); } }
public FudaaReportFrameController(BuCommonImplementation _impl) { super(); JInternalFrame[] frs = _impl.getAllInternalFrames(); JInternalFrame activated = _impl.getCurrentInternalFrame(); final List availableFrame = new ArrayList(frs.length); for (int i = 0; i < frs.length; i++) { _impl.addIfListener(ifListener_); _impl.addInternalFrame(owner_);
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(); } }
protected void ajouterActionsOutils(InternalFrameEvent _evt) { Object source = _evt.getSource(); if (source instanceof BuInternalFrame) { BuInternalFrame f = (BuInternalFrame) source; BuMenuBar mb = getMainMenuBar(); BuSpecificBar sb = getSpecificBar(); // System.err.println(""+f+" activated!"); int i; String[] ea = f.getEnabledActions(); for (i = 0; i < ea.length; i++) setEnabledForAction(ea[i], true); String[] da = f.getDisabledActions(); for (i = 0; i < da.length; i++) setEnabledForAction(da[i], false); mb.addMenus(f.getSpecificMenus()); sb.addTools(f.getSpecificTools()); BuMainPanel mp = getMainPanel(); if (mp.getAssistant() != null) mp.getAssistant().addEmitters(sb); f.adjustActions(); } }
public void start() { BuInformationsSoftware il = getInformationsSoftware(); if (getName() == null) setName("fr" + il.name.toUpperCase()); if (getRootPane().getName() == null) getRootPane().setName("rp" + il.name.toUpperCase()); implementation_.installContextHelp(getRootPane(), ""); // il.man); addNotify(); /* * pack(); getRootPane().invalidate(); getRootPane().revalidate(); getRootPane().repaint(0); */ // getRootPane().revalidate(); // getRootPane().repaint(0); BuIcon logo = getInformationsSoftware().logo; setIconImage(logo != null ? logo.getImage() : BuResource.BU.getImage("buapplication")); setTitle(il.name + " " + il.version); BuSplashScreen ss = implementation_.getSplashScreen(); if (ss != null) { ss.setVisible(false); ss = null; implementation_.setSplashScreen(null); } BuPreferences.BU.applyOn(getApp()); implementation_.prestart(); setVisible(true); implementation_.start(); }
public BuMainPanel getMainPanel() { return implementation_.getMainPanel(); }
public void internalFrameActivated(InternalFrameEvent _evt) { ajouterActionsOutils(_evt); menusOrganisationFenetres(); if (hasDesktop()) { BuDesktop desktop = getMainPanel().getDesktop(); JInternalFrame frame = desktop.getCurrentInternalFrame(); desktop.showFrame(frame); } if (ifListener_ != null) { for (Iterator it = ifListener_.iterator(); it.hasNext();) { ((InternalFrameListener) it.next()).internalFrameActivated(_evt); } } }
public void cut() { JInternalFrame frame = getCurrentInternalFrame(); if (frame instanceof BuCutCopyPasteInterface) ((BuCutCopyPasteInterface) frame).cut(); else System.err.println(frame + " doesn't implement BuCutCopyPasteInterface"); }
public void about() { BuInformationsSoftware il = getInformationsSoftware(); BuDialogMessage bd = new BuDialogMessage(getApp(), il, il.about()); bd.activate(); }
if(app_!=null) app_.installContextHelp(getRootPane(),"bu/p-aide.html"); base_=new URL(app_.getInformationsSoftware().man);
public void installContextHelp(JComponent _cp) { installContextHelp(_cp, null); }
public void contextHelp(String _url) { /* * if(_url.startsWith("AIDE_CONTEXTUELLE")) _url=_url.substring(_url.indexOf('(')+1, _url.indexOf(')')); */ try { URL url = new URL(new URL(getInformationsSoftware().man), _url); String ll = Locale.getDefault().getLanguage(); String newUrl = url.toString(); if (!ll.equals("fr")) { ll = "en"; int i = newUrl.lastIndexOf(".html"); if (i >= 0) newUrl = newUrl.substring(0, i) + "-" + ll + newUrl.substring(i); } // System.err.println("URL = "+_url); displayURL(newUrl); } catch (Exception ex) {} }
public void init() { implementation_.init(); }