- Timestamp:
- Sep 1, 2010, 6:48:53 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/MainFrame.java
r6821 r6831 3 3 import java.awt.BorderLayout; 4 4 import java.awt.FlowLayout; 5 import java.awt.event.ActionEvent; 6 import java.awt.event.ActionListener; 5 7 6 8 import javax.swing.JFrame; 7 9 import javax.swing.JLabel; 10 import javax.swing.JMenu; 11 import javax.swing.JMenuBar; 12 import javax.swing.JMenuItem; 8 13 import javax.swing.JPanel; 9 14 import javax.swing.JScrollPane; … … 42 47 * Frame principale 43 48 */ 44 public class MainFrame extends JFrame {49 public class MainFrame extends JFrame implements ActionListener { 45 50 /** 46 51 * Logger … … 60 65 * Panel contenant les miniatures de la catégorie courante 61 66 */ 62 public static MiniaturesCategoryPanel imagesPanel;67 public static ThumbnailCategoryPanel imagesPanel; 63 68 /** 64 69 * Scrollpane contenant le panel ci dessus … … 69 74 */ 70 75 private JLabel labelMessage; 76 77 /** 78 * Barre de menu 79 */ 80 private JMenuBar jMenuBar; 81 82 /** 83 * Menu d'édition 84 */ 85 private JMenu jMenuEdition; 86 87 /** 88 * menu des preferences 89 */ 90 private JMenuItem jMenuItemPreferences; 71 91 72 92 /** … … 92 112 this.setIconImage(java.awt.Toolkit.getDefaultToolkit().getImage(Outil.getURL("fr/mael/jiwigo/img/icon.png"))); 93 113 this.setLayout(new BorderLayout()); 114 jMenuBar = new JMenuBar(); 94 115 labelMessage = new JLabel(Messages.getMessage("welcomeMessage")); 95 116 splitPane = new JSplitPane(); 96 117 categoriesTree = new CategoriesTree(); 97 118 splitPane.setLeftComponent(categoriesTree); 98 imagesPanel = new MiniaturesCategoryPanel(null);119 imagesPanel = new ThumbnailCategoryPanel(null); 99 120 scrollPaneImagesPanel = new JScrollPane(imagesPanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, 100 121 JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); … … 104 125 JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT)); 105 126 panel.add(labelMessage); 127 128 jMenuEdition = new JMenu(Messages.getMessage("mainFrame_editionMenu")); 129 jMenuBar.add(jMenuEdition); 130 jMenuItemPreferences = new JMenuItem(Messages.getMessage("mainFrame_preferencesMenu")); 131 jMenuItemPreferences.addActionListener(this); 132 jMenuEdition.add(jMenuItemPreferences); 133 134 this.setJMenuBar(jMenuBar); 106 135 this.add(panel, BorderLayout.SOUTH); 107 136 this.pack(); … … 134 163 } 135 164 165 @Override 166 public void actionPerformed(ActionEvent arg0) { 167 if (arg0.getSource().equals(jMenuItemPreferences)) { 168 new PreferencesDialog(this); 169 } 170 171 } 172 136 173 }
Note: See TracChangeset
for help on using the changeset viewer.