78 |
/** The applet stub for this applet. */ |
/** The applet stub for this applet. */ |
79 |
private transient AppletStub stub; |
private transient AppletStub stub; |
80 |
|
|
81 |
|
/** Some applets call setSize in their constructors. In that case, |
82 |
|
these fields are used to store width and height values until a |
83 |
|
stub is set. */ |
84 |
|
private transient int width; |
85 |
|
private transient int height; |
86 |
|
|
87 |
/** |
/** |
88 |
* The accessibility context for this applet. |
* The accessibility context for this applet. |
89 |
* |
* |
113 |
public final void setStub(AppletStub stub) |
public final void setStub(AppletStub stub) |
114 |
{ |
{ |
115 |
this.stub = stub; |
this.stub = stub; |
116 |
|
|
117 |
|
if (width != 0 && height != 0) |
118 |
|
stub.appletResize (width, height); |
119 |
} |
} |
120 |
|
|
121 |
/** |
/** |
183 |
*/ |
*/ |
184 |
public void resize(int width, int height) |
public void resize(int width, int height) |
185 |
{ |
{ |
186 |
stub.appletResize(width, height); |
if (stub == null) |
187 |
|
{ |
188 |
|
this.width = width; |
189 |
|
this.height = height; |
190 |
|
} |
191 |
|
else |
192 |
|
stub.appletResize(width, height); |
193 |
} |
} |
194 |
|
|
195 |
/** |
/** |