Changeset 4589 for trunk/gli


Ignore:
Timestamp:
2003-06-11T17:29:19+12:00 (21 years ago)
Author:
kjdon
Message:

added stuff for iconcollectionsmall collectionmeta

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
2 edited

Legend:

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

    r4494 r4589  
    171171    /** The collection metadata representing the icon file location of the collection. */
    172172    private CollectionMeta icon_collection_data = null;
     173    /** The collection metadata representing the small icon file location of the collection. */
     174    private CollectionMeta icon_collection_small_data = null;
    173175    /** The default size of label on this control. */
    174176    private Dimension LABEL_SIZE = new Dimension(200,25);
     
    189191    /** The label denoting the icon language (Default). */
    190192    private JLabel icon_collection_language = null;
     193    /** The label denoting the small collection icon area. */
     194    private JLabel icon_collection_small_label = null;
     195    /** The label denoting the small icon language (Default). */
     196    private JLabel icon_collection_small_language = null;
    191197    /** The label which serves as the title of this view. */
    192198    private JLabel title = null;
     
    209215    /** The panel containing the icon area. */
    210216    private JPanel icon_collection_pane = null;
     217    /** A panel used to affect internal layout of the small collection icon area. */
     218    private JPanel icon_collection_small_inner_pane = null;
     219    /** The panel containing the small icon area. */
     220    private JPanel icon_collection_small_pane = null;
    211221    /** A text area used to display the inline help for this manager. */
    212222    private JTextArea instructions = null;
     
    215225    /** The text field used to edit the file name of the collections icon. */
    216226    private JTextField icon_collection = null;
     227    /** The text field used to edit the file name of the collections small icon. */
     228    private JTextField icon_collection_small = null;
    217229    /** A text area used to modify the collection description. */
    218230    private JTextArea collection_extra = null;
     
    229241        collection_name_data = manager.collectionmetadatum.getCollectionName();
    230242        icon_collection_data = manager.collectionmetadatum.getIconCollection();
    231                 // Creation.
     243        icon_collection_small_data = manager.collectionmetadatum.getIconCollectionSmall();
     244        // Creation.
    232245        access = new JCheckBox(get("CDM.General.Access"));
    233246        access.setSelected(manager.public_col);
     
    285298        }
    286299        }
     300        icon_collection_small = new JTextField();
     301        icon_collection_small_inner_pane = new JPanel();
     302        icon_collection_small_label = new JLabel(get("CDM.General.Icon_Collection_Small"));
     303        icon_collection_small_label.setPreferredSize(LABEL_SIZE);
     304        icon_collection_small_language = new JLabel();
     305        icon_collection_small_pane = new JPanel();
     306        if(icon_collection_small_data != null) {
     307        icon_collection_small.setText(icon_collection_small_data.getValue());
     308        Language language = null;
     309        if((language = icon_collection_small_data.getLanguage()) != null) {
     310            icon_collection_small_language.setText(language.toString());
     311        }
     312        else {
     313            icon_collection_small_language.setText(manager.languages.getDefaultLanguage().toString());
     314        }
     315        }
    287316        instructions = new JTextArea(get("CDM.General.Instructions"));
    288317        instructions.setBackground(Gatherer.config.getColor("coloring.collection_tree_background", false));
     
    296325        title.setOpaque(true);
    297326        JPanel upper = new JPanel();
    298                 // Add listeners.
     327        // Add listeners.
    299328        access.addActionListener(new AccessListener());
    300329        beta.addActionListener(new BetaListener());
     
    303332        collection_name.addKeyListener(new CollectionTitleListener());
    304333        icon_collection.addKeyListener(new ChangeListener(icon_collection_data, icon_collection, "iconcollection"));
    305                 // Layout
     334        icon_collection_small.addKeyListener(new ChangeListener(icon_collection_small_data, icon_collection_small, "iconcollectionsmall"));
     335        // Layout
    306336        instructions.setBorder(BorderFactory.createEmptyBorder(2,5,2,5));
    307337
     
    334364        icon_collection_pane.add(icon_collection_inner_pane, BorderLayout.CENTER);
    335365        icon_collection_pane.add(icon_collection_language, BorderLayout.EAST);
     366        // small icon
     367        icon_collection_small_label.setBorder(BorderFactory.createEmptyBorder(0,0,0,5));
     368        icon_collection_small_language.setBorder(BorderFactory.createEmptyBorder(0,5,0,0));
     369
     370        icon_collection_small_inner_pane.setBorder(BorderFactory.createEmptyBorder(5,0,5,0));
     371        icon_collection_small_inner_pane.setLayout(new BorderLayout());
     372        icon_collection_small_inner_pane.add(icon_collection_small, BorderLayout.CENTER);
     373
     374        icon_collection_small_pane.setLayout(new BorderLayout());
     375        icon_collection_small_pane.add(icon_collection_small_label, BorderLayout.WEST);
     376        icon_collection_small_pane.add(icon_collection_small_inner_pane, BorderLayout.CENTER);
     377        icon_collection_small_pane.add(icon_collection_small_language, BorderLayout.EAST);
    336378
    337379        access_pane.add(access);
     
    340382
    341383        lower.setBorder(BorderFactory.createEmptyBorder(0,5,5,5));
    342         lower.setLayout(new GridLayout(6,1));
     384        lower.setLayout(new GridLayout(7,1));
    343385        lower.add(manager.creator.getControls());
    344386        lower.add(manager.maintainer.getControls());
     
    347389        lower.add(collection_name_pane);
    348390        lower.add(icon_collection_pane);
     391        lower.add(icon_collection_small_pane);
    349392
    350393        collection_extra_inner_pane.setLayout(new BorderLayout());
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r4527 r4589  
    7070    static final public String CFG_COLLECTIONMETA_COLLECTIONEXTRA = "collectionmeta collectionextra";
    7171    static final public String CFG_COLLECTIONMETA_ICONCOLLECTION = "collectionmeta iconcollection";
     72    static final public String CFG_COLLECTIONMETA_ICONCOLLECTIONSMALL = "collectionmeta iconcollectionsmall";
    7273    static final public String CFG_CLASSIFY = "classify";
    7374    static final public String CFG_CLASSIFY_BUTTONNAME = "-buttonname";
Note: See TracChangeset for help on using the changeset viewer.