summaryrefslogtreecommitdiffstats
path: root/idrop-swing
diff options
context:
space:
mode:
authorLisa Stillwell <lisa@renci.org>2012-11-30 22:10:15 (GMT)
committer Lisa Stillwell <lisa@renci.org>2012-11-30 22:10:15 (GMT)
commitf994ec50a9ac293c6f5b3ab6462b391834436455 (patch)
tree38cd29b3c4b636fb7f3a91f8defed0c066a9c497 /idrop-swing
parente5258688810905182464f26b273301a2bc20fd19 (diff)
downloadQCG-Data-f994ec50a9ac293c6f5b3ab6462b391834436455.zip
QCG-Data-f994ec50a9ac293c6f5b3ab6462b391834436455.tar.gz
QCG-Data-f994ec50a9ac293c6f5b3ab6462b391834436455.tar.bz2
[#983] add a dialog for search results
Diffstat (limited to 'idrop-swing')
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.form142
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.java222
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form6
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java20
-rw-r--r--idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties7
5 files changed, 394 insertions, 3 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.form
new file mode 100644
index 0000000..13b06da
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.form
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ <Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="SearchResultsDialog.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-9,0,0,2,-107"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="jPanel1">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="Center"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="pnlTabSearch">
+ <Properties>
+ <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="SearchResultsDialog.pnlTabSearch.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="Center"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="pnlTabSearchTop">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="North"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
+ </Container>
+ <Container class="javax.swing.JPanel" name="pnlTabSearchResults">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="Center"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
+ <Property name="columns" type="int" value="0"/>
+ <Property name="rows" type="int" value="1"/>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JScrollPane" name="scrollPaneSearchResults">
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JTable" name="tableSearchResults">
+ <Properties>
+ <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
+ <Table columnCount="4" rowCount="4">
+ <Column editable="true" title="Title 1" type="java.lang.Object"/>
+ <Column editable="true" title="Title 2" type="java.lang.Object"/>
+ <Column editable="true" title="Title 3" type="java.lang.Object"/>
+ <Column editable="true" title="Title 4" type="java.lang.Object"/>
+ </Table>
+ </Property>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="jPanel2">
+ <Properties>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[661, 50]"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="South"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="1" attributes="0">
+ <EmptySpace pref="528" max="32767" attributes="0"/>
+ <Component id="btnDismiss" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="38" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
+ <Component id="btnDismiss" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JButton" name="btnDismiss">
+ <Properties>
+ <Property name="label" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="SearchResultsDialog.btnDismiss.label" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnDismissActionPerformed"/>
+ </Events>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+</Form>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.java
new file mode 100644
index 0000000..7238589
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.java
@@ -0,0 +1,222 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.irods.jargon.idrop.desktop.systraygui;
+
+import java.awt.Cursor;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.tree.TreePath;
+import org.irods.jargon.core.pub.CollectionAndDataObjectListAndSearchAO;
+import org.irods.jargon.core.query.CollectionAndDataObjectListingEntry;
+import org.irods.jargon.idrop.desktop.systraygui.utils.TreeUtils;
+import org.irods.jargon.idrop.desktop.systraygui.viscomponents.IRODSNode;
+import org.irods.jargon.idrop.desktop.systraygui.viscomponents.IRODSOutlineModel;
+import org.irods.jargon.idrop.desktop.systraygui.viscomponents.IRODSSearchTableModel;
+import org.irods.jargon.idrop.desktop.systraygui.viscomponents.IRODSTree;
+import org.irods.jargon.idrop.exceptions.IdropException;
+import org.openide.util.Exceptions;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * @author lisa
+ */
+public class SearchResultsDialog extends javax.swing.JDialog implements ListSelectionListener {
+
+ private iDrop idropGui;
+ private IRODSTree irodsTree;
+ private IRODSOutlineModel irodsFileSystemModel;
+ private String searchText;
+ public static org.slf4j.Logger log = LoggerFactory.getLogger(IRODSTree.class);
+
+ /**
+ * Creates new form SearchResultsDialog
+ */
+ public SearchResultsDialog(java.awt.Frame parent, boolean modal) {
+ super(parent, modal);
+ initComponents();
+ }
+
+ public SearchResultsDialog(final iDrop parent, final boolean modal,
+ final IRODSTree irodsTree, final String searchText) {
+ super(parent, modal);
+ initComponents();
+
+ this.idropGui = parent;
+ this.irodsTree = irodsTree;
+ this.searchText = searchText;
+ this.irodsFileSystemModel = (IRODSOutlineModel) irodsTree.getModel();
+
+ initSearchResults();
+ }
+
+ private void initSearchResults() {
+ final String searchTerms = searchText.trim();
+
+ tableSearchResults.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ ListSelectionModel listSelectionModel = tableSearchResults.getSelectionModel();
+ listSelectionModel.addListSelectionListener(this);
+
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+
+ try {
+ idropGui.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+ CollectionAndDataObjectListAndSearchAO collectionAndDataObjectListAndSearchAO =
+ idropGui.getiDropCore().getIRODSAccessObjectFactory().getCollectionAndDataObjectListAndSearchAO(
+ idropGui.getiDropCore().getIrodsAccount());
+ IRODSSearchTableModel irodsSearchTableModel = new IRODSSearchTableModel(
+ collectionAndDataObjectListAndSearchAO.searchCollectionsAndDataObjectsBasedOnName(searchTerms));
+ tableSearchResults.setModel(irodsSearchTableModel);
+ //tabIrodsViews.setSelectedComponent(pnlTabSearch);
+ } catch (Exception e) {
+ idropGui.showIdropException(e);
+ return;
+ } finally {
+ idropGui.getiDropCore().closeAllIRODSConnections();
+ idropGui.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ }
+ }
+ });
+ }
+
+
+ @Override
+ public void valueChanged(ListSelectionEvent lse) {
+ if (lse.getValueIsAdjusting())
+ return;
+
+ int row = tableSearchResults.getSelectedRow();
+
+ CollectionAndDataObjectListingEntry.ObjectType objType =
+ (CollectionAndDataObjectListingEntry.ObjectType) tableSearchResults.getValueAt(row, 0);
+ String selectedParent = (String) tableSearchResults.getValueAt(row, 1);
+ String selectedName = (String) tableSearchResults.getValueAt(row, 2);
+ if (selectedParent != null && selectedName != null) {
+
+ log.info("selected returned search result: {}", selectedParent + "/" + selectedName);
+
+ CollectionAndDataObjectListingEntry entry = new CollectionAndDataObjectListingEntry();
+ entry.setObjectType(objType);
+ entry.setParentPath(selectedParent);
+ entry.setPathOrName(selectedName);
+
+ TreePath path = null;
+ try {
+ path = TreeUtils.buildTreePathForIrodsAbsolutePath(irodsTree, selectedParent + "/" + selectedName);
+ } catch (IdropException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+
+ if (path != null) {
+ irodsTree.expandPath(path);
+ java.awt.Rectangle rect = irodsTree.getPathBounds(path);
+ if (rect != null) {
+ irodsTree.scrollRectToVisible(rect);
+ }
+ }
+ }
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jPanel1 = new javax.swing.JPanel();
+ pnlTabSearch = new javax.swing.JPanel();
+ pnlTabSearchTop = new javax.swing.JPanel();
+ pnlTabSearchResults = new javax.swing.JPanel();
+ scrollPaneSearchResults = new javax.swing.JScrollPane();
+ tableSearchResults = new javax.swing.JTable();
+ jPanel2 = new javax.swing.JPanel();
+ btnDismiss = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle(org.openide.util.NbBundle.getMessage(SearchResultsDialog.class, "SearchResultsDialog.title")); // NOI18N
+
+ jPanel1.setLayout(new java.awt.BorderLayout());
+
+ pnlTabSearch.setToolTipText(org.openide.util.NbBundle.getMessage(SearchResultsDialog.class, "SearchResultsDialog.pnlTabSearch.toolTipText")); // NOI18N
+ pnlTabSearch.setLayout(new java.awt.BorderLayout());
+ pnlTabSearch.add(pnlTabSearchTop, java.awt.BorderLayout.NORTH);
+
+ pnlTabSearchResults.setLayout(new java.awt.GridLayout());
+
+ tableSearchResults.setModel(new javax.swing.table.DefaultTableModel(
+ new Object [][] {
+ {null, null, null, null},
+ {null, null, null, null},
+ {null, null, null, null},
+ {null, null, null, null}
+ },
+ new String [] {
+ "Title 1", "Title 2", "Title 3", "Title 4"
+ }
+ ));
+ scrollPaneSearchResults.setViewportView(tableSearchResults);
+
+ pnlTabSearchResults.add(scrollPaneSearchResults);
+
+ pnlTabSearch.add(pnlTabSearchResults, java.awt.BorderLayout.CENTER);
+
+ jPanel1.add(pnlTabSearch, java.awt.BorderLayout.CENTER);
+
+ getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
+
+ jPanel2.setPreferredSize(new java.awt.Dimension(661, 50));
+
+ btnDismiss.setLabel(org.openide.util.NbBundle.getMessage(SearchResultsDialog.class, "SearchResultsDialog.btnDismiss.label")); // NOI18N
+ btnDismiss.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnDismissActionPerformed(evt);
+ }
+ });
+
+ org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
+ jPanel2.setLayout(jPanel2Layout);
+ jPanel2Layout.setHorizontalGroup(
+ jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
+ .addContainerGap(528, Short.MAX_VALUE)
+ .add(btnDismiss)
+ .add(38, 38, 38))
+ );
+ jPanel2Layout.setVerticalGroup(
+ jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(jPanel2Layout.createSequentialGroup()
+ .add(15, 15, 15)
+ .add(btnDismiss)
+ .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnDismissActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDismissActionPerformed
+ this.dispose();
+ }//GEN-LAST:event_btnDismissActionPerformed
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnDismiss;
+ private javax.swing.JPanel jPanel1;
+ private javax.swing.JPanel jPanel2;
+ private javax.swing.JPanel pnlTabSearch;
+ private javax.swing.JPanel pnlTabSearchResults;
+ private javax.swing.JPanel pnlTabSearchTop;
+ private javax.swing.JScrollPane scrollPaneSearchResults;
+ private javax.swing.JTable tableSearchResults;
+ // End of variables declaration//GEN-END:variables
+
+}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form
index ffe57b3..4aff5b0 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form
@@ -356,6 +356,9 @@
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="iDrop.txtMainToolbarSearchTerms.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
+ <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="iDrop.txtMainToolbarSearchTerms.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[130, 45]"/>
</Property>
@@ -373,6 +376,9 @@
<Dimension value="[118, 40]"/>
</Property>
</Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnMainToolbarSearchFilesActionPerformed"/>
+ </Events>
</Component>
</SubComponents>
</Container>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java
index b6a8ece..ca7f2dd 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java
@@ -1087,10 +1087,16 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
this.showMessageFromOperation("please enter text to search on");
return;
}
+ SearchResultsDialog searchResultsDialog = new SearchResultsDialog(this, true,
+ getIrodsTree(), searchText);
- final String searchTerms = searchText.trim();
- final iDrop idropGui = this;
+ searchResultsDialog.setLocation(
+ (int) (this.getLocation().getX() + this.getWidth() / 2), (int) (this.getLocation().getY() + this.getHeight() / 2));
+ searchResultsDialog.setVisible(true);
+// final String searchTerms = searchText.trim();
+// final iDrop idropGui = this;
+//
// java.awt.EventQueue.invokeLater(new Runnable() {
//
// @Override
@@ -1751,12 +1757,18 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
txtMainToolbarSearchTerms.setFont(new java.awt.Font("Lucida Grande", 0, 14)); // NOI18N
txtMainToolbarSearchTerms.setText(org.openide.util.NbBundle.getMessage(iDrop.class, "iDrop.txtMainToolbarSearchTerms.text")); // NOI18N
+ txtMainToolbarSearchTerms.setToolTipText(org.openide.util.NbBundle.getMessage(iDrop.class, "iDrop.txtMainToolbarSearchTerms.toolTipText")); // NOI18N
txtMainToolbarSearchTerms.setPreferredSize(new java.awt.Dimension(130, 45));
pnlMainToolbarSearch.add(txtMainToolbarSearchTerms);
btnMainToolbarSearchFiles.setIcon(new javax.swing.ImageIcon(getClass().getResource("/search_files.png"))); // NOI18N
btnMainToolbarSearchFiles.setText(org.openide.util.NbBundle.getMessage(iDrop.class, "iDrop.btnMainToolbarSearchFiles.text")); // NOI18N
btnMainToolbarSearchFiles.setPreferredSize(new java.awt.Dimension(118, 40));
+ btnMainToolbarSearchFiles.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnMainToolbarSearchFilesActionPerformed(evt);
+ }
+ });
pnlMainToolbarSearch.add(btnMainToolbarSearchFiles);
pnlMainToolbar.add(pnlMainToolbarSearch, java.awt.BorderLayout.SOUTH);
@@ -2072,6 +2084,10 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
(int) (this.getLocation().getX() + this.getWidth() / 2), (int) (this.getLocation().getY() + this.getHeight() / 2));
copyMoveDialog.setVisible(true);
}//GEN-LAST:event_btnMainToolbarCopyActionPerformed
+
+ private void btnMainToolbarSearchFilesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMainToolbarSearchFilesActionPerformed
+ processSearchRequest();
+ }//GEN-LAST:event_btnMainToolbarSearchFilesActionPerformed
/**
* @param args the command line arguments
*/
diff --git a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
index 4a6b2e5..e0502ec 100644
--- a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
+++ b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
@@ -123,7 +123,7 @@ iDrop.btnMainToolbarSettings.text=Settings
iDrop.btnMainToolbarCopy.label=Copy to Another Server
iDrop.btnMainToolbarAddEditMetaData.text=Info
iDrop.btnMainToolbarSearchFiles.text=Search Files
-iDrop.txtMainToolbarSearchTerms.text=Enter search terms
+iDrop.txtMainToolbarSearchTerms.text=
iDrop.btnMainToolbarDelete.text_1=Delete
iDrop.pnlIdropBottom.toolTipText=Display area for status and messages
iDrop.togglePauseTransfer.toolTipText=Pause the current transfer
@@ -208,3 +208,8 @@ CopyMoveDialog.title=Move or Copy iRODS FIles and Collections
CopyMoveDialog.txtNewLocation.text=
CopyMoveDialog.jButton1.text=jButton1
CopyMoveDialog.btnBrowse.label=Browse
+SearchResultsDialog.pnlTabSearch.toolTipText=Search for files and collections in iRODS and display search results
+SearchResultsDialog.jButton1.text=jButton1
+SearchResultsDialog.title=iRODS Search Results
+SearchResultsDialog.btnDismiss.label=Dismiss
+iDrop.txtMainToolbarSearchTerms.toolTipText=Enter search terms