try { SharedContext sharedContext = root.panel.view.getSharedContext(); if (sharedContext.isPrint()) { sharedContext.setPrint(false); sharedContext.setInteractive(true); } else { sharedContext.setPrint(true); sharedContext.setInteractive(false); } print_preview.putValue(Action.NAME, ! sharedContext.isPrint() ? "Print Preview" : "Normal View"); root.panel.reloadPage(); root.panel.view.repaint(); } catch (Exception ex) { Uu.p(ex); }
togglePrintPreview();
            public void actionPerformed(ActionEvent evt) {                try {                    SharedContext sharedContext = root.panel.view.getSharedContext();                    if (sharedContext.isPrint()) {                        sharedContext.setPrint(false);                        sharedContext.setInteractive(true);                    } else {                        sharedContext.setPrint(true);                        sharedContext.setInteractive(false);                    }                    print_preview.putValue(Action.NAME,                            ! sharedContext.isPrint() ? "Print Preview" : "Normal View");                    root.panel.reloadPage();                    root.panel.view.repaint();                } catch (Exception ex) {                    Uu.p(ex);                }            }