Changeset 9096
- Timestamp:
- 2005-02-18T13:34:32+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/ModalProgressPopup.java
r9039 r9096 7 7 * Author: Michael Dewsnip, NZDL Project, University of Waikato, NZ 8 8 * 9 * Copyright (C) 200 4New Zealand Digital Library Project9 * Copyright (C) 2005 New Zealand Digital Library Project 10 10 * 11 11 * This program is free software; you can redistribute it and/or modify … … 38 38 { 39 39 /** The size of the popup */ 40 final static private Dimension SIZE = new Dimension(300, 7 0);40 final static private Dimension SIZE = new Dimension(300, 75); 41 41 42 private JLabel process_label= null;42 private String message = null; 43 43 private JProgressBar progress_bar = null; 44 44 45 45 46 46 /** Constructor */ 47 public ModalProgressPopup(String process_string)47 public ModalProgressPopup(String title, String message) 48 48 { 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; 51 52 } 52 53 … … 56 57 public void display() 57 58 { 59 setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); 58 60 setModal(true); 59 61 setSize(SIZE); … … 65 67 // Layout 66 68 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)); 68 70 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); 71 73 72 74 Dimension screen_size = Configuration.screen_size; … … 74 76 setVisible(true); 75 77 } 76 77 78 public void setProgress(int progress)79 {80 progress_bar.setValue(progress);81 }82 78 }
Note:
See TracChangeset
for help on using the changeset viewer.