Changeset 4418
- Timestamp:
- 2003-05-30T12:25:22+12:00 (21 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/msm/ExportMDSPrompt.java
r4365 r4418 45 45 import org.greenstone.gatherer.msm.MetadataSetManager; 46 46 import org.greenstone.gatherer.util.Utility; 47 import org.greenstone.gatherer.gui.SimpleMenuBar; 48 import org.greenstone.gatherer.gui.ModalDialog; 49 47 50 /** A GUI component for allowing the user to export a metadata set, based on certain conditions, and to a certain file (not necessarily a .mds file). 48 51 * @author John Thompson, Greenstone Digital Library, University of Waikato … … 50 53 */ 51 54 final public class ExportMDSPrompt 52 extends JDialog55 extends ModalDialog 53 56 implements ActionListener, KeyListener { 54 57 /** Is this an export prompt or an import one? */ … … 77 80 private MetadataSetManager manager; 78 81 /** The default size for this dialog window. */ 79 final static public Dimension EXPORT_SIZE = new Dimension(500,2 20);82 final static public Dimension EXPORT_SIZE = new Dimension(500,245); 80 83 /** The default size for this dialog window. */ 81 final static public Dimension IMPORT_SIZE = new Dimension(500,1 20);84 final static public Dimension IMPORT_SIZE = new Dimension(500,145); 82 85 /** The default export action (there are several depending on how much information you wish to export). */ 83 86 final static public int EXPORT = 0; … … 88 91 */ 89 92 public ExportMDSPrompt(MetadataSetManager manager, boolean export) { 90 super( );93 super(Gatherer.g_man); 91 94 this.export = export; 92 95 // Creation … … 95 98 setSize(EXPORT_SIZE); 96 99 setTitle(get("Export_Title")); 100 setJMenuBar(new SimpleMenuBar("0")); // need to find an appropriate help page to open at 97 101 } 98 102 else { 99 103 setSize(IMPORT_SIZE); 100 104 setTitle(get("Import_Title")); 105 setJMenuBar(new SimpleMenuBar("0")); // need to find an appropriate help page to open at 101 106 } 102 107 JPanel content_pane = (JPanel) getContentPane(); … … 206 211 */ 207 212 public int display() { 208 s how();213 setVisible(true); 209 214 return action; 210 215 } -
trunk/gli/src/org/greenstone/gatherer/sarm/SearchAndReplace.java
r4364 r4418 55 55 import org.greenstone.gatherer.valuetree.GValueModel; 56 56 import org.greenstone.gatherer.valuetree.GValueNode; 57 import org.greenstone.gatherer.gui.SimpleMenuBar; 58 import org.greenstone.gatherer.gui.ModalDialog; 57 59 /** Provides a convenient class which searches through all of the various data attached to a collection, globally searching and replacing values as necessary, and firing the relevant events to have the gui update properly. 58 60 * @author John Thompson, Greenstone Digital Library, University of Waikato … … 60 62 */ 61 63 public class SearchAndReplace 62 extends JDialog {64 extends ModalDialog { 63 65 /** <i>true</i> if this dialog should allow for the replace and replace all buttons to be validated, <i>false</i> otherwise. */ 64 66 private boolean enable_replace = false; … … 124 126 static final private Dimension LABEL_SIZE = new Dimension(120, 30); 125 127 /** The default size for the dialog. */ 126 static final private Dimension SIZE = new Dimension(640,2 10);128 static final private Dimension SIZE = new Dimension(640,235); 127 129 /** Constructor. 128 130 * @param enable_replace <i>true</i> if this dialog can be used for replace actions, <i>false</i> otherwise. 129 131 */ 130 132 public SearchAndReplace(boolean enable_replace) { 131 super( );133 super(Gatherer.g_man); 132 134 ///ystem.err.println("Creating a new search and replace dialog."); 133 135 this.enable_replace = enable_replace; … … 137 139 setSize(SIZE); 138 140 setTitle(get("Title")); 141 setJMenuBar(new SimpleMenuBar("10.1")); 139 142 JPanel content_pane = (JPanel) getContentPane(); 140 143 … … 278 281 // Restore visual position. 279 282 setLocation((screen_size.width - SIZE.width) / 2, (screen_size.height - SIZE.height) / 2); 280 s how();283 setVisible(true); 281 284 } 282 285 /** Updates the status bar to reflect the result of the latest action. Includes the ability to reset the status label whenever the find() state resets.
Note:
See TracChangeset
for help on using the changeset viewer.