MainHelper.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.
*
* @(#) MainHelper.java 1.29 - last change made 07/25/97
*/
/**
* Helper class for the generated main class.
*
* @version 1.29, 07/25/97
*/
public class MainHelper {
/**
* The base group
*/
/**
* Name of an external call-out class if there is one.
*/
private String ecoClassName;
/**
* Pointer to an external call-out class if there is one.
*/
private ExternalCallOut eco;
/**
* Checks the version of the runtime.
*/
public void checkVersion(double version) {
"sunsoft.jws.visual.rt.base.MainHelper.NeedRuntimeVersion",
}
}
/**
* Accepts the command line arguments.
* Sets an external class callout
* name if there is one. Registers the remaining
* command line arguments
* with the Global class.
*/
// args that will be registered
// set the class name for use in external callout later
// create a new argument list from the remaining
// cmd line args
int count = 0;
if (j < i || j > i + 1) {
count++;
}
}
break;
}
}
}
return registerArgs;
}
/**
* Called when application is run from the command line.
*/
// Set the base group
// Set the environment information. This must be done before
// initialization.
// Initialize the group
// The top level frame must be set before the group
// is created.
if (win instanceof FrameShadow) {
win.createBody();
} else if (win instanceof DialogShadow) {
// Create a frame for the dialog
// if there are no other frames
f.setSubGroup(baseGroup);
// SGI and Windows have bad defaults for
// font and background
}
}
baseGroup.setTopLevel(f);
f.show();
f.validate();
// Put a frame around the group's panel
// if it is a panel group
// SGI and Windows have bad defaults for
// font and background
}
}
} else {
"sunsoft.jws.visual.rt.base.MainHelper.BaseGroupMustBeNonVis",
group));
}
// Create the group
// This part needs to happen after the group is created
// Window managers get confused when a window is shown with
// zero width and height
}
// Start the group
if (ecoClassName != null) {
}
}
/**
* Called when the applet is loaded.
*/
// Set the base group
// Set the environment information. This must be done before
// initialization.
// Initialize the group
// The top level frame must be set before the
// group is created.
if (win instanceof FrameShadow) {
win.createBody();
} else {
// Figure out the applet's frame
}
// Create the group
// Adjust the font of the panel
// Set up the layout for the Applet panel
GBConstraints c = new GBConstraints();
c.weightx = 1;
c.weighty = 1;
// Add the group panel to the applet
if (panelshadow != null) {
}
// Check for and initialize an external call-out class
if (ecoClassName != null)
}
/**
* Called whenever the applet's page is visited.
*/
public void start() {
}
/**
* Called by the browser when the user leaves the page.
*/
public void stop() {
}
/**
* Called by the browser when the applet should be destroyed.
*/
public void destroy() {
}
/**
* Initializes a call-out to an external class.
* Gives the external
* class a reference to this main's Group object.
*/
try {
}
catch (ClassNotFoundException e) {
"sunsoft.jws.visual.rt.base.MainHelper.ClassNotFound",
name));
}
catch (InstantiationException e) {
"sunsoft.jws.visual.rt.base.MainHelper.InstantiationException",
name));
}
catch (IllegalAccessException e) {
"sunsoft.jws.visual.rt.base.MainHelper.illegalAccess",
name));
}
}
/**
* Starts the external call-out class, if there is one.
*/
private void startExternalCallOut() {
eco.startExternal();
}
/**
* Stops the external call-out class, if there is one.
*/
private void stopExternalCallOut() {
eco.stopExternal();
}
}