+2003-07-22 Tom Tromey <tromey@redhat.com>
+
+ * java/awt/Window.java (getWarningString): Just return the
+ string.
+ (Window): Set warningString; check with security manager.
+
2003-07-22 Scott Gilbertson <scottg@mantatest.com>
* gnu/awt/xlib/XGraphicsConfiguration.java
// FIXME: add to owner's "owned window" list
//owner.owned.add(this); // this should be a weak reference
- /* FIXME: Security check
- SecurityManager.checkTopLevelWindow(...)
- */
+ // FIXME: make this text visible in the window.
+ SecurityManager s = System.getSecurityManager();
+ if (s != null && ! s.checkTopLevelWindow(this))
+ warningString = System.getProperty("awt.appletWarning");
if (gc != null
&& gc.getDevice().getType() != GraphicsDevice.TYPE_RASTER_SCREEN)
*/
public final String getWarningString()
{
- boolean secure = true;
- /* boolean secure = SecurityManager.checkTopLevelWindow(...) */
-
- if (!secure)
- {
- if (warningString != null)
- return warningString;
- else
- {
- String warning = System.getProperty("awt.appletWarning");
- return warning;
- }
- }
- return null;
+ return warningString;
}
/**