1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package net.sf.jameleon.plugin.jiffie.util;
21
22 import net.sf.jiffie.InternetExplorer;
23
24 import java.util.Vector;
25
26 /***
27 * This interface defines methods for dealing with multiple open browser windows. It enables to manage the storage of
28 * multiple browser windows (InternetExplorer instances).
29 * todo Implement access to a browser window by it's window title (instead of index only)
30 */
31 public interface BrowserCache {
32
33 public Vector getBrowserCache();
34
35 /***
36 * Add a browser instance to the cache. Usually newly opened browser windows should be added to the cache.
37 * @param ie The browser window that should be added to the cache.
38 */
39 void addBrowser(InternetExplorer ie);
40
41 /***
42 * Remove a browser instance from the cache. This should usually happen on quit of the browser window.
43 * @param ie The browser window that should be removed from the cache.
44 */
45 void removeBrowser(InternetExplorer ie);
46
47 /***
48 * Get the first browser window from the cache. The first instance is usually the "root" of all subsequently opened
49 * browser windows.
50 * @return The first browse window that is in the cache.
51 */
52 public InternetExplorer getFirstBrowser();
53
54 /***
55 * Get the i-th browser window from the cache. If all opened browser windows are added to the cache, it returns the
56 * i-th browser window that has been opened.
57 * @param i The index of the browser window in the cache. This is usually the i-th browser window opened.
58 * @return The i-th browser window.
59 */
60 public InternetExplorer getBrowserAt(int i);
61
62 /***
63 * Get the browser window from the cache with the matching title.
64 * @param title The title of the browser window in the cache.
65 * @return The matching browser window.
66 */
67 public InternetExplorer getBrowserWithTitle(String title);
68 }