KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > suberic > pooka > gui > PreviewContentPanel


1 package net.suberic.pooka.gui;
2 import java.awt.CardLayout JavaDoc;
3 import javax.swing.*;
4 import net.suberic.pooka.*;
5 import net.suberic.util.swing.*;
6 import java.io.IOException JavaDoc;
7 import java.util.HashMap JavaDoc;
8 import net.suberic.pooka.Pooka;
9 import net.suberic.util.gui.*;
10 import java.awt.BorderLayout JavaDoc;
11 import java.awt.event.ActionEvent JavaDoc;
12 import javax.swing.event.ListSelectionListener JavaDoc;
13 import javax.swing.plaf.metal.MetalTheme JavaDoc;
14
15 /**
16  * A Content Panel which shows a JSplitPane, with a PreviewFolderPanel in
17  * the top section and a PreviewMessagePanel in the bottom section.
18  */

19 public class PreviewContentPanel extends JPanel implements ContentPanel, MessageUI, ThemeSupporter, ThemeListener {
20
21   private JPanel folderDisplay = null;
22   private ReadMessageDisplayPanel messageDisplay;
23   private JPanel messageCardPanel;
24
25   private JSplitPane splitPanel;
26
27   private PreviewFolderPanel current = null;
28
29   HashMap JavaDoc cardTable = new HashMap JavaDoc();
30
31   private ListSelectionListener JavaDoc selectionListener;
32
33   protected javax.swing.plaf.metal.MetalTheme JavaDoc currentTheme = null;
34
35   private boolean savingOpenFolders;
36
37   /**
38    * Creates a new PreviewContentPanel.
39    */

40   public PreviewContentPanel() {
41     folderDisplay = new JPanel();
42     folderDisplay.setLayout(new CardLayout JavaDoc());
43     folderDisplay.add("emptyPanel", new JPanel());
44
45     messageDisplay = new ReadMessageDisplayPanel();
46
47     try {
48       messageDisplay.configureMessageDisplay();
49     } catch (javax.mail.MessagingException JavaDoc me) {
50       // showError();
51
}
52
53     splitPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, folderDisplay, messageDisplay);
54
55
56     this.setLayout(new BorderLayout JavaDoc());
57
58     this.add("Center", splitPanel);
59
60     splitPanel.setDividerLocation(Integer.parseInt(Pooka.getProperty("Pooka.contentPanel.dividerLocation", "200")));
61
62     selectionListener = new ListSelectionListener JavaDoc() {
63   public void valueChanged(javax.swing.event.ListSelectionEvent JavaDoc e) {
64     if (! e.getValueIsAdjusting())
65       selectedMessageChanged();
66   }
67       };
68
69     this.setSavingOpenFolders(Pooka.getProperty("Pooka.saveOpenFoldersOnExit", "false").equalsIgnoreCase("true"));
70
71     // if the PreviewContentPanel itself gets the focus, pass it on to
72
// the PreviewFolderPanel (by default)
73

74     this.addFocusListener(new java.awt.event.FocusAdapter JavaDoc() {
75   public void focusGained(java.awt.event.FocusEvent JavaDoc e) {
76     if (current != null) {
77       current.requestFocusInWindow();
78     }
79   }
80       });
81   }
82
83   /**
84    * Creates a new PreviewContentPanel from an existing MessagePanel.
85    */

86   public PreviewContentPanel(MessagePanel mp) {
87     this();
88
89     // go through each window on the MessagePanel.
90

91     JInternalFrame[] frames = mp.getAllFrames();
92
93     String JavaDoc selectedID = null;
94
95     for (int i = 0; i < frames.length; i++) {
96       if (frames[i] instanceof FolderInternalFrame) {
97   PreviewFolderPanel newPP = new PreviewFolderPanel(this, (FolderInternalFrame) frames[i]);
98   net.suberic.pooka.FolderInfo fi = newPP.getFolderInfo();
99   String JavaDoc folderID = fi.getFolderID();
100   fi.setFolderDisplayUI(newPP);
101   addPreviewPanel(newPP, folderID);
102   if (frames[i].isSelected()) {
103     selectedID = folderID;
104   } else if (selectedID == null) {
105     // if it gets overriden later, that's great.
106
selectedID = folderID;
107   }
108       } else if (frames[i] instanceof MessageInternalFrame) {
109   if (frames[i].isSelected()) {
110     if (frames[i] instanceof ReadMessageInternalFrame) {
111       selectedID = ((ReadMessageInternalFrame) frames[i]).getMessageProxy().getMessageInfo().getFolderInfo().getFolderID();
112     }
113   }
114   ((MessageInternalFrame) frames[i]).detachWindow();
115       }
116     }
117
118     if (selectedID != null)
119       showFolder(selectedID);
120   }
121
122   /**
123    * Configures the InterfaceStyle for this component.
124    */

125   public void configureInterfaceStyle() {
126     Runnable JavaDoc runMe = new Runnable JavaDoc() {
127   public void run() {
128     try {
129       Pooka.getUIFactory().getPookaThemeManager().updateUI(PreviewContentPanel.this, PreviewContentPanel.this);
130       getMessageDisplay().setDefaultFont();
131       getMessageDisplay().sizeToDefault();
132     } catch (Exception JavaDoc e) {
133     }
134   }
135       };
136
137     if (! SwingUtilities.isEventDispatchThread()) {
138       SwingUtilities.invokeLater(runMe);
139     } else {
140       runMe.run();
141     }
142   }
143
144   /**
145    * Gets the currently configured Theme.
146    */

147   public MetalTheme JavaDoc getCurrentTheme() {
148     return currentTheme;
149   }
150
151   /**
152    * Sets the Theme that this component is currently using.
153    */

154   public void setCurrentTheme(MetalTheme JavaDoc newTheme) {
155     if (currentTheme != null && currentTheme instanceof ConfigurableMetalTheme) {
156       ((ConfigurableMetalTheme)currentTheme).removeThemeListener(this);
157     }
158     currentTheme = newTheme;
159
160     if (currentTheme != null && currentTheme instanceof ConfigurableMetalTheme) {
161       ((ConfigurableMetalTheme)currentTheme).addThemeListener(this);
162     }
163   }
164
165   /**
166    * Called when the specifics of a Theme change.
167    */

168   public void themeChanged(ConfigurableMetalTheme theme) {
169     // we should really only be getting messages from our own current themes,
170
// but, hey, it never hurts to check.
171
if (currentTheme != null && currentTheme == theme) {
172       Runnable JavaDoc r = new Runnable JavaDoc() {
173     public void run() {
174       try {
175         Pooka.getUIFactory().getPookaThemeManager().updateUI(PreviewContentPanel.this, PreviewContentPanel.this, true);
176         getMessageDisplay().setDefaultFont();
177       } catch (Exception JavaDoc e) {
178       }
179
180     }
181   };
182       if (SwingUtilities.isEventDispatchThread()) {
183   r.run();
184       } else {
185   SwingUtilities.invokeLater(r);
186       }
187     }
188   }
189
190
191   /**
192    * Gets the Theme object from the ThemeManager which is appropriate
193    * for this UI.
194    */

195   public MetalTheme JavaDoc getTheme(ThemeManager tm) {
196     MessageProxy mp = getMessageProxy();
197     if (mp == null) {
198       return tm.getDefaultTheme();
199     }
200
201     MessageInfo mi = mp.getMessageInfo();
202     if (mi == null) {
203       return tm.getDefaultTheme();
204     }
205
206     FolderInfo fi = mi.getFolderInfo();
207     if (fi != null) {
208       String JavaDoc id = Pooka.getProperty(fi.getFolderProperty() + ".theme", "");
209       if (id != null && ! id.equals("")) {
210   return tm.getTheme(id);
211       }
212     }
213
214     return tm.getDefaultTheme();
215
216   }
217
218
219   /**
220    * Saves the panel size information. For this, saves the location of
221    * the divider.
222    */

223   public void savePanelSize() {
224     Pooka.setProperty("Pooka.contentPanel.dividerLocation", Integer.toString(splitPanel.getDividerLocation()));
225   }
226
227   /**
228    * Shows the PreviewFolderPanel indicated by the given FolderId.
229    */

230   public void showFolder(String JavaDoc folderId) {
231     if (current != null) {
232       current.getFolderDisplay().getMessageTable().getSelectionModel().removeListSelectionListener(selectionListener);
233     }
234     current = (PreviewFolderPanel) cardTable.get(folderId);
235
236     ((CardLayout JavaDoc)folderDisplay.getLayout()).show(folderDisplay, folderId);
237     if (current != null) {
238       current.getFolderDisplay().getMessageTable().getSelectionModel().addListSelectionListener(selectionListener);
239     }
240
241     selectedMessageChanged();
242     folderDisplay.repaint();
243     selectFolderDisplay();
244   }
245
246   /**
247    * This should be called every time the selected message changes.
248    */

249   public void selectedMessageChanged() {
250     if (getAutoPreview()) {
251       refreshCurrentMessage();
252     } else {
253       clearCurrentMessage();
254     }
255     Pooka.getMainPanel().refreshActiveMenus();
256     refreshCurrentUser();
257   }
258
259   /**
260    * This refreshes the currently previewed message.
261    */

262   public void refreshCurrentMessage() {
263     if (current != null) {
264       final MessageProxy mp = current.getFolderDisplay().getSelectedMessage();
265       if (! (mp instanceof MultiMessageProxy)) {
266   if (current != null) {
267     current.getFolderInfo().getFolderThread().addToQueue(new javax.swing.AbstractAction JavaDoc() {
268         public void actionPerformed(java.awt.event.ActionEvent JavaDoc ae) {
269     messageDisplay.setMessageUI(PreviewContentPanel.this);
270     try {
271       refreshDisplay();
272       if (mp != null && mp.getMessageInfo() != null)
273         mp.getMessageInfo().setSeen(true);
274     } catch (javax.mail.MessagingException JavaDoc me) {
275       //showError();
276
}
277         }
278       }, new java.awt.event.ActionEvent JavaDoc(this, 0, "message-refresh"));
279   }
280       }
281     }
282   }
283
284   /**
285    * This clears the currently previewed message.
286    */

287   public void clearCurrentMessage() {
288     messageDisplay.setMessageUI(null);
289     try {
290       refreshDisplay();
291     } catch (Exception JavaDoc e) {
292       // we've set it to null, so shouldn't happen.
293
}
294   }
295
296   /**
297    * Registers a PreviewFolderPanel for a particular FolderID.
298    */

299   public void addPreviewPanel(PreviewFolderPanel newPanel, String JavaDoc folderId) {
300     cardTable.put(folderId, newPanel);
301     folderDisplay.add(newPanel, folderId);
302   }
303
304   /**
305    * Removes the PreviewPanel for a particular FolderID.
306    */

307   public void removePreviewPanel(String JavaDoc folderId) {
308     PreviewFolderPanel panel = (PreviewFolderPanel)cardTable.get(folderId);
309     if (panel != null) {
310       if (panel == current)
311   current = null;
312       folderDisplay.remove(panel);
313       cardTable.remove(folderId);
314     }
315   }
316
317
318   /**
319    * This gets the FolderInfo associated with the first name in the
320    * folderList Vector, and attempts to display the FolderPanel for it.
321    *
322    * Normally called at startup if Pooka.openSavedFoldersOnStartup
323    * is set.
324    */

325   public void openSavedFolders(java.util.Vector JavaDoc folderList) {
326     if (folderList != null && folderList.size() > 0) {
327       net.suberic.pooka.FolderInfo fInfo = Pooka.getStoreManager().getFolderById((String JavaDoc)folderList.elementAt(0));
328       if (fInfo != null && fInfo.getFolderNode() != null) {
329   FolderNode fNode = fInfo.getFolderNode();
330   fNode.makeVisible();
331   Action a = fNode.getAction("file-open");
332   a.actionPerformed(new java.awt.event.ActionEvent JavaDoc(this, 0, "file-open"));
333       }
334     }
335   }
336
337   /**
338    * Saves the open folder.
339    */

340   public void saveOpenFolders() {
341     if (current != null && current.getFolderInfo() != null) {
342       String JavaDoc folderId = current.getFolderInfo().getFolderID();
343       Pooka.setProperty("Pooka.openFolderList", folderId);
344     }
345   }
346
347   /**
348    * returns whether or not we're saving open folders.
349    */

350   public boolean isSavingOpenFolders() {
351     return savingOpenFolders;
352   }
353
354   /**
355    * sets whether or not we're saving open folders.
356    */

357   public void setSavingOpenFolders(boolean newValue) {
358     savingOpenFolders=newValue;
359   }
360
361   /**
362    * Returns the UI component for this ContentPanel.
363    *
364    * Returns this object.
365    *
366    * As specified in interface net.suberic.pooka.gui.ContentPanel.
367    */

368   public javax.swing.JComponent JavaDoc getUIComponent() {
369     return this;
370   }
371
372   /**
373    * Sets the UI component for this ContentPanel.
374    *
375    * A no-op. The PreviewContentPanel is always its own UIComponent.
376    *
377    * As specified in interface net.suberic.pooka.gui.ContentPanel.
378    */

379   public void setUIComponent(javax.swing.JComponent JavaDoc comp) {
380     // no-op.
381
}
382
383   /**
384    * This method shows a help screen. At the moment, it just takes the
385    * given URL, creates a JInteralFrame and a JEditorPane, and then shows
386    * the doc with those components.
387    */

388   public void showHelpScreen(String JavaDoc title, java.net.URL JavaDoc url) {
389     JFrame jf = new JFrame(title);
390     JEditorPane jep = new JEditorPane();
391     try {
392       jep.setPage(url);
393     } catch (IOException JavaDoc ioe) {
394       jep.setText(Pooka.getProperty("err.noHelpPage", "No help available."));
395     }
396     jep.setEditable(false);
397     jf.setSize(500,500);
398     jf.getContentPane().add(new JScrollPane(jep));
399     jf.setVisible(true);
400   }
401
402   /**
403    * Selects the current PreviewFolderPanel.
404    */

405   public void selectFolderDisplay() {
406     if (current != null)
407       current.requestFocusInWindow();
408   }
409
410   /**
411    * Selects the preview message panel.
412    */

413   public void selectMessageDisplay() {
414     messageDisplay.requestFocusInWindow();
415   }
416
417   /**
418    * Returns the currently showing PreviewPanel.
419    */

420   public PreviewFolderPanel getCurrentPanel() {
421     return current;
422   }
423
424   /**
425    * Refreshes the currently available actions.
426    */

427   public void refreshActiveMenus() {
428     // does nothing; should only be called by the MainPanel.
429
//if (current != null)
430
//current.getToolbar().setActive(getActions());
431
//Pooka.getMainPanel().refreshActiveMenus();
432
}
433
434   /**
435    * Refreshes the current default Profile.
436    */

437   public void refreshCurrentUser() {
438     Pooka.getMainPanel().refreshCurrentUser();
439   }
440
441   /**
442    * Gets the currently selected MessageProxy, if any.
443    */

444   public MessageProxy getMessageProxy() {
445     if (current != null && current.getFolderDisplay() != null)
446       return current.getFolderDisplay().getSelectedMessage();
447     else
448       return null;
449   }
450
451   /**
452    * Opens the current message ui, if any.
453    */

454   public void openMessageUI() {
455     // no-op here.
456
}
457
458   /**
459    * Closes the current message ui, if any.
460    */

461   public void closeMessageUI() {
462     // no-op here.
463
}
464
465   /**
466    * Creates a ProgressDialog using the given values.
467    */

468   public net.suberic.util.swing.ProgressDialog createProgressDialog(int min, int max, int initialValue, String JavaDoc title, String JavaDoc content) {
469     return Pooka.getUIFactory().createProgressDialog(min, max, initialValue, title, content);
470   }
471
472   /**
473    * Shows the current display of the encryption status.
474    */

475   public net.suberic.pooka.gui.crypto.CryptoStatusDisplay getCryptoStatusDisplay() {
476     return getMessageDisplay().getCryptoStatusDisplay();
477   }
478
479   public void setBusy(boolean newValue) {
480     // no-op here.
481
}
482
483   public void setEnabled(boolean newValue) {
484     // no-op here.
485
}
486
487   /**
488    * Refreshes the display.
489    */

490   public void refreshDisplay() throws javax.mail.MessagingException JavaDoc {
491     configureInterfaceStyle();
492     messageDisplay.resetEditorText();
493
494     java.awt.Component JavaDoc fOwner = java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
495     if (fOwner != null && messageDisplay != null && SwingUtilities.isDescendingFrom(fOwner, messageDisplay) && messageDisplay.getMessageUI() == null) {
496       if (current != null) {
497   current.requestFocusInWindow();
498       }
499     }
500   }
501
502   public boolean getAutoPreview() {
503     return (Pooka.getProperty("Pooka.autoPreview", "true").equalsIgnoreCase("true"));
504   }
505
506   /**
507    * This shows an Confirm Dialog window. We include this so that
508    * the MessageProxy can call the method without caring abou the
509    * actual implementation of the Dialog.
510    */

511   public int showConfirmDialog(String JavaDoc pMessageText, String JavaDoc pTitle, int pType) {
512     final String JavaDoc messageText = pMessageText;
513     final String JavaDoc title = pTitle;
514     final int type = pType;
515
516     final ResponseWrapper fResponseWrapper = new ResponseWrapper();
517     Runnable JavaDoc runMe = new Runnable JavaDoc() {
518   public void run() {
519     fResponseWrapper.setInt(JOptionPane.showConfirmDialog(PreviewContentPanel.this, messageText, title, type));
520   }
521       };
522
523     if (! SwingUtilities.isEventDispatchThread()) {
524       try {
525   SwingUtilities.invokeAndWait(runMe);
526       } catch (Exception JavaDoc e) {
527       }
528     } else {
529       runMe.run();
530     }
531
532     return fResponseWrapper.getInt();
533   }
534
535   /**
536    * This shows an Confirm Dialog window. We include this so that
537    * the MessageProxy can call the method without caring abou the
538    * actual implementation of the Dialog.
539    */

540   public int showConfirmDialog(String JavaDoc pMessageText, String JavaDoc pTitle, int pOptionType, int pIconType) {
541     final String JavaDoc messageText = pMessageText;
542     final String JavaDoc title = pTitle;
543     final int optionType = pOptionType;
544     final int iconType = pIconType;
545
546     final ResponseWrapper fResponseWrapper = new ResponseWrapper();
547     Runnable JavaDoc runMe = new Runnable JavaDoc() {
548   public void run() {
549     fResponseWrapper.setInt(JOptionPane.showConfirmDialog(PreviewContentPanel.this, messageText, title, optionType, iconType));
550   }
551       };
552
553     if (! SwingUtilities.isEventDispatchThread()) {
554       try {
555   SwingUtilities.invokeAndWait(runMe);
556       } catch (Exception JavaDoc e) {
557       }
558     } else {
559       runMe.run();
560     }
561
562     return fResponseWrapper.getInt();
563   }
564
565   /**
566    * This shows an Error Message window. We include this so that
567    * the MessageProxy can call the method without caring abou the
568    * actual implementation of the Dialog.
569    */

570   public void showError(String JavaDoc pErrorMessage, String JavaDoc pTitle) {
571     final String JavaDoc errorMessage = pErrorMessage;
572     final String JavaDoc title = pTitle;
573
574     Runnable JavaDoc runMe = new Runnable JavaDoc() {
575   public void run() {
576     JOptionPane.showMessageDialog(PreviewContentPanel.this, errorMessage, title, JOptionPane.ERROR_MESSAGE);
577   }
578       };
579
580     if (! SwingUtilities.isEventDispatchThread()) {
581       try {
582   SwingUtilities.invokeAndWait(runMe);
583       } catch (Exception JavaDoc e) {
584       }
585     } else {
586       runMe.run();
587     }
588   }
589
590   /**
591    * This shows an Error Message window. We include this so that
592    * the MessageProxy can call the method without caring abou the
593    * actual implementation of the Dialog.
594    */

595   public void showError(String JavaDoc errorMessage) {
596     showError(errorMessage, Pooka.getProperty("Error", "Error"));
597   }
598
599   /**
600    * This shows an Error Message window. We include this so that
601    * the MessageProxy can call the method without caring abou the
602    * actual implementation of the Dialog.
603    */

604   public void showError(String JavaDoc errorMessage, Exception JavaDoc e) {
605     showError(errorMessage, Pooka.getProperty("Error", "Error"), e);
606   }
607
608   /**
609    * This shows an Error Message window. We include this so that
610    * the MessageProxy can call the method without caring about the
611    * actual implementation of the Dialog.
612    */

613   public void showError(String JavaDoc errorMessage, String JavaDoc title, Exception JavaDoc e) {
614     showError(errorMessage + e.getMessage(), title);
615     e.printStackTrace();
616   }
617
618   /**
619    * This formats a display message.
620    */

621   public String JavaDoc formatMessage(String JavaDoc message) {
622     return Pooka.getUIFactory().formatMessage(message);
623   }
624
625   /**
626    * This shows an Input window. We include this so that the
627    * MessageProxy can call the method without caring about the actual
628    * implementation of the dialog.
629    */

630   public String JavaDoc showInputDialog(String JavaDoc pInputMessage, String JavaDoc pTitle) {
631     final String JavaDoc inputMessage = pInputMessage;
632     final String JavaDoc title = pTitle;
633
634     final ResponseWrapper fResponseWrapper = new ResponseWrapper();
635     Runnable JavaDoc runMe = new Runnable JavaDoc() {
636   public void run() {
637     fResponseWrapper.setString(JOptionPane.showInputDialog(PreviewContentPanel.this, inputMessage, title, JOptionPane.QUESTION_MESSAGE));
638   }
639       };
640
641     if (! SwingUtilities.isEventDispatchThread()) {
642       try {
643   SwingUtilities.invokeAndWait(runMe);
644       } catch (Exception JavaDoc e) {
645       }
646     } else {
647       runMe.run();
648     }
649
650     return fResponseWrapper.getString();
651   }
652
653   /**
654    * This shows an Input window. We include this so that the
655    * MessageProxy can call the method without caring about the actual
656    * implementation of the dialog.
657    */

658   public String JavaDoc showInputDialog(Object JavaDoc[] pInputPanes, String JavaDoc pTitle) {
659     final Object JavaDoc[] inputPanes = pInputPanes;
660     final String JavaDoc title = pTitle;
661
662     final ResponseWrapper fResponseWrapper = new ResponseWrapper();
663     Runnable JavaDoc runMe = new Runnable JavaDoc() {
664   public void run() {
665     fResponseWrapper.setString(JOptionPane.showInputDialog(PreviewContentPanel.this, inputPanes, title, JOptionPane.QUESTION_MESSAGE));
666   }
667       };
668
669     if (! SwingUtilities.isEventDispatchThread()) {
670       try {
671   SwingUtilities.invokeAndWait(runMe);
672       } catch (Exception JavaDoc e) {
673       }
674     } else {
675       runMe.run();
676     }
677
678     return fResponseWrapper.getString();
679
680   }
681
682   /**
683    * This shows a Message window. We include this so that the
684    * MessageProxy can call the method without caring about the actual
685    * implementation of the dialog.
686    */

687   public void showMessageDialog(String JavaDoc message, String JavaDoc title) {
688     JOptionPane.showMessageDialog(this, message, title, JOptionPane.PLAIN_MESSAGE);
689   }
690
691   /**
692    * Gets the PookaUIFactory that should be used by this MessageUI.
693    */

694   public PookaUIFactory getPookaUIFactory() {
695       return Pooka.getUIFactory();
696   }
697
698   /**
699    * Gets the MessageDisplay part.
700    */

701   public ReadMessageDisplayPanel getMessageDisplay() {
702     return messageDisplay;
703   }
704
705   public Action[] defaultActions = {
706     new NextWindowAction(),
707     new PreviousWindowAction()
708       };
709
710   public Action[] getDefaultActions() {
711     return defaultActions;
712   }
713
714
715   /**
716    * Gets the actions for the current component, if any.
717    */

718   public Action[] getActions() {
719     Action[] returnValue = getDefaultActions();
720
721     if (current != null && current.getActions() != null) {
722       returnValue = javax.swing.text.TextAction.augmentList(returnValue, current.getActions());
723     }
724
725     if (returnValue == null)
726       return messageDisplay.getActions();
727     else {
728       if (messageDisplay.getActions() != null)
729   return javax.swing.text.TextAction.augmentList(returnValue, messageDisplay.getActions());
730       else
731   return returnValue;
732     }
733   }
734
735     /**
736      * Get the default profile for the current component, if any.
737      */

738     public UserProfile getDefaultProfile() {
739   if (current != null)
740       return current.getDefaultProfile();
741   else if (messageDisplay != null)
742       return messageDisplay.getDefaultProfile();
743   else
744       return null;
745     }
746
747     public HashMap JavaDoc getCardTable() {
748   return cardTable;
749     }
750
751     public ListSelectionListener JavaDoc getSelectionListener() {
752   return selectionListener;
753     }
754
755
756   public class NextWindowAction extends AbstractAction {
757     NextWindowAction() {
758       super("window-next");
759     }
760
761     public void actionPerformed(ActionEvent JavaDoc e) {
762       selectFolderDisplay();
763     }
764   }
765
766   public class PreviousWindowAction extends AbstractAction {
767     PreviousWindowAction() {
768       super("window-previous");
769     }
770
771     public void actionPerformed(ActionEvent JavaDoc e) {
772       selectMessageDisplay();
773     }
774   }
775
776
777
778 }
779
780
Popular Tags