Ignore:
Timestamp:
2003-12-19T14:45:12+13:00 (20 years ago)
Author:
jmt12
Message:

Changed JButtons for GLIButtons, which know whether they should paint their background depending on what platform they are run on, and finished keyboard shortcuts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/mem/MetadataEditorManager.java

    r6215 r6318  
    4949import org.greenstone.gatherer.gui.ComboArea;
    5050import org.greenstone.gatherer.gui.GComboBox;
     51import org.greenstone.gatherer.gui.GLIButton;
    5152import org.greenstone.gatherer.gui.SmarterTable;
    5253import org.greenstone.gatherer.gui.SmarterTree;
     
    313314    JPanel inner_button_pane = new JPanel();
    314315    inner_button_pane.setOpaque(false);
    315     add_attribute = new JButton();
     316    add_attribute = new GLIButton();
     317    add_attribute.setMnemonic(KeyEvent.VK_4);
    316318    Dictionary.setBoth(add_attribute, "MEM.Add", "MEM.Add_Attribute_Tooltip");
    317     add_element = new JButton();
     319    add_element = new GLIButton();
     320    add_element.setMnemonic(KeyEvent.VK_3);
    318321    Dictionary.setBoth(add_element, "MEM.Add", "MEM.Add_Element_Tooltip");
    319     add_file = new JButton();
     322    add_file = new GLIButton();
     323    add_file.setMnemonic(KeyEvent.VK_2);
    320324    Dictionary.setBoth(add_file, "MEM.Add", "MEM.Add_File_Tooltip");
    321     add_set = new JButton();
     325    add_set = new GLIButton();
     326    add_set.setMnemonic(KeyEvent.VK_1);
    322327    Dictionary.setBoth(add_set, "MEM.Add", "MEM.Add_Set_Tooltip");
    323     add_value = new JButton();
     328    add_value = new GLIButton();
     329    add_value.setMnemonic(KeyEvent.VK_5);
    324330    Dictionary.setBoth(add_value, "MEM.Add", "MEM.Add_Value_Tooltip");
    325331
    326     edit_attribute = new JButton();
     332    edit_attribute = new GLIButton();
     333    edit_attribute.setMnemonic(KeyEvent.VK_6);
    327334    Dictionary.setBoth(edit_attribute, "MEM.Edit", "MEM.Edit_Attribute_Tooltip");
    328     edit_value = new JButton();
     335    edit_value = new GLIButton();
     336    edit_value.setMnemonic(KeyEvent.VK_7);
    329337    Dictionary.setBoth(edit_value, "MEM.Edit", "MEM.Edit_Value_Tooltip");
    330338
    331     remove_attribute = new JButton();
     339    remove_attribute = new GLIButton();
     340    remove_attribute.setMnemonic(KeyEvent.VK_MINUS);
    332341    Dictionary.setBoth(remove_attribute, "MEM.Remove", "MEM.Remove_Attribute_Tooltip");
    333     remove_element = new JButton();
     342    remove_element = new GLIButton();
     343    remove_element.setMnemonic(KeyEvent.VK_0);
    334344    Dictionary.setBoth(remove_element, "MEM.Remove", "MEM.Remove_Element_Tooltip");
    335     remove_file = new JButton();
     345    remove_file = new GLIButton();
     346    remove_file.setMnemonic(KeyEvent.VK_9);
    336347    Dictionary.setBoth(remove_file, "MEM.Remove", "MEM.Remove_File_Tooltip");
    337     remove_set = new JButton();
     348    remove_set = new GLIButton();
     349    remove_set.setMnemonic(KeyEvent.VK_8);
    338350    Dictionary.setBoth(remove_set, "MEM.Remove", "MEM.Remove_Set_Tooltip");
    339     remove_value = new JButton();
     351    remove_value = new GLIButton();
     352    remove_value.setMnemonic(KeyEvent.VK_EQUALS);
    340353    Dictionary.setBoth(remove_value, "MEM.Remove", "MEM.Remove_Value_Tooltip");
    341354    setControls(false, false, false, false, false, false, false, false, false, false, false, false);
    342355
    343     close = new JButton();
     356    close = new GLIButton();
     357    close.setMnemonic(KeyEvent.VK_C);
    344358    Dictionary.setBoth(close, "General.Close", "General.Close_Tooltip");
    345359
     
    616630        JPanel button_pane = new JPanel();
    617631        button_pane.setOpaque(false);
    618         ok_button = new JButton();
     632        ok_button = new GLIButton();
     633        ok_button.setMnemonic(KeyEvent.VK_O);
    619634        Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip");
    620         cancel_button = new JButton();
     635        cancel_button = new GLIButton();
     636        cancel_button.setMnemonic(KeyEvent.VK_C);
    621637        Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip");
    622638
     
    10131029        button_pane.setOpaque(false);
    10141030
    1015         ok_button = new JButton();
     1031        ok_button = new GLIButton();
     1032        ok_button.setMnemonic(KeyEvent.VK_O);
    10161033        Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip");
    1017         cancel_button = new JButton();
     1034        cancel_button = new GLIButton();
     1035        cancel_button.setMnemonic(KeyEvent.VK_C);
    10181036        Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip");
    10191037
     
    11501168        button_pane.setOpaque(false);
    11511169
    1152         ok_button = new JButton();
     1170        ok_button = new GLIButton();
     1171        ok_button.setMnemonic(KeyEvent.VK_O);
    11531172        Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip");
    1154         cancel_button = new JButton();
     1173        cancel_button = new GLIButton();
     1174        cancel_button.setMnemonic(KeyEvent.VK_C);
    11551175        Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip");
    11561176
     
    12751295        button_pane.setOpaque(false);
    12761296
    1277         ok_button = new JButton();
     1297        ok_button = new GLIButton();
     1298        ok_button.setMnemonic(KeyEvent.VK_O);
    12781299        Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip");
    1279         cancel_button = new JButton();
     1300        cancel_button = new GLIButton();
     1301        cancel_button.setMnemonic(KeyEvent.VK_C);
    12801302        Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip");
    12811303        TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button);
     
    14041426        button_pane.setOpaque(false);
    14051427
    1406         ok_button = new JButton();
     1428        ok_button = new GLIButton();
     1429        ok_button.setMnemonic(KeyEvent.VK_O);
    14071430        ok_button.setEnabled(false);
    14081431        Dictionary.setBoth(ok_button, "General.OK", "General.OK_Tooltip");
    1409         cancel_button = new JButton();
     1432        cancel_button = new GLIButton();
     1433        cancel_button.setMnemonic(KeyEvent.VK_C);
    14101434        Dictionary.setBoth(cancel_button, "General.Cancel", "General.Pure_Cancel_Tooltip");
    14111435        TextFieldEnabler ok_button_enabler = new TextFieldEnabler(ok_button);
Note: See TracChangeset for help on using the changeset viewer.