- /** this method invokes the platform _createSurface() method and then enforces a few post-call invariants */
- protected Surface _createSurface(Box b, boolean framed) { return null; }
- public static Surface createSurface(Box b, boolean framed, boolean refreshable) {
- Surface ret = platform._createSurface(b, framed);
- ret.setInvisible(false);
-
- Object titlebar = b.get("titlebar", true);
- if (titlebar != null) ret.setTitleBarText(titlebar.toString());
-
- /* FIXME
- Object icon = b.get("icon", true);
- if (icon != null && !"".equals(icon)) {
- Picture pic = ImageDecoder.getPicture(icon.toString());
- if (pic != null) ret.setIcon(pic);
- else if (Log.on) Log.log(Platform.class, "unable to load icon " + icon);
- }
- */
-
- ret.setLimits(b.minwidth, b.minheight, b.maxwidth, b.maxheight);
-
- if (refreshable) {
- Surface.allSurfaces.addElement(ret);
- ret.dirty(0, 0, b.width, b.height);
- ret.Refresh();
- }
- return ret;
- }
-