Changeset 29012

Show
Ignore:
Timestamp:
30.04.2014 20:03:13 (5 years ago)
Author:
ak19
Message:

Should use GLIButton instead of regular JButton to be consistent with the rest of GLI and inherit common behaviour

Location:
main/trunk/gli/src/org/greenstone/gatherer/gui
Files:
2 modified

Legend:

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

    r29011 r29012  
    7575    private static final Border EMPTYBORDER = new EmptyBorder(5, 5, 5, 5); 
    7676    private JLabel section_label = null; 
    77     private JButton cancel_button = null; 
    78     private JButton next_button = null; 
    79     private JButton accept_all_button = null; 
    80     private JButton undo_button = null; 
    81     private JButton redo_button = null; 
    82     private JButton htmltidy_button = null; 
    83     private JButton xmltidy_button = null; 
     77    private GLIButton cancel_button = null; 
     78    private GLIButton next_button = null; 
     79    private GLIButton accept_all_button = null; 
     80    private GLIButton undo_button = null; 
     81    private GLIButton redo_button = null; 
     82    private GLIButton htmltidy_button = null; 
     83    private GLIButton xmltidy_button = null; 
    8484    private NumberedJTextArea gs2_textarea = null; 
    8585    private NumberedJTextArea gs3_textarea = null; 
     
    104104    JPanel midbutton_panel = new JPanel(); // FlowLayout by default in a JPanel 
    105105    midbutton_panel.setComponentOrientation(Dictionary.getOrientation()); 
    106     JButton reconvert_button = new JButton(Dictionary.get("FormatConversionDialog.Reconvert")); 
    107     reconvert_button.setToolTipText(Dictionary.get("FormatConversionDialog.Reconvert_Tooltip")); 
     106    JButton reconvert_button = new GLIButton(Dictionary.get("FormatConversionDialog.Reconvert"), Dictionary.get("FormatConversionDialog.Reconvert_Tooltip")); 
    108107    midbutton_panel.add(reconvert_button); 
    109108    reconvert_button.addActionListener(new ReconvertListener()); 
     
    116115    JPanel button1_panel = new JPanel(); 
    117116    button1_panel.setComponentOrientation(Dictionary.getOrientation()); 
    118     undo_button = new JButton(Dictionary.get("General.Undo")); 
     117    undo_button = new GLIButton(Dictionary.get("General.Undo"), Dictionary.get("General.Undo_Tooltip")); 
    119118    undo_button.addActionListener(new UndoListener()); 
    120119    undo_button.setEnabled(false); 
    121120 
    122     redo_button = new JButton(Dictionary.get("General.Redo")); 
     121    redo_button = new GLIButton(Dictionary.get("General.Redo"), Dictionary.get("General.Redo_Tooltip")); 
    123122    redo_button.addActionListener(new RedoListener()); 
    124123    redo_button.setEnabled(false); 
    125124 
    126     xmltidy_button = new JButton(Dictionary.get("FormatConversionDialog.XHTML_Tidy")); 
    127     xmltidy_button.setToolTipText(Dictionary.get("FormatConversionDialog.XHTML_Tidy_Tooltip")); 
     125    xmltidy_button = new GLIButton(Dictionary.get("FormatConversionDialog.XHTML_Tidy"), Dictionary.get("FormatConversionDialog.XHTML_Tidy_Tooltip")); 
    128126    xmltidy_button.addActionListener(new XMLTidyButtonListener()); 
    129127 
     
    135133    button_panel.setComponentOrientation(Dictionary.getOrientation()); 
    136134    count_label = new JLabel("<count>"); // placeholder text for numbers, no need to translate 
    137     cancel_button = new JButton(Dictionary.get("General.Cancel")); 
    138     next_button = new JButton(Dictionary.get("FormatConversionDialog.Next")); 
    139     accept_all_button = new JButton(Dictionary.get("FormatConversionDialog.Accept_All")); 
    140     accept_all_button.setToolTipText(Dictionary.get("FormatConversionDialog.Accept_All_Tooltip")); 
     135    cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("FormatConversionDialog.Cancel_Tooltip")); 
     136    next_button = new GLIButton(Dictionary.get("FormatConversionDialog.Next"), Dictionary.get("FormatConversionDialog.Next_Tooltip")); 
     137    accept_all_button = new GLIButton(Dictionary.get("FormatConversionDialog.Accept_All"), Dictionary.get("FormatConversionDialog.Accept_All_Tooltip")); 
    141138    cancel_button.addActionListener(new CancelButtonListener()); 
    142     cancel_button.setToolTipText(Dictionary.get("FormatConversionDialog.Cancel_Tooltip")); 
    143139    next_button.addActionListener(new NextButtonListener()); 
    144     next_button.setToolTipText(Dictionary.get("FormatConversionDialog.Next_Tooltip")); 
    145140    accept_all_button.addActionListener(new AcceptAllButtonListener()); 
    146141    button_panel.add(cancel_button); 
  • main/trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java

    r29001 r29012  
    443443            // will tell the server that the collect directory has changed and that 
    444444            // the workspace needs to be refreshed (Documents in Greenstone Collections) 
     445 
     446        System.err.print("@@@ User chose to press: "); 
     447        if(result == CANCEL_OPTION) { 
     448        System.err.println("cancel"); 
     449        } else { 
     450        System.err.println("ok"); 
     451        } 
    445452    } 
    446453    }