Changeset 4427
- Timestamp:
- 2003-05-30T14:06:18+12:00 (21 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/EditorDialog.java
r4367 r4427 40 40 import javax.swing.*; 41 41 import org.greenstone.gatherer.Gatherer; 42 import org.greenstone.gatherer.gui.SimpleMenuBar; 43 import org.greenstone.gatherer.gui.ModalDialog; 44 42 45 /** A class that extends a JDialog into a editor for editing large block of text for the metadata value. 43 46 * @author John Thompson, Greenstone Digital Library, University of Waikato … … 45 48 */ 46 49 final public class EditorDialog 47 extends JDialog50 extends ModalDialog 48 51 implements ActionListener { 49 52 /** The cancel, and I don't want the text I've typed, button. */ … … 56 59 private String result = null; 57 60 /** The size of the edit pop-up. */ 58 final static private Dimension SIZE = new Dimension(400,4 00);61 final static private Dimension SIZE = new Dimension(400,425); 59 62 /** Constructor.*/ 60 63 public EditorDialog() { 64 super(Gatherer.g_man); 65 61 66 } 62 67 /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we generate a pop-up window to edit in. … … 77 82 setSize(SIZE); 78 83 setTitle(Gatherer.dictionary.get("General.Edit")); 84 setJMenuBar(new SimpleMenuBar("6.1")); 79 85 // Create 80 86 cancel = new JButton(Gatherer.dictionary.get("General.Cancel")); … … 101 107 Dimension screen_size = Gatherer.config.screen_size; 102 108 setLocation((screen_size.width - SIZE.width) / 2, (screen_size.height - SIZE.height) / 2); 103 s how();109 setVisible(true); 104 110 return result; 105 111 } -
trunk/gli/src/org/greenstone/gatherer/gui/FileAssociationDialog.java
r4367 r4427 46 46 import org.greenstone.gatherer.util.Utility; 47 47 import org.outerj.pollo.util.*; 48 import org.greenstone.gatherer.gui.SimpleMenuBar; 49 import org.greenstone.gatherer.gui.ModalDialog; 50 48 51 /** The file association allows the entry of new file associations and the modification of existing ones. This is done via a list of known extensions, and two fields to fill out relevant details. 49 52 * @author John Thompson, Greenstone Digital Library, University of Waikato … … 51 54 */ 52 55 public class FileAssociationDialog 53 extends JDialog {56 extends ModalDialog { 54 57 /** <i>true</i> iff this addition action been cancelled by the user. */ 55 58 private boolean cancelled = false; … … 77 80 static final private Dimension LABEL_SIZE = new Dimension(150, 25); 78 81 /** The default size for the dialog. */ 79 static final private Dimension SIZE = new Dimension(600, 1 50);82 static final private Dimension SIZE = new Dimension(600, 175); 80 83 /** Create a new file association dialog. 81 84 * @param manager A reference to the <strong>FileAssociationManager</strong> so we can determine what extensions are already associated. … … 92 95 setSize(SIZE); 93 96 setTitle(get("Title")); 97 setJMenuBar(new SimpleMenuBar("0"));// need to find an appropriate help page 94 98 JPanel content_pane = (JPanel) getContentPane(); 95 99 content_pane.setBackground(Gatherer.config.getColor("coloring.collection_heading_background", false)); … … 181 185 182 186 } 183 s how();187 setVisible(true); 184 188 if(save_required) { 185 189 manager.setCommand((String)extension.getSelectedItem(), (String)command.getText()); -
trunk/gli/src/org/greenstone/gatherer/gui/LockFileDialog.java
r4367 r4427 10 10 import org.greenstone.gatherer.msm.MSMUtils; 11 11 import org.greenstone.gatherer.util.Utility; 12 import org.greenstone.gatherer.gui.SimpleMenuBar; 13 import org.greenstone.gatherer.gui.ModalDialog; 12 14 import org.w3c.dom.*; 13 15 14 16 public class LockFileDialog 15 extends JDialog {17 extends ModalDialog { 16 18 17 19 private int choice; … … 25 27 26 28 static final private Dimension LABEL_SIZE = new Dimension(100, 25); 27 static final private Dimension SIZE = new Dimension(500, 2 25);29 static final private Dimension SIZE = new Dimension(500, 250); 28 30 static final private int ICON_SIZE = 30; 29 31 … … 31 33 super(parent, get("Title"), true); 32 34 setSize(SIZE); 35 setJMenuBar(new SimpleMenuBar("2.3")); 33 36 this.self = this; 34 37 // Parse the lock file, but do so quietly so that if the XML is poorly formed it doesn't show exception. … … 122 125 123 126 public int getChoice() { 124 s how();127 setVisible(true); 125 128 return choice; 126 129 } … … 151 154 choice = NO_OPTION; 152 155 } 153 self. hide();156 self.setVisible(false); 154 157 self.dispose(); 155 158 } -
trunk/gli/src/org/greenstone/gatherer/gui/MetaEditPrompt.java
r4367 r4427 34 34 import org.greenstone.gatherer.gui.TextFieldLabel; 35 35 import org.greenstone.gatherer.util.Utility; 36 import org.greenstone.gatherer.gui.SimpleMenuBar; 37 import org.greenstone.gatherer.gui.ModalDialog; 38 36 39 /** Displays a dynamic prompt to allow the user to choose how metadata is to be added, updated or removed from target FileNodes. The prompt changes depending on the action requested, the file nodes encountered and the number of file nodes in the selection. */ 37 40 public class MetaEditPrompt 38 extends JDialog41 extends ModalDialog 39 42 implements ActionListener { 40 43 … … 51 54 private JButton update_all; 52 55 static private Dimension LABEL_SIZE = new Dimension(100, 25); 53 static private Dimension SIZE = new Dimension(400, 280);56 static private Dimension SIZE = new Dimension(400, 305); 54 57 // Generic prompt values. 55 58 static public int CONFIRM = 0; … … 76 79 this.setSize(SIZE); 77 80 this.setTitle(get("MetaEditPrompt.Title")); 78 81 this.setJMenuBar(new SimpleMenuBar("6.3")); 79 82 // Creation 80 83 JPanel content_pane = (JPanel)this.getContentPane(); … … 213 216 214 217 public int display() { 215 s how();218 setVisible(true); 216 219 return value; 217 220 }
Note:
See TracChangeset
for help on using the changeset viewer.