private PreviewTopComponent() { initComponents(); setName(NbBundle.getMessage(PreviewTopComponent.class, "CTL_PreviewTopComponent")); // setToolTipText(NbBundle.getMessage(PreviewTopComponent.class, // "HINT_PreviewTopComponent")); setIcon(ImageUtilities.loadImage(ICON_PATH)); if (UIUtils.isAquaLookAndFeel()) { previewPanel.setBackground(UIManager.getColor("NbExplorerView.background")); } if (UIUtils.isAquaLookAndFeel()) { southToolbar.setBackground(UIManager.getColor("NbExplorerView.background")); } bannerPanel.setVisible(false); // inits the preview applet sketchPanel.add(sketch, BorderLayout.CENTER); sketch.init(); sketch.registerPost(processingListener); sketch.registerPre(processingListener); // forces the controller instanciation PreviewUIController.findInstance(); // background color ((JColorButton) backgroundButton) .addPropertyChangeListener( JColorButton.EVENT_COLOR, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { PreviewController controller = Lookup.getDefault().lookup(PreviewController.class); controller.setBackgroundColor((Color) evt.getNewValue()); } }); southBusyLabel.setVisible(false); resetZoomButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { sketch.resetZoom(); } }); }
private void refreshButtonActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_refreshButtonActionPerformed PreviewUIController.findInstance().refreshPreview(); } // GEN-LAST:event_refreshButtonActionPerformed