Changeset 10421


Ignore:
Timestamp:
2005-08-04T15:49:05+12:00 (19 years ago)
Author:
kjdon
Message:

added DocumentText, DocumentButtons and DocumentHeading default formats. also removed Invisible from the part list

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

Legend:

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

    r9419 r10421  
    4141
    4242    /** The default features (not all of these are in the Greenstone Developer's Guide). */
    43     static final public String DEFAULT_FEATURES[] = { "", "AllowExtendedOptions", "DocumentArrowsBottom", "DocumentArrowsTop", "DocumentButtons", "DocumentContents", "DocumentHeading", "DocumentImages", "DocumentText", "DocumentTitles", "DocumentUseHTML", "RelatedDocuments", "Search" };
     43    static final public String DEFAULT_FEATURES[] = { "", "AllowExtendedOptions", "Document", "DocumentArrowsBottom", "DocumentArrowsTop", "DocumentButtons", "DocumentContents", "DocumentHeading", "DocumentImages", "DocumentText", "DocumentTitles", "DocumentUseHTML", "RelatedDocuments", "Search" };
    4444    /** The list of known feature parts. */
    45     static final public String DEFAULT_PARTS[] = { "", "DateList", "HList", "Invisible", "VList" };
     45    static final public String DEFAULT_PARTS[] = { "", "DateList", "HList", "VList" };
    4646
    4747    /** Only "" and "Search" can have parts */
    4848    static public boolean canHavePart(String name) {
    49     return (name.equalsIgnoreCase("") || name.equalsIgnoreCase("Search"));
     49    return (name.equalsIgnoreCase("") || name.equalsIgnoreCase("Search") || name.equalsIgnoreCase("Document"));
    5050    }
    5151   
  • trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java

    r10345 r10421  
    6060    static final private String VLIST = "VList";
    6161    static final private String VLIST_DEFAULT_FORMAT = "<td valign=top>[link][icon][/link]</td>\n<td valign=top>[ex.srclink]{Or}{[ex.thumbicon],[ex.srcicon]}[ex./srclink]</td>\n<td valign=top>[highlight]\n{Or}{[dls.Title],[dc.Title],[ex.Title],Untitled}\n[/highlight]{If}{[ex.Source],<br><i>([ex.Source])</i>}</td>";
    62     static final private String INVISIBLE = "Invisible";
    63     static final private String INVISIBLE_DEFAULT_FORMAT = "";
    64 
     62    //    static final private String INVISIBLE = "Invisible";
     63    //static final private String INVISIBLE_DEFAULT_FORMAT = "";
     64
     65    static final private String DOCUMENTHEADING = "DocumentHeading";
     66    static final private String DOCUMENTHEADING_DEFAULT_FORMAT = "{Or}{[parent(Top):Title],[Title],untitled}<br>";
     67
     68    static final private String DOCUMENTTEXT = "DocumentText";
     69    static final private String DOCUMENTTEXT_DEFAULT_FORMAT = "<center><table width=_pagewidth_><tr><td>[Text]</td></tr></table></center>";
     70
     71    static final private String DOCUMENTBUTTONS = "DocumentButtons";
     72    static final private String DOCUMENTBUTTONS_DEFAULT_FORMAT = "Detach|Highlight";
     73   
    6574    /** The controls used to edit the format commands. */
    6675    private Control controls = null;
     
    91100        addFormat(new Format("",VLIST,VLIST_DEFAULT_FORMAT));
    92101    }
     102
     103    if (getFormat(DOCUMENTHEADING) == null) {
     104        addFormat(new Format(DOCUMENTHEADING, "", DOCUMENTHEADING_DEFAULT_FORMAT));
     105    }
     106    if (getFormat(DOCUMENTTEXT) == null) {
     107        addFormat(new Format(DOCUMENTTEXT,"",DOCUMENTTEXT_DEFAULT_FORMAT));
     108    }
     109    if (getFormat(DOCUMENTBUTTONS) == null) {
     110        addFormat(new Format(DOCUMENTBUTTONS,"",DOCUMENTBUTTONS_DEFAULT_FORMAT));
     111    }
     112   
    93113    }
    94114
     
    188208    part_model.add(new Part(DATELIST, DATELIST_DEFAULT_FORMAT));
    189209    part_model.add(new Part(HLIST, HLIST_DEFAULT_FORMAT));
    190     part_model.add(new Part(INVISIBLE, INVISIBLE_DEFAULT_FORMAT));
     210    //part_model.add(new Part(INVISIBLE, INVISIBLE_DEFAULT_FORMAT));
    191211    part_model.add(new Part(VLIST, VLIST_DEFAULT_FORMAT));
    192212    return part_model;
     
    533553            if (entry.canHavePart()) {
    534554            part_combobox.setEnabled(true);
    535             part_combobox.setSelectedIndex(4);
     555            part_combobox.setSelectedIndex(part_combobox.getModel().getSize()-1);
    536556
    537557            } else {
Note: See TracChangeset for help on using the changeset viewer.