Ignore:
Timestamp:
2003-10-06T17:55:00+13:00 (21 years ago)
Author:
mdewsnip
Message:

Nearly finished adding tooltips (and thank goodness for that).

File:
1 edited

Legend:

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

    r5345 r5589  
    1 package org.greenstone.gatherer.gui;
    21/**
    32 *#########################################################################
     
    3635 *########################################################################
    3736 */
     37package org.greenstone.gatherer.gui;
     38
    3839import java.awt.*;
    3940import java.awt.event.*;
     
    4243import org.greenstone.gatherer.Gatherer;
    4344import org.greenstone.gatherer.util.Utility;
     45
    4446/**
    4547 * @author John Thompson, Greenstone Digital Library, University of Waikato
     
    4850
    4951// RICOH SOURCE CODE PUBLIC LICENSE - http://www.risource.org/RPL/RPL-1.0A.shtml
    50 
    5152public class AboutDialog
    5253    extends JDialog {
     
    5859
    5960    public AboutDialog(JFrame parent) {
    60     super(parent, get("AboutDialog.Title"), true);
     61    super(parent, Dictionary.newget("AboutDialog.Title"), true);
    6162    this.self = this;
    6263    setSize(SIZE);
     
    6869    JLabel icon_label = new JLabel(scaled_icon);
    6970    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
    7479    JTextArea text = new JTextArea();
    7580    text.setLineWrap(true);
    7681    text.setWrapStyleWord(true);
     82
    7783    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");
    7986
    8087    // Connection
     
    104111    content_pane.add(new JScrollPane(text), BorderLayout.CENTER);
    105112    content_pane.add(button_pane, BorderLayout.SOUTH);
     113
    106114    // Build text content
    107     text.append(get("AboutDialog.Java_Req"));
     115    text.append(Dictionary.newget("AboutDialog.Java_Req"));
    108116    text.append("\n");
    109     text.append(get("AboutDialog.Java_Req_One"));
     117    text.append(Dictionary.newget("AboutDialog.Java_Req_One"));
    110118    text.append("\n");
    111     text.append(get("AboutDialog.Java_Req_Two"));
     119    text.append(Dictionary.newget("AboutDialog.Java_Req_Two"));
    112120    text.append("\n\n");
    113     text.append("*****" + get("AboutDialog.Acknowledgement") + "*****");
     121    text.append("*****" + Dictionary.newget("AboutDialog.Acknowledgement") + "*****");
    114122    text.append("\n\n");
    115     text.append(get("AboutDialog.Item0"));
     123    text.append(Dictionary.newget("AboutDialog.Item0"));
    116124    text.append("\n\n");
    117     text.append(get("AboutDialog.Item1"));
     125    text.append(Dictionary.newget("AboutDialog.Item1"));
    118126    text.append("\n\n");
    119     text.append(get("AboutDialog.Item2"));
     127    text.append(Dictionary.newget("AboutDialog.Item2"));
    120128    text.append("\n\n");
    121     text.append(get("AboutDialog.Item3"));
     129    text.append(Dictionary.newget("AboutDialog.Item3"));
    122130    text.append("\n\n");
    123     text.append("*****" + get("AboutDialog.Thanks") + "*****");
     131    text.append("*****" + Dictionary.newget("AboutDialog.Thanks") + "*****");
    124132    text.append("\n\n");
    125     text.append(get("AboutDialog.Item4"));
     133    text.append(Dictionary.newget("AboutDialog.Item4"));
    126134    text.append("\n\n");
    127     text.append(get("AboutDialog.Item5"));
     135    text.append(Dictionary.newget("AboutDialog.Item5"));
    128136    text.append("\n\n");
    129     text.append(get("AboutDialog.Item6"));
     137    text.append(Dictionary.newget("AboutDialog.Item6"));
    130138    text.append("\n\n");
    131     text.append(get("AboutDialog.Item7"));
     139    text.append(Dictionary.newget("AboutDialog.Item7"));
    132140    text.append("\n\n");
    133     text.append(get("AboutDialog.Item8"));
    134    
     141    text.append(Dictionary.newget("AboutDialog.Item8"));
    135142    text.setCaretPosition(0);
    136143
     
    148155    }
    149156    }
    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     }
    157157}
Note: See TracChangeset for help on using the changeset viewer.