Changeset 11037 for trunk/gli


Ignore:
Timestamp:
2006-01-16T11:44:24+13:00 (18 years ago)
Author:
mdewsnip
Message:

Added an underline below the pane title, to make it look a little nicer.

File:
1 edited

Legend:

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

    r11032 r11037  
    1212 * <BR><BR>
    1313 *
    14  * Copyright (C) 1999 New Zealand Digital Library Project
     14 * Copyright (C) 2006 New Zealand Digital Library Project
    1515 *
    1616 * <BR><BR>
     
    4646import org.greenstone.gatherer.gui.MenuBar;
    4747
    48 /** creates a header pane containing the title of the screen, and a help button which links to teh appropriate help page */
     48/** creates a header pane containing the title of the screen, and a help button which links to the appropriate help page */
    4949public class DesignPaneHeader
    5050    extends JPanel
    5151{
    5252    protected String help_key_name;
    53    
    54     public DesignPaneHeader(String label_key, String help_key) {
    5553
    56     setLayout(new BorderLayout());
    57     JLabel header_label = new JLabel("<HTML><STRONG><FONT FACE={FONT} COLOR=Black SIZE=5>"+Dictionary.get(label_key)+"</FONT></STRONG></HTML>");
    58    
     54
     55    public DesignPaneHeader(String label_key, String help_key)
     56    {
     57    JLabel title_label = new JLabel("<HTML><STRONG><FONT FACE={FONT} COLOR=Black SIZE=5>" + Dictionary.get(label_key) + "</FONT></STRONG></HTML>");
     58
     59    JPanel title_pane = new JPanel();
     60    title_pane.setBorder(BorderFactory.createEmptyBorder(0,0,0,5));
     61    title_pane.setLayout(new BorderLayout());
     62    title_pane.add(title_label, BorderLayout.CENTER);
     63    title_pane.add(new JSeparator(), BorderLayout.SOUTH);
     64
    5965    JButton help_button = new JButton();
    6066    Dictionary.registerBoth(help_button, "CDM.HelpButton", "CDM.HelpButton_Tooltip");
    6167    this.help_key_name = help_key;
    6268    help_button.setIcon(MenuBar.HELP_ICON);
    63     help_button.addActionListener(new ActionListener ()
     69    help_button.addActionListener(new ActionListener()
    6470        {
    6571        public void actionPerformed(ActionEvent event) {
     
    6773        }
    6874        });
    69     add(header_label, BorderLayout.WEST);
     75
     76    setLayout(new BorderLayout());
     77    add(title_pane, BorderLayout.CENTER);
    7078    add(help_button, BorderLayout.EAST);
    71    
    7279    }
    73 
    7480}
Note: See TracChangeset for help on using the changeset viewer.