1   
2   
3   
4   package org.sirius.client.web.classes;
5   
6   import java.rmi.RemoteException;
7   
8   import org.sirius.client.web.WebClient;
9   import org.sirius.client.web.core.Dimension;
10  import org.sirius.client.web.core.Point;
11  
12  
13  
14  
15  
16  public class Frame {
17  
18      
19  
20  
21      private WebClient client  = null;
22  
23      
24  
25  
26      private String    locator = "";
27  
28      
29  
30  
31      public final WebClient getClient() {
32          return client;
33      }
34  
35      
36  
37  
38      public final void setClient(final WebClient clientValue) {
39          this.client = clientValue;
40      }
41  
42      
43  
44  
45      public final void setLocator(final String locatorValue) {
46          this.locator = locatorValue;
47      }
48  
49      
50  
51  
52  
53  
54      public Frame(final WebClient clientValue, final String locatorValue) {
55          this.client = clientValue;
56          this.locator = locatorValue;
57      }
58  
59      
60  
61  
62  
63      public final boolean exists() {
64          return false;
65      }
66  
67      
68  
69  
70  
71  
72      public final Point getLocation() throws RemoteException {
73          return this.client.core().getLocation(null, locator);
74      }
75  
76      
77  
78  
79  
80      public final String getLocator() {
81          return this.locator;
82      }
83  
84      
85  
86  
87  
88  
89      public final Dimension getSize() throws RemoteException {
90          return this.client.core().getSize(null, locator);
91      }
92  
93      
94  
95  
96  
97  
98      public final String getURL() throws RemoteException {
99          return this.client.core().getURL();
100     }
101 
102     
103 
104 
105 
106 
107     public final String innerHtml() throws RemoteException {
108         return this.client.core().getAttribute(null, locator, "innerHTML");
109     }
110 
111     
112 
113 
114 
115 
116     public final void switchTo(final Frame frame) throws RemoteException {
117         this.client.core().selectFrameByName(frame.getLocator());
118     }
119 }