FrameShadow.java revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* ident "%Z%%M% %I% %E% SMI"
*
* Copyright (c) 2000 by Sun Microsystems, Inc.
* All rights reserved.
*/
/*
* Copyright (C) 1996 Active Software, Inc.
* All rights reserved.
*
* @(#) @(#) FrameShadow.java 1.65 - last change made 08/11/97
*/
/**
* Wraps an AWT widget. The attributes available for this
* class are listed below. In the type column, type names beginning
* with "sunsoft.jws.visual.rt" have been abbreviated to begin with "rt".
*
* <pre>
name type default value
-----------------------------------------------------------------------
+ background java.awt.Color #c0c0c0
icon rt.type.ImageRef null
menubar rt.type.MenuBarRef null
resizable java.lang.Boolean true
title java.lang.String "Unnamed Frame"
* < /pre>
*
* + = this attribute overrides one inherited from an ancestor class.
* < p>
* Check the super class for additional attributes.
*
* @see Frame
* @version 1.65, 08/11/97
*/
public class FrameShadow extends WindowShadow {
private int cursorCount = 0;
public FrameShadow() {
/* JSTYLED */
NOEDITOR);
/* NOI18N */"sunsoft.jws.visual.rt.type.ImageRef",
null, 0);
/* JSTYLED */
/* NOI18N */"sunsoft.jws.visual.rt.shadow.java.awt.MenuBarShadow",
}
}
return null;
else
} else
}
if (s != null) {
remove(s);
s.destroy();
}
s = (MenuBarShadow)value;
add(s);
s.create();
}
try {
}
catch (VJException ex) {
if (isLive())
/* JSTYLED */
else
throw ex;
}
}
else
}
protected String getUserTypeName() {
return (/* NOI18N */"frame");
}
public void createBody() {
if (!inDesignerRoot())
else {
try {
} catch (InstantiationException ex) {
} catch (IllegalAccessException ex) {
}
}
}
// Overridden AMContainer interfaces
// frames will have a single central child and maybe a menubar
if (child instanceof MenuBarShadow) {
// add the menubar
if (currentMenuBar != null
/* JSTYLED */
throw new Error(Global.fmtMsg("sunsoft.jws.visual.rt.awt.java.awt.FrameShadow.AlreadyHasMenubar", child.get(/* NOI18N */"name")));
} else {
}
} else {
// add a component
} else {
super.addChildBody(child);
}
}
}
}
if ((child instanceof MenuBarShadow)) {
/* JSTYLED */
/* JSTYLED */
throw new Error(Global.fmtMsg("sunsoft.jws.visual.rt.awt.java.awt.FrameShadow.MenubarNotInstalled", child.get(/* NOI18N */"name")));
} else {
// remove the menubar
}
} else {
// remove a component
}
}
}
int incrCursor() {
cursorCount++;
return cursorCount;
}
int decrCursor() {
cursorCount--;
if (cursorCount < 0)
cursorCount = 0;
return cursorCount;
}
void setPrevCursor(int cursor) {
prevCursor = cursor;
}
int getPrevCursor() {
return prevCursor;
}
}