home *** CD-ROM | disk | FTP | other *** search
-
- package sub_arctic.lib;
-
- import sub_arctic.lib.manager;
-
- /**
- * This class implements a container (parent) object which is limited to
- * no more than one child. This is useful primarily as a base class for
- * more sophisticated containers.
- *
- * @author Scott Hudson
- */
- public class uni_container extends base_interactor {
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Full constructor.
- * @param xv initial x location of the object
- * @param yv initial y location of the object
- * @param wv initial width of the object
- * @param hv initial height of the object
- * @param chld only child of object (can be null)
- */
- public uni_container(int xv, int yv, int wv, int hv, interactor chld)
- {
- super(xv,yv,wv,hv);
- setup_for_fixed_children(1);
- set_child(0,chld);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Constructor with default (temporary) size and no child.
- * @param xv initial x location of the object
- * @param yv initial y location of the object
- */
- public uni_container(int xv, int yv)
- {
- this(xv,yv,73,73,null);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Default constructor. Defaults to location 0,0 a small (temporary)
- * default size, and no child.
- */
- public uni_container()
- {
- this(0,0,73,73,null);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Override add child (since its so commonly used) to mean set_child(0,chld)
- * @param chld the child object which becomes our only child.
- */
- public void add_child(interactor chld)
- {
- set_child(0,chld);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
- }
-
-
- /*=========================== COPYRIGHT NOTICE ===========================
-
- This file is part of the subArctic user interface toolkit.
-
- Copyright (c) 1996 Scott Hudson and Ian Smith
- All rights reserved.
-
- The subArctic system is freely available for most uses under the terms
- and conditions described in
- http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html
- and appearing in full in the lib/interactor.java source file.
-
- The current release and additional information about this software can be
- found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
-
- ========================================================================*/
-