19 package org.sleuthkit.autopsy.corecomponents;
 
   21 import java.awt.Color;
 
   22 import java.awt.Cursor;
 
   23 import java.awt.Dialog;
 
   24 import java.awt.EventQueue;
 
   25 import java.beans.PropertyChangeEvent;
 
   26 import java.beans.PropertyChangeListener;
 
   27 import java.util.List;
 
   29 import java.util.concurrent.ExecutionException;
 
   30 import java.util.function.Function;
 
   31 import java.util.logging.Level;
 
   32 import java.util.prefs.Preferences;
 
   33 import java.util.stream.Collectors;
 
   34 import javax.swing.JOptionPane;
 
   35 import javax.swing.ListSelectionModel;
 
   36 import javax.swing.SortOrder;
 
   37 import javax.swing.SwingWorker;
 
   38 import org.apache.commons.lang3.StringUtils;
 
   39 import org.netbeans.api.progress.ProgressHandle;
 
   40 import org.openide.DialogDescriptor;
 
   41 import org.openide.DialogDisplayer;
 
   42 import org.openide.NotifyDescriptor;
 
   43 import org.openide.explorer.ExplorerManager;
 
   44 import org.openide.nodes.AbstractNode;
 
   45 import org.openide.nodes.Children;
 
   46 import org.openide.nodes.Node;
 
   47 import org.openide.nodes.NodeEvent;
 
   48 import org.openide.nodes.NodeListener;
 
   49 import org.openide.nodes.NodeMemberEvent;
 
   50 import org.openide.nodes.NodeReorderEvent;
 
   51 import org.openide.util.NbBundle;
 
   52 import org.openide.util.NbPreferences;
 
   53 import org.openide.util.lookup.ServiceProvider;
 
   74 @ServiceProvider(service = DataResultViewer.class)
 
   75 @SuppressWarnings(
"PMD.SingularField") 
 
   78     private static final long serialVersionUID = 1L;
 
  110         "DataResultViewerThumbnail.thumbnailSizeComboBox.small=Small Thumbnails",
 
  111         "DataResultViewerThumbnail.thumbnailSizeComboBox.medium=Medium Thumbnails",
 
  112         "DataResultViewerThumbnail.thumbnailSizeComboBox.large=Large Thumbnails" 
  115         super(explorerManager);
 
  117         iconView.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
 
  118         thumbnailSizeComboBox.setModel(
new javax.swing.DefaultComboBoxModel<>(
new String[]{
 
  119             Bundle.DataResultViewerThumbnail_thumbnailSizeComboBox_small(),
 
  120             Bundle.DataResultViewerThumbnail_thumbnailSizeComboBox_medium(),
 
  121             Bundle.DataResultViewerThumbnail_thumbnailSizeComboBox_large()}));
 
  122         thumbnailSizeComboBox.setSelectedIndex(1);
 
  125         currentPageImages = 0;
 
  138     @SuppressWarnings(
"unchecked")
 
  140     private 
void initComponents() {
 
  141         java.awt.GridBagConstraints gridBagConstraints;
 
  143         buttonBarPanel = 
new javax.swing.JPanel();
 
  144         pagesPanel = 
new javax.swing.JPanel();
 
  145         pageNumberPane = 
new javax.swing.JPanel();
 
  146         pageLabel = 
new javax.swing.JLabel();
 
  147         pageNumLabel = 
new javax.swing.JLabel();
 
  148         pageButtonPanel = 
new javax.swing.JPanel();
 
  149         pagesLabel = 
new javax.swing.JLabel();
 
  150         pagePrevButton = 
new javax.swing.JButton();
 
  151         pageNextButton = 
new javax.swing.JButton();
 
  152         pageGotoPane = 
new javax.swing.JPanel();
 
  153         goToPageLabel = 
new javax.swing.JLabel();
 
  154         goToPageField = 
new javax.swing.JTextField();
 
  155         imagePane = 
new javax.swing.JPanel();
 
  156         imagesLabel = 
new javax.swing.JLabel();
 
  157         imagesRangeLabel = 
new javax.swing.JLabel();
 
  158         thumbnailSizeComboBox = 
new javax.swing.JComboBox<>();
 
  159         sortPane = 
new javax.swing.JPanel();
 
  160         sortLabel = 
new javax.swing.JLabel();
 
  161         sortButton = 
new javax.swing.JButton();
 
  162         filePathLabel = 
new javax.swing.JLabel();
 
  163         iconView = 
new org.openide.explorer.view.IconView();
 
  165         setLayout(
new java.awt.BorderLayout());
 
  167         buttonBarPanel.setLayout(
new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
 
  169         pagesPanel.setLayout(
new java.awt.GridBagLayout());
 
  171         pageNumberPane.setLayout(
new java.awt.GridBagLayout());
 
  174         gridBagConstraints = 
new java.awt.GridBagConstraints();
 
  175         gridBagConstraints.gridx = 0;
 
  176         gridBagConstraints.gridy = 0;
 
  177         gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
 
  178         gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
 
  179         gridBagConstraints.weighty = 1.0;
 
  180         gridBagConstraints.insets = 
new java.awt.Insets(0, 0, 0, 9);
 
  181         pageNumberPane.add(pageLabel, gridBagConstraints);
 
  183         pageNumLabel.setText(
org.openide.util.NbBundle.getMessage(
DataResultViewerThumbnail.class, 
"DataResultViewerThumbnail.pageNumLabel.text")); 
 
  184         gridBagConstraints = 
new java.awt.GridBagConstraints();
 
  185         gridBagConstraints.gridx = 1;
 
  186         gridBagConstraints.gridy = 0;
 
  187         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
 
  188         gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
 
  189         gridBagConstraints.weightx = 1.0;
 
  190         gridBagConstraints.insets = 
new java.awt.Insets(0, 0, 0, 15);
 
  191         pageNumberPane.add(pageNumLabel, gridBagConstraints);
 
  193         gridBagConstraints = 
new java.awt.GridBagConstraints();
 
  194         gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
 
  195         gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
 
  196         pagesPanel.add(pageNumberPane, gridBagConstraints);
 
  198         buttonBarPanel.add(pagesPanel);
 
  200         pageButtonPanel.setLayout(
new java.awt.GridBagLayout());
 
  203         gridBagConstraints = 
new java.awt.GridBagConstraints();
 
  204         gridBagConstraints.gridx = 0;
 
  205         gridBagConstraints.gridy = 0;
 
  206         gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
 
  207         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
 
  208         gridBagConstraints.weighty = 1.0;
 
  209         gridBagConstraints.insets = 
new java.awt.Insets(0, 0, 0, 9);
 
  210         pageButtonPanel.add(pagesLabel, gridBagConstraints);
 
  212         pagePrevButton.setIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); 
 
  213         pagePrevButton.setText(
org.openide.util.NbBundle.getMessage(
DataResultViewerThumbnail.class, 
"DataResultViewerThumbnail.pagePrevButton.text")); 
 
  214         pagePrevButton.setBorder(null);
 
  215         pagePrevButton.setDisabledIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); 
 
  216         pagePrevButton.setFocusable(
false);
 
  217         pagePrevButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
 
  218         pagePrevButton.setMargin(
new java.awt.Insets(0, 0, 0, 0));
 
  219         pagePrevButton.setRolloverIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); 
 
  220         pagePrevButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 
  221         pagePrevButton.addActionListener(
new java.awt.event.ActionListener() {
 
  222             public void actionPerformed(java.awt.event.ActionEvent evt) {
 
  223                 pagePrevButtonActionPerformed(evt);
 
  226         gridBagConstraints = 
new java.awt.GridBagConstraints();
 
  227         gridBagConstraints.gridx = 1;
 
  228         gridBagConstraints.gridy = 0;
 
  229         gridBagConstraints.gridheight = 2;
 
  230         gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
 
  231         pageButtonPanel.add(pagePrevButton, gridBagConstraints);
 
  233         pageNextButton.setIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); 
 
  234         pageNextButton.setText(
org.openide.util.NbBundle.getMessage(
DataResultViewerThumbnail.class, 
"DataResultViewerThumbnail.pageNextButton.text")); 
 
  235         pageNextButton.setBorder(null);
 
  236         pageNextButton.setDisabledIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); 
 
  237         pageNextButton.setFocusable(
false);
 
  238         pageNextButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
 
  239         pageNextButton.setMargin(
new java.awt.Insets(0, 0, 0, 0));
 
  240         pageNextButton.setMaximumSize(
new java.awt.Dimension(27, 23));
 
  241         pageNextButton.setMinimumSize(
new java.awt.Dimension(27, 23));
 
  242         pageNextButton.setRolloverIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); 
 
  243         pageNextButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 
  244         pageNextButton.addActionListener(
new java.awt.event.ActionListener() {
 
  245             public void actionPerformed(java.awt.event.ActionEvent evt) {
 
  246                 pageNextButtonActionPerformed(evt);
 
  249         gridBagConstraints = 
new java.awt.GridBagConstraints();
 
  250         gridBagConstraints.gridx = 2;
 
  251         gridBagConstraints.gridy = 0;
 
  252         gridBagConstraints.gridheight = 2;
 
  253         gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
 
  254         gridBagConstraints.insets = 
new java.awt.Insets(0, 0, 0, 15);
 
  255         pageButtonPanel.add(pageNextButton, gridBagConstraints);
 
  257         buttonBarPanel.add(pageButtonPanel);
 
  259         pageGotoPane.setLayout(
new java.awt.GridBagLayout());
 
  261         goToPageLabel.setText(
org.openide.util.NbBundle.getMessage(
DataResultViewerThumbnail.class, 
"DataResultViewerThumbnail.goToPageLabel.text")); 
 
  262         gridBagConstraints = 
new java.awt.GridBagConstraints();
 
  263         gridBagConstraints.gridx = 0;
 
  264         gridBagConstraints.gridy = 0;
 
  265         gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
 
  266         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
 
  267         gridBagConstraints.weighty = 1.0;
 
  268         gridBagConstraints.insets = 
new java.awt.Insets(0, 0, 0, 9);
 
  269         pageGotoPane.add(goToPageLabel, gridBagConstraints);
 
  271         goToPageField.setText(
org.openide.util.NbBundle.getMessage(
DataResultViewerThumbnail.class, 
"DataResultViewerThumbnail.goToPageField.text")); 
 
  272         goToPageField.addActionListener(
new java.awt.event.ActionListener() {
 
  273             public void actionPerformed(java.awt.event.ActionEvent evt) {
 
  274                 goToPageFieldActionPerformed(evt);
 
  277         gridBagConstraints = 
new java.awt.GridBagConstraints();
 
  278         gridBagConstraints.gridx = 1;
 
  279         gridBagConstraints.gridy = 0;
 
  280         gridBagConstraints.gridheight = 2;
 
  281         gridBagConstraints.ipadx = 75;
 
  282         gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
 
  283         gridBagConstraints.weightx = 1.0;
 
  284         gridBagConstraints.insets = 
new java.awt.Insets(0, 0, 0, 15);
 
  285         pageGotoPane.add(goToPageField, gridBagConstraints);
 
  287         buttonBarPanel.add(pageGotoPane);
 
  289         imagePane.setLayout(
new java.awt.GridBagLayout());
 
  291         imagesLabel.setText(
org.openide.util.NbBundle.getMessage(
DataResultViewerThumbnail.class, 
"DataResultViewerThumbnail.imagesLabel.text")); 
 
  292         gridBagConstraints = 
new java.awt.GridBagConstraints();
 
  293         gridBagConstraints.insets = 
new java.awt.Insets(0, 0, 0, 9);
 
  294         imagePane.add(imagesLabel, gridBagConstraints);
 
  296         imagesRangeLabel.setText(
org.openide.util.NbBundle.getMessage(
DataResultViewerThumbnail.class, 
"DataResultViewerThumbnail.imagesRangeLabel.text")); 
 
  297         gridBagConstraints = 
new java.awt.GridBagConstraints();
 
  298         gridBagConstraints.insets = 
new java.awt.Insets(0, 0, 0, 15);
 
  299         imagePane.add(imagesRangeLabel, gridBagConstraints);
 
  301         buttonBarPanel.add(imagePane);
 
  303         thumbnailSizeComboBox.addActionListener(
new java.awt.event.ActionListener() {
 
  304             public void actionPerformed(java.awt.event.ActionEvent evt) {
 
  305                 thumbnailSizeComboBoxActionPerformed(evt);
 
  308         buttonBarPanel.add(thumbnailSizeComboBox);
 
  310         sortPane.setLayout(
new java.awt.GridBagLayout());
 
  313         gridBagConstraints = 
new java.awt.GridBagConstraints();
 
  314         gridBagConstraints.gridx = 1;
 
  315         gridBagConstraints.gridy = 0;
 
  316         gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
 
  317         gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
 
  318         gridBagConstraints.weighty = 1.0;
 
  319         sortPane.add(sortLabel, gridBagConstraints);
 
  322         sortButton.addActionListener(
new java.awt.event.ActionListener() {
 
  323             public void actionPerformed(java.awt.event.ActionEvent evt) {
 
  324                 sortButtonActionPerformed(evt);
 
  327         gridBagConstraints = 
new java.awt.GridBagConstraints();
 
  328         gridBagConstraints.gridx = 0;
 
  329         gridBagConstraints.gridy = 0;
 
  330         gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
 
  331         gridBagConstraints.insets = 
new java.awt.Insets(0, 15, 0, 9);
 
  332         sortPane.add(sortButton, gridBagConstraints);
 
  334         buttonBarPanel.add(sortPane);
 
  336         add(buttonBarPanel, java.awt.BorderLayout.NORTH);
 
  338         filePathLabel.setText(
org.openide.util.NbBundle.getMessage(
DataResultViewerThumbnail.class, 
"DataResultViewerThumbnail.filePathLabel.text")); 
 
  339         add(filePathLabel, java.awt.BorderLayout.SOUTH);
 
  340         add(iconView, java.awt.BorderLayout.CENTER);
 
  352         goToPage(goToPageField.getText());
 
  357         switch (thumbnailSizeComboBox.getSelectedIndex()) {
 
  370         if (thumbSize != newIconSize) {
 
  371             thumbSize = newIconSize;
 
  372             Node root = this.getExplorerManager().getRootContext();
 
  373             ((ThumbnailViewChildren) root.getChildren()).setThumbsSize(thumbSize);
 
  380             this.getExplorerManager().setExploredContext(root);
 
  386         List<Node.Property<?>> childProperties = ResultViewerPersistence.getAllChildProperties(this.getExplorerManager().getRootContext(), 100);
 
  387         SortChooser sortChooser = 
new SortChooser(childProperties, ResultViewerPersistence.loadSortCriteria(rootNode));
 
  388         DialogDescriptor dialogDescriptor = 
new DialogDescriptor(sortChooser, sortChooser.getDialogTitle());
 
  389         Dialog createDialog = DialogDisplayer.getDefault().createDialog(dialogDescriptor);
 
  390         createDialog.setVisible(
true);
 
  391         final Object dialogReturnValue = dialogDescriptor.getValue();
 
  392         if (DialogDescriptor.OK_OPTION == dialogReturnValue) {
 
  394             List<SortCriterion> criteria = sortChooser.getCriteria();
 
  397             Map<Node.Property<?>, SortCriterion> criteriaMap = criteria.stream()
 
  398                     .collect(Collectors.toMap(SortCriterion::getProperty,
 
  403             int numProperties = childProperties.size();
 
  404             for (
int i = 0; i < numProperties; i++) {
 
  405                 Node.Property<?> prop = childProperties.get(i);
 
  406                 String propName = prop.getName();
 
  407                 SortCriterion criterion = criteriaMap.get(prop);
 
  408                 final String columnSortOrderKey = ResultViewerPersistence.getColumnSortOrderKey(rootNode, propName);
 
  409                 final String columnSortRankKey = ResultViewerPersistence.getColumnSortRankKey(rootNode, propName);
 
  411                 if (criterion != null) {
 
  412                     preferences.putBoolean(columnSortOrderKey, criterion.getSortOrder() == SortOrder.ASCENDING);
 
  413                     preferences.putInt(columnSortRankKey, criterion.getSortRank() + 1);
 
  415                     preferences.remove(columnSortOrderKey);
 
  416                     preferences.remove(columnSortRankKey);
 
  450         return (selectedNode != null);
 
  455         setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
 
  456         if (selectionListener == null) {
 
  459         if (rootNodeChildren != null) {
 
  460             rootNodeChildren.cancelLoadingThumbnails();
 
  469             if (givenNode != null && givenNode.getChildren().getNodesCount() > 0) {
 
  476                 rootNodeChildren = 
new ThumbnailViewChildren(givenNode, thumbSize);
 
  477                 final Node root = 
new AbstractNode(rootNodeChildren);
 
  479                 pageUpdater.setRoot(root);
 
  480                 root.addNodeListener(pageUpdater);
 
  481                 this.getExplorerManager().setRootContext(root);
 
  484                 rootNodeChildren = null;
 
  485                 Node emptyNode = 
new AbstractNode(Children.LEAF);
 
  486                 this.getExplorerManager().setRootContext(emptyNode);
 
  487                 iconView.setBackground(Color.BLACK);
 
  490             this.setCursor(null);
 
  496         return NbBundle.getMessage(this.getClass(), 
"DataResultViewerThumbnail.title");
 
  506         super.resetComponent();
 
  508         this.currentPage = -1;
 
  509         currentPageImages = 0;
 
  515         this.iconView.removeAll();
 
  516         this.iconView = null;
 
  517         super.clearComponent();
 
  521         if (currentPage < totalPages) {
 
  528         if (currentPage > 1) {
 
  537             newPage = Integer.parseInt(pageNumText);
 
  538         } 
catch (NumberFormatException e) {
 
  543         if (newPage > totalPages || newPage < 1) {
 
  544             JOptionPane.showMessageDialog(
this,
 
  545                     NbBundle.getMessage(
this.getClass(), 
"DataResultViewerThumbnail.goToPageTextField.msgDlg", totalPages),
 
  546                     NbBundle.getMessage(
this.getClass(), 
"DataResultViewerThumbnail.goToPageTextField.err"),
 
  547                     JOptionPane.WARNING_MESSAGE);
 
  551         currentPage = newPage;
 
  557         EventQueue.invokeLater(() -> {
 
  558             setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
 
  562         new SwingWorker<Object, Void>() {
 
  563             private ProgressHandle progress;
 
  566             protected Object doInBackground() 
throws Exception {
 
  567                 pagePrevButton.setEnabled(
false);
 
  568                 pageNextButton.setEnabled(
false);
 
  569                 goToPageField.setEnabled(
false);
 
  570                 progress = ProgressHandle.createHandle(
 
  571                         NbBundle.getMessage(
this.getClass(), 
"DataResultViewerThumbnail.genThumbs"));
 
  573                 progress.switchToIndeterminate();
 
  575                 Node root = explorerManager.getRootContext();
 
  576                 Node pageNode = root.getChildren().getNodeAt(currentPage - 1);
 
  577                 explorerManager.setExploredContext(pageNode);
 
  578                 currentPageImages = pageNode.getChildren().getNodesCount();
 
  583             protected void done() {
 
  590                 } 
catch (InterruptedException | ExecutionException ex) {
 
  592                             = 
new NotifyDescriptor.Message(
 
  593                                     NbBundle.getMessage(
this.getClass(), 
"DataResultViewerThumbnail.switchPage.done.errMsg",
 
  595                                     NotifyDescriptor.ERROR_MESSAGE);
 
  596                     DialogDisplayer.getDefault().notify(d);
 
  597                     logger.log(Level.SEVERE, 
"Error making thumbnails: {0}", ex.getMessage()); 
 
  599                 catch (java.util.concurrent.CancellationException ex) {
 
  608         "# {0} - sort criteria", 
"DataResultViewerThumbnail.sortLabel.textTemplate=Sorted by: {0}",
 
  609         "DataResultViewerThumbnail.sortLabel.text=Sorted by: ---"})
 
  611         if (totalPages == 0) {
 
  612             pagePrevButton.setEnabled(
false);
 
  613             pageNextButton.setEnabled(
false);
 
  614             goToPageField.setEnabled(
false);
 
  615             pageNumLabel.setText(
"");
 
  616             imagesRangeLabel.setText(
"");
 
  617             thumbnailSizeComboBox.setEnabled(
false);
 
  618             sortButton.setEnabled(
false);
 
  619             sortLabel.setText(DataResultViewerThumbnail_sortLabel_text());
 
  622             pageNumLabel.setText(NbBundle.getMessage(
this.getClass(), 
"DataResultViewerThumbnail.pageNumbers.curOfTotal",
 
  623                     Integer.toString(currentPage), Integer.toString(totalPages)));
 
  624             final int imagesFrom = (currentPage - 1) * ThumbnailViewChildren.IMAGES_PER_PAGE + 1;
 
  625             final int imagesTo = currentPageImages + (currentPage - 1) * ThumbnailViewChildren.IMAGES_PER_PAGE;
 
  626             imagesRangeLabel.setText(imagesFrom + 
"-" + imagesTo);
 
  628             pageNextButton.setEnabled(!(currentPage == totalPages));
 
  629             pagePrevButton.setEnabled(!(currentPage == 1));
 
  630             goToPageField.setEnabled(totalPages > 1);
 
  631             sortButton.setEnabled(
true);
 
  632             thumbnailSizeComboBox.setEnabled(
true);
 
  633             if (rootNode != null) {
 
  634                 String sortString = ResultViewerPersistence.loadSortCriteria(rootNode).stream()
 
  635                         .map(SortCriterion::toString)
 
  636                         .collect(Collectors.joining(
" "));
 
  637                 sortString = StringUtils.defaultIfBlank(sortString, 
"---");
 
  638                 sortLabel.setText(Bundle.DataResultViewerThumbnail_sortLabel_textTemplate(sortString));
 
  640                 sortLabel.setText(DataResultViewerThumbnail_sortLabel_text());
 
  652         void setRoot(Node root) {
 
  662             totalPages = root.getChildren().getNodesCount();
 
  664             if (totalPages == 0) {
 
  670             if (currentPage == -1 || currentPage > totalPages) {
 
  675             final Node pageNode = root.getChildren().getNodeAt(currentPage - 1);
 
  678             if (pageNode != null) {
 
  679                 pageNode.addNodeListener(
new NodeListener() {
 
  681                     public void childrenAdded(NodeMemberEvent nme) {
 
  682                         currentPageImages = pageNode.getChildren().getNodesCount();
 
  687                     public void childrenRemoved(NodeMemberEvent nme) {
 
  688                         currentPageImages = 0;
 
  693                     public void childrenReordered(NodeReorderEvent nre) {
 
  697                     public void nodeDestroyed(NodeEvent ne) {
 
  701                     public void propertyChange(PropertyChangeEvent evt) {
 
  731             if (evt.getPropertyName().equals(ExplorerManager.PROP_SELECTED_NODES)) {
 
  732                 setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
 
  735                     if (selectedNodes.length == 1) {
 
  738                             filePathLabel.setText(
"");
 
  742                                 filePathLabel.setText(uPath);
 
  743                                 filePathLabel.setToolTipText(uPath);
 
  745                                 logger.log(Level.WARNING, 
"Could not get unique path for content: {0}", af.
getName()); 
 
  749                         filePathLabel.setText(
"");
 
javax.swing.JTextField goToPageField
javax.swing.JLabel goToPageLabel
void setNode(Node givenNode)
javax.swing.JLabel pageNumLabel
void propertyChange(PropertyChangeEvent evt)
boolean isSupported(Node selectedNode)
DataResultViewer createInstance()
javax.swing.JPanel pageGotoPane
void pageNextButtonActionPerformed(java.awt.event.ActionEvent evt)
javax.swing.JPanel pageNumberPane
javax.swing.JPanel sortPane
void nodeDestroyed(NodeEvent ne)
void childrenAdded(NodeMemberEvent nme)
static final int ICON_SIZE_SMALL
javax.swing.JPanel pageButtonPanel
javax.swing.JPanel pagesPanel
DataResultViewerThumbnail()
javax.swing.JButton pagePrevButton
javax.swing.JPanel imagePane
javax.swing.JLabel filePathLabel
ThumbnailViewChildren rootNodeChildren
javax.swing.JLabel imagesRangeLabel
javax.swing.JComboBox< String > thumbnailSizeComboBox
static final int ICON_SIZE_MEDIUM
DataResultViewerThumbnail(ExplorerManager explorerManager)
org.openide.explorer.view.IconView iconView
javax.swing.JLabel pagesLabel
NodeSelectionListener selectionListener
void sortButtonActionPerformed(java.awt.event.ActionEvent evt)
javax.swing.JLabel sortLabel
void childrenRemoved(NodeMemberEvent nme)
void goToPageFieldActionPerformed(java.awt.event.ActionEvent evt)
javax.swing.JLabel imagesLabel
javax.swing.JLabel pageLabel
synchronized static Logger getLogger(String name)
javax.swing.JButton pageNextButton
void childrenReordered(NodeReorderEvent nre)
static final int ICON_SIZE_LARGE
javax.swing.JButton sortButton
void pagePrevButtonActionPerformed(java.awt.event.ActionEvent evt)
javax.swing.JPanel buttonBarPanel
void thumbnailSizeComboBoxActionPerformed(java.awt.event.ActionEvent evt)
ExplorerManager getExplorerManager()
void goToPage(String pageNumText)
void propertyChange(PropertyChangeEvent evt)