- Timestamp:
- 2003-10-06T17:55:00+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/AboutDialog.java
r5345 r5589 1 package org.greenstone.gatherer.gui;2 1 /** 3 2 *######################################################################### … … 36 35 *######################################################################## 37 36 */ 37 package org.greenstone.gatherer.gui; 38 38 39 import java.awt.*; 39 40 import java.awt.event.*; … … 42 43 import org.greenstone.gatherer.Gatherer; 43 44 import org.greenstone.gatherer.util.Utility; 45 44 46 /** 45 47 * @author John Thompson, Greenstone Digital Library, University of Waikato … … 48 50 49 51 // RICOH SOURCE CODE PUBLIC LICENSE - http://www.risource.org/RPL/RPL-1.0A.shtml 50 51 52 public class AboutDialog 52 53 extends JDialog { … … 58 59 59 60 public AboutDialog(JFrame parent) { 60 super(parent, get("AboutDialog.Title"), true);61 super(parent, Dictionary.newget("AboutDialog.Title"), true); 61 62 this.self = this; 62 63 setSize(SIZE); … … 68 69 JLabel icon_label = new JLabel(scaled_icon); 69 70 JPanel title_pane = new JPanel(); 70 JLabel title_one_label = new JLabel(get("AboutDialog.Title_One")); 71 JLabel title_two_label = new JLabel(Utility.PROGRAM_NAME + " " + Utility.PROGRAM_VERSION + " " + get("AboutDialog.Date")); 72 JLabel title_three_label = new JLabel(get("AboutDialog.Title_Two")); 73 JLabel copyright_label = new JLabel(get("AboutDialog.Copyright")); 71 JLabel title_one_label = new JLabel(); 72 Dictionary.setText(title_one_label, "AboutDialog.Title_One"); 73 JLabel title_two_label = new JLabel(Utility.PROGRAM_NAME + " " + Utility.PROGRAM_VERSION + " " + Dictionary.newget("AboutDialog.Date")); 74 JLabel title_three_label = new JLabel(); 75 Dictionary.setText(title_three_label, "AboutDialog.Title_Two"); 76 JLabel copyright_label = new JLabel(); 77 Dictionary.setText(copyright_label, "AboutDialog.Copyright"); 78 74 79 JTextArea text = new JTextArea(); 75 80 text.setLineWrap(true); 76 81 text.setWrapStyleWord(true); 82 77 83 JPanel button_pane = new JPanel(); 78 close_button = new JButton(get("General.Close")); 84 close_button = new JButton(); 85 Dictionary.setBoth(close_button, "General.Close", "General.Close_Tooltip"); 79 86 80 87 // Connection … … 104 111 content_pane.add(new JScrollPane(text), BorderLayout.CENTER); 105 112 content_pane.add(button_pane, BorderLayout.SOUTH); 113 106 114 // Build text content 107 text.append( get("AboutDialog.Java_Req"));115 text.append(Dictionary.newget("AboutDialog.Java_Req")); 108 116 text.append("\n"); 109 text.append( get("AboutDialog.Java_Req_One"));117 text.append(Dictionary.newget("AboutDialog.Java_Req_One")); 110 118 text.append("\n"); 111 text.append( get("AboutDialog.Java_Req_Two"));119 text.append(Dictionary.newget("AboutDialog.Java_Req_Two")); 112 120 text.append("\n\n"); 113 text.append("*****" + get("AboutDialog.Acknowledgement") + "*****");121 text.append("*****" + Dictionary.newget("AboutDialog.Acknowledgement") + "*****"); 114 122 text.append("\n\n"); 115 text.append( get("AboutDialog.Item0"));123 text.append(Dictionary.newget("AboutDialog.Item0")); 116 124 text.append("\n\n"); 117 text.append( get("AboutDialog.Item1"));125 text.append(Dictionary.newget("AboutDialog.Item1")); 118 126 text.append("\n\n"); 119 text.append( get("AboutDialog.Item2"));127 text.append(Dictionary.newget("AboutDialog.Item2")); 120 128 text.append("\n\n"); 121 text.append( get("AboutDialog.Item3"));129 text.append(Dictionary.newget("AboutDialog.Item3")); 122 130 text.append("\n\n"); 123 text.append("*****" + get("AboutDialog.Thanks") + "*****");131 text.append("*****" + Dictionary.newget("AboutDialog.Thanks") + "*****"); 124 132 text.append("\n\n"); 125 text.append( get("AboutDialog.Item4"));133 text.append(Dictionary.newget("AboutDialog.Item4")); 126 134 text.append("\n\n"); 127 text.append( get("AboutDialog.Item5"));135 text.append(Dictionary.newget("AboutDialog.Item5")); 128 136 text.append("\n\n"); 129 text.append( get("AboutDialog.Item6"));137 text.append(Dictionary.newget("AboutDialog.Item6")); 130 138 text.append("\n\n"); 131 text.append( get("AboutDialog.Item7"));139 text.append(Dictionary.newget("AboutDialog.Item7")); 132 140 text.append("\n\n"); 133 text.append(get("AboutDialog.Item8")); 134 141 text.append(Dictionary.newget("AboutDialog.Item8")); 135 142 text.setCaretPosition(0); 136 143 … … 148 155 } 149 156 } 150 151 static private String get(String key) {152 if(key.indexOf(".") == -1) {153 key = "AboutDialog." + key;154 }155 return Gatherer.dictionary.get(key);156 }157 157 }
Note:
See TracChangeset
for help on using the changeset viewer.