1 package net.logAnalyzer.gui;
2
3 /***
4 * Defines the view container interface. A view container is used to display
5 * {@link LAView}. Implementation could be a {@link javax.swing.JPanel}, a
6 * {@link javax.swing.JFrame}, a {@link javax.swing.JInternalFrame}...
7 *
8 * @author Karim REFEYTON
9 * @version 0.1
10 */
11 public interface LAViewContainer {
12
13 /***
14 * Returns the parent frame.
15 * @return Parent frame.
16 */
17 LAFrame getFrame();
18
19 /***
20 * Sets the parent frame.
21 * @param frame Parent frame.
22 */
23 void setFrame(LAFrame frame);
24
25 /***
26 * Sets the contained view.
27 * @param view Contained view.
28 * @return Previous contained view if exists; <tt>null</tt> otherwise.
29 */
30 LAView setView(LAView view);
31
32 /***
33 * Called by the contained view when its content is modified.
34 */
35 void viewModified();
36
37 /***
38 * Called by the contained view when the current messages selection has changed.
39 * @param firstIndex First messageLabel index.
40 * @param lastIndex Last messageLabel index.
41 */
42 void messageChanged(int firstIndex, int lastIndex);
43
44 /***
45 * Changes the current messages selection.
46 * @param firstIndex First messageLabel index.
47 * @param lastIndex Last messageLabel index.
48 */
49 void setCurrentMessage(int firstIndex, int lastIndex);
50 }