Ignore:
Timestamp:
2003-10-03T14:07:35+12:00 (21 years ago)
Author:
mdewsnip
Message:

Many more small improvements and tooltips added. Still more to come!

File:
1 edited

Legend:

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

    r5527 r5564  
    1 package org.greenstone.gatherer.gui;
    21/**
    32 *#########################################################################
     
    3635 *########################################################################
    3736 */
     37package org.greenstone.gatherer.gui;
     38
    3839import java.awt.*;
    3940import java.awt.event.*;
    4041import javax.swing.*;
     42import org.greenstone.gatherer.Dictionary;
    4143import org.greenstone.gatherer.Gatherer;
    4244import org.greenstone.gatherer.gui.SimpleMenuBar;
     
    6062    /** The size of the edit pop-up. */
    6163    final static private Dimension SIZE = new Dimension(400,425);
    62     /** Constructor.*/
     64
     65    /** Constructor */
    6366    public EditorDialog() {
    6467    super(Gatherer.g_man);
    65    
    6668    }
     69
    6770    /** 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.
    68       * @param event An <strong>ActionEvent</strong> containing information about the event.
    69       */
     71     * @param event An <strong>ActionEvent</strong> containing information about the event.
     72     */
    7073    public void actionPerformed(ActionEvent event) {
    71     if(event.getSource() == ok) {
     74    if (event.getSource() == ok) {
    7275        result = text.getText();
    7376    }
    7477    dispose();
    7578    }
     79
    7680    /** Method to display the editing box on screen.
    77       * @param value The initial text to be displayed in the editing area, as a <strong>String</strong>.
    78       * @return The new value for the metadata value as a <strong>String</strong> or <i>null</i> if the user has pressed cancel.
    79       */
     81     * @param value The initial text to be displayed in the editing area, as a <strong>String</strong>.
     82     * @return The new value for the metadata value as a <strong>String</strong> or <i>null</i> if the user has pressed cancel.
     83     */
    8084    public String display(String value) {
    8185    setModal(true);
    8286    setSize(SIZE);
    83     setTitle(Gatherer.dictionary.get("General.Edit"));
    8487    setJMenuBar(new SimpleMenuBar("theenrichview"));
     88    Dictionary.setText(this, "General.Edit");
     89
    8590    // Create
    86     cancel = new JButton(Gatherer.dictionary.get("General.Cancel"));
    87     ok = new JButton(Gatherer.dictionary.get("General.OK"));
    8891    text = new JTextArea(value);
    8992    text.setCaretPosition(value.length());
     
    9194    text.setLineWrap(true);
    9295    text.setWrapStyleWord(true);
     96    Dictionary.setTooltip(text, "MetaEdit.Value_Field_Tooltip");
     97
     98    cancel = new JButton();
     99    cancel.setMnemonic(KeyEvent.VK_C);
     100    Dictionary.setBoth(cancel, "General.Cancel", "General.Pure_Cancel_Tooltip");
     101    ok = new JButton();
     102    ok.setMnemonic(KeyEvent.VK_0);
     103    Dictionary.setBoth(ok, "General.OK", "General.OK_Tooltip");
     104
    93105    // Listeners
    94106    cancel.addActionListener(this);
    95107    ok.addActionListener(this);
     108
    96109    // Layout
    97110    JPanel button_pane = new JPanel();
Note: See TracChangeset for help on using the changeset viewer.