home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-18 | 1.7 KB | 69 lines |
- /*
- * @(#LogonFrame.java
- *
- * Copyright (c) 1997 Symantec Corporation. All Rights Reserved.
- *
- */
-
-
- package symantec.itools.db.awt;
-
- import java.awt.Button;
- import java.awt.Label;
- import java.awt.Font;
- import java.awt.Event;
- import java.util.*;
- import java.sql.*;
- import java.lang.*;
- import java.awt.*;
- import symantec.itools.db.net.*;
- import symantec.itools.db.pro.*;
-
- /**
- * This window gathers the user's name and password for a database.
- * <p>
- * It implements the Logon interface to provide a common logon dialog
- * as needed.
- *
- * @see symantec.itools.db.pro.Logon
- */
- public class LogonFrame extends java.awt.Frame implements Logon
- {
- //{{DECLARE_CONTROLS
- LogonDialog dialog;
- //}}
-
- /**
- * Constructs a LogonFrame. It is hidden by default.
- */
- public LogonFrame()
- {
- hide();
- }
-
- /**
- * Allows the user to try to logon to the database.
- * <p>
- * If this object was registered with the a Session object's LogonHandler, this method will
- * be called when a logon failure has occurred.
- * It creates and displays a LogonDialog for the user.
- *
- * @param conn the current connection info used for logon attempts
- * @param retries the number of logon attempts
- *
- * @return true if should attempt to logon again, false otherwise
- * @see symantec.itools.db.awt.LogonDialog
- */
- public boolean logonFailed(ConnectionInfo conn, int retries)
- {
- dialog = new LogonDialog(this, "User Authentication", conn);
-
- // Allow user input
- dialog.show();
-
- conn = dialog.m_ConnectionInfo;
-
- // Pass the input back to the caller
- return dialog.m_Action;
- }
- }