home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-11-05 | 3.4 KB | 110 lines |
- // Copyright (c) 1997, 1998 Symantec, Inc. All Rights Reserved.
-
- import java.awt.*;
-
- import symantec.itools.multimedia.ImageViewer;
-
- /**
- * This dialog added to this project by dragging a Dialog form component into the
- * project.
- * It has been customized a small amount by adding an ImageViewer.
- * After customization with Cafe's visual tools, some unneeded code was removed
- * manually (the second constructor and the WindowEvent listening code).
- */
- public class SplashDialog extends Dialog {
-
- /**
- * Constructs this dialog.
- * Initializes components the components.
- * Registers component listeners.
- * All of the code in this routine are automatically generated/maintained
- * by Visual Cafe.
- */
- public SplashDialog(Frame parent, boolean modal)
- {
- super(parent, modal);
-
- // This code is automatically generated by Visual Cafe when you add
- // components to the visual environment. It instantiates and initializes
- // the components. To modify the code, only use code syntax that matches
- // what Visual Cafe can generate, or Visual Cafe may be unable to back
- // parse your Java file into its visual environment.
-
- //{{INIT_CONTROLS
- setLayout(null);
- setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
- setBackground(java.awt.Color.lightGray);
- setSize(419,290);
- setVisible(false);
- try {
- imageViewer1.setImageURL(symantec.itools.net.RelativeURL.getURL("images/wl-splash.jpg"));
- }
- catch (java.net.MalformedURLException error) { }
- catch(java.beans.PropertyVetoException e) { }
- try {
- imageViewer1.setStyle(symantec.itools.multimedia.ImageViewer.IMAGE_NORMAL);
- }
- catch(java.beans.PropertyVetoException e) { }
- add(imageViewer1);
- imageViewer1.setBounds(0,0,419,290);
- setTitle("Web Log Analyzer");
- //}}
-
- //{{REGISTER_LISTENERS
- //}}
-
- // Center this dialog within its parent's bounds
- WLAUtil.centerInParent(this);
- }
-
- /**
- * Constructs this Dialog with the given title.
- * This routine was automatically generated by Visual Cafe, and is not
- * actually used.
- */
- public SplashDialog(Frame parent, String title, boolean modal)
- {
- this(parent, modal);
- setTitle(title);
- }
-
- /**
- * Tells this component that it has been added to a container.
- * This is a standard Java AWT method which gets called by the AWT when
- * this component is added to a container.
- * Typically, it is used to create this component's peer. <br>
- * It has been OVERRIDDEN here to adjust the position of components as needed
- * for the container's insets. <br>
- * This method is automatically generated by Visual Cafe.
- */
- public void addNotify()
- {
- // Record the size of the window prior to calling parents addNotify.
- Dimension d = getSize();
-
- super.addNotify();
-
- if (fComponentsAdjusted)
- return;
-
- // Adjust components according to the insets
- Insets insets = getInsets();
- setSize(insets.left + insets.right + d.width, insets.top + insets.bottom + d.height);
- Component components[] = getComponents();
- for (int i = 0; i < components.length; i++)
- {
- Point p = components[i].getLocation();
- p.translate(insets.left, insets.top);
- components[i].setLocation(p);
- }
- fComponentsAdjusted = true;
- }
-
- //{{DECLARE_CONTROLS
- symantec.itools.multimedia.ImageViewer imageViewer1 = new symantec.itools.multimedia.ImageViewer();
- //}}
-
- // Used for addNotify redundency check.
- boolean fComponentsAdjusted = false;
- }
-