dangsn
2024-12-26 4e9ff2ce6a830bb2340d7c8612c72eea0c5a553e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.vci.client.logon.client;
 
 
import java.awt.Dimension;
import java.awt.event.WindowEvent;
 
import com.vci.client.ui.image.BundleImage;
import com.vci.client.ui.locale.LocaleDisplay;
import com.vci.client.ui.swing.components.VCIJFrame;
 
public class LogonFrame extends VCIJFrame {
 
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private int iTag = 0;
    private LogonPanel logonPanel = null;
    public static String userName = null;
    public static String groupName = null;
 
    public LogonFrame() {
        try {
             iTag = 0;
             logonPanel = new LogonPanel(this, iTag);
             init();
             pack();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    
    private void init() throws Exception {
        this.setPreferredSize(new Dimension(380, 250));
        
        this.setIconImage ( (new BundleImage().createImageIcon ("logo.png").getImage()));
        this.setResizable (false);
        String msg = LocaleDisplay.getI18nString("rmip.framework.logon.welcome.msg", "RMIPFramework", getLocale());
        this.setTitle (msg);
        getContentPane ().add (logonPanel);
        this.addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(WindowEvent e) {
                logonPanel.setDefaultFocus();
            }
 
            public void windowClosing(WindowEvent e) {
                this_windowClosing(e);
            }
        });
        
    }
 
    private void this_windowClosing (WindowEvent e) {
        if (iTag == 0) {
            System.exit (0);
        } else {
            this.dispose ();
        }
    }
}