Changeset 9895 for extensions
- Timestamp:
- Mar 27, 2011, 1:05:51 PM (14 years ago)
- Location:
- extensions/jiwigo/trunk/src/main
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/search/tree/FileTree.java
r8838 r9895 3 3 import java.awt.BorderLayout; 4 4 import java.awt.Dimension; 5 import java.awt.FlowLayout; 5 6 import java.awt.event.ActionEvent; 6 7 import java.awt.event.ActionListener; … … 9 10 import java.util.ArrayList; 10 11 12 import javax.swing.ImageIcon; 13 import javax.swing.JButton; 11 14 import javax.swing.JFileChooser; 12 15 import javax.swing.JFrame; … … 25 28 26 29 import fr.mael.jiwigo.transverse.ImagesManagement; 30 import fr.mael.jiwigo.transverse.util.Tools; 27 31 import fr.mael.jiwigo.ui.mainframe.DialogPrivacyLevel; 28 32 import fr.mael.jiwigo.ui.search.DialogChooseCategory; … … 32 36 Copyright (c) 2010, Mael 33 37 All rights reserved. 34 38 35 39 Redistribution and use in source and binary forms, with or without 36 40 modification, are permitted provided that the following conditions are met: … … 43 47 names of its contributors may be used to endorse or promote products 44 48 derived from this software without specific prior written permission. 45 49 46 50 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 47 51 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED … … 54 58 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 55 59 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 56 60 57 61 * @author mael 58 62 * File tree … … 63 67 private JTextField fieldPath; 64 68 69 private JButton refreshButton; 70 71 private JPanel panelNorth; 72 65 73 private DefaultMutableTreeNode root = new DefaultMutableTreeNode(""); 66 74 … … 92 100 fieldPath = new JTextField(path); 93 101 fieldPath.addMouseListener(this); 102 refreshButton = new JButton(); 103 refreshButton.setIcon(new ImageIcon(Tools.getURL("fr/mael/jiwigo/img/refresh.png"))); 104 refreshButton.addActionListener(this); 105 refreshButton.setFocusPainted(false); 106 refreshButton.setBorderPainted(false); 107 refreshButton.setContentAreaFilled(false); 108 109 panelNorth = new JPanel(new FlowLayout()); 110 panelNorth.add(fieldPath); 111 panelNorth.add(refreshButton); 112 94 113 tree = new JTree(root); 95 114 tree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); … … 102 121 treeView.setMinimumSize(minimumSize); 103 122 this.add(treeView, BorderLayout.CENTER); 104 this.add( fieldPath, BorderLayout.NORTH);123 this.add(panelNorth, BorderLayout.NORTH); 105 124 reload(); 106 125 } … … 246 265 //then the dialog that allow to choose the category is called 247 266 new DialogChooseCategory(filesToSend); 248 } 249 } 250 267 } else if (paramActionEvent.getSource().equals(refreshButton)) { 268 reload(); 269 } 270 } 251 271 }
Note: See TracChangeset
for help on using the changeset viewer.