Ignore:
Timestamp:
2006-01-13T14:28:56+13:00 (18 years ago)
Author:
kjdon
Message:

removed instructions, changed title to be the same string as in the contents, and use a new class DesignPaneHeader to create teh header which has title and help button

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java

    r10421 r11031  
    3737import org.greenstone.gatherer.Dictionary;
    3838import org.greenstone.gatherer.Gatherer;
     39import org.greenstone.gatherer.gui.DesignPaneHeader;
    3940import org.greenstone.gatherer.gui.GLIButton;
    4041import org.greenstone.gatherer.metadata.MetadataElement;
     
    252253    private JComboBox variable_combobox;
    253254    private JList format_list;
    254     private JTextArea instructions_textarea;
    255255    private JTextArea editor_textarea;
    256256    private JPanel blank_pane;
     
    268268
    269269        // Create
    270         JPanel instructions_pane = new JPanel();
    271         JLabel title_label = new JLabel();
    272         title_label.setHorizontalAlignment(JLabel.CENTER);
    273         title_label.setOpaque(true);
    274         Dictionary.registerText(title_label, "CDM.FormatManager.Title");
    275 
    276         instructions_textarea = new JTextArea();
    277         instructions_textarea.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
    278         instructions_textarea.setEditable(false);
    279         instructions_textarea.setLineWrap(true);
    280         instructions_textarea.setRows(6);
    281         instructions_textarea.setWrapStyleWord(true);
    282         Dictionary.registerText(instructions_textarea, "CDM.FormatManager.Instructions");
     270        JPanel header_pane = new DesignPaneHeader("CDM.GUI.Formats", "formatstatements");
    283271
    284272        JLabel format_label = new JLabel();
     
    371359
    372360        // Layout
    373         instructions_pane.setLayout(new BorderLayout());
    374         instructions_pane.add(title_label, BorderLayout.NORTH);
    375         instructions_pane.add(new JScrollPane(instructions_textarea), BorderLayout.CENTER);
    376         instructions_pane.add(format_label, BorderLayout.SOUTH);
    377 
    378361        feature_pane.setLayout(new BorderLayout(5,0));
    379362        feature_pane.add(feature_label, BorderLayout.WEST);
     
    428411        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    429412        setLayout(new BorderLayout());
    430         add(instructions_pane, BorderLayout.NORTH);
     413        add(header_pane, BorderLayout.NORTH);
    431414        add(new JScrollPane(format_list), BorderLayout.CENTER);
    432415        add(center_pane, BorderLayout.SOUTH);
     
    450433        feature_combobox.setSelectedItem(selected_object);
    451434        selected_object = null;
    452         if(instructions_textarea != null) {
    453             instructions_textarea.setCaretPosition(0);
    454         }
    455435        }   
    456436    }
Note: See TracChangeset for help on using the changeset viewer.