Beispiel #1
0
  // Get the size of the full vnmrj frame and set the Login Panel
  // to that size and position.
  public void setDefaultSizePosition() {
    VNMRFrame vnmrFrame = VNMRFrame.getVNMRFrame();
    Dimension size = vnmrFrame.getSize();

    // Save point for later use also
    position = vnmrFrame.getLocationOnScreen();
    AppIF appIF = Util.getAppIF();
    int h = appIF.statusBar.getSize().height;

    // Save width and height for later use also
    width = size.width;
    height = size.height - h;

    // Go ahead and set the size and position
    setSize(width, height);
    setLocation(position);
  }
Beispiel #2
0
  public LoginBox() {
    super("VnmrJ Login");

    dolayout("", "", "");
    setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
    // setVast();
    DisplayOptions.addChangeListener(this);

    try {
      InetAddress inetAddress = InetAddress.getLocalHost();
      m_strHostname = inetAddress.getHostName();
    } catch (Exception e) {
      m_strHostname = "localhost";
    }

    VNMRFrame vnmrFrame = VNMRFrame.getVNMRFrame();
    Dimension size = vnmrFrame.getSize();
    position = vnmrFrame.getLocationOnScreen();
    AppIF appIF = Util.getAppIF();
    int h = appIF.statusBar.getSize().height;
    width = size.width;
    height = size.height - h;

    // Allow resizing and use the previous size and position
    // To stop resizing, use setResizable(false);
    readPersistence();

    //        setSize(width, height);
    //        setLocation(position);
    //        setResizable(false);

    setBackgroundColor(Util.getBgColor());

    m_trayTimer =
        new javax.swing.Timer(
            6000,
            new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                setTrays();
              }
            });
  }
Beispiel #3
0
 public ModelessDialog(String title, String helpFile) {
   super(VNMRFrame.getVNMRFrame(), title, false);
   dialogTitle = title;
   initUi();
   m_strHelpFile = helpFile;
 }
Beispiel #4
0
 public ModelessDialog(String title) {
   super(VNMRFrame.getVNMRFrame(), title, false);
   dialogTitle = title;
   initUi();
 }