Changeset 9096


Ignore:
Timestamp:
2005-02-18T13:34:32+13:00 (19 years ago)
Author:
mdewsnip
Message:

Updated dialog to look nice on Windows and be more similar to cdm/ParsingProgress (eventually these should be merged?).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/ModalProgressPopup.java

    r9039 r9096  
    77 * Author: Michael Dewsnip, NZDL Project, University of Waikato, NZ
    88 *
    9  * Copyright (C) 2004 New Zealand Digital Library Project
     9 * Copyright (C) 2005 New Zealand Digital Library Project
    1010 *
    1111 * This program is free software; you can redistribute it and/or modify
     
    3838{
    3939    /** The size of the popup */
    40     final static private Dimension SIZE = new Dimension(300, 70);
     40    final static private Dimension SIZE = new Dimension(300, 75);
    4141
    42     private JLabel process_label = null;
     42    private String message = null;
    4343    private JProgressBar progress_bar = null;
    4444
    4545
    4646    /** Constructor */
    47     public ModalProgressPopup(String process_string)
     47    public ModalProgressPopup(String title, String message)
    4848    {
    49     super(Gatherer.g_man);
    50     this.process_label = new JLabel((process_string != null) ? process_string : "");
     49    super(Gatherer.g_man, title);
     50
     51    this.message = message;
    5152    }
    5253
     
    5657    public void display()
    5758    {
     59    setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    5860    setModal(true);
    5961    setSize(SIZE);
     
    6567    // Layout
    6668    JPanel content_pane = (JPanel) getContentPane();
    67     content_pane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
     69    content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    6870    content_pane.setLayout(new BorderLayout());
    69     content_pane.add(process_label, BorderLayout.CENTER);
    70     content_pane.add(progress_bar, BorderLayout.SOUTH);
     71    content_pane.add(new JLabel(message), BorderLayout.NORTH);
     72    content_pane.add(progress_bar, BorderLayout.CENTER);
    7173
    7274    Dimension screen_size = Configuration.screen_size;
     
    7476    setVisible(true);
    7577    }
    76 
    77 
    78     public void setProgress(int progress)
    79     {
    80     progress_bar.setValue(progress);
    81     }
    8278}
Note: See TracChangeset for help on using the changeset viewer.