Changeset 12816
- Timestamp:
- 2006-09-21T17:02:52+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java
r12815 r12816 75 75 static final private String SEARCHTYPES_DEFAULT_FORMAT = "plain,form"; 76 76 77 static private HashMap format_map = null ;77 static private HashMap default_format_map = null; 78 78 79 79 /** The controls used to edit the format commands. */ … … 88 88 this.model = this; 89 89 90 format_map = new HashMap();91 format_map.put(DATELIST, DATELIST_DEFAULT_FORMAT);92 format_map.put(HLIST, HLIST_DEFAULT_FORMAT);93 format_map.put(VLIST, VLIST_DEFAULT_FORMAT);94 format_map.put(DOCUMENTHEADING, DOCUMENTHEADING_DEFAULT_FORMAT);95 format_map.put(DOCUMENTTEXT, DOCUMENTTEXT_DEFAULT_FORMAT);96 format_map.put(DOCUMENTBUTTONS, DOCUMENTBUTTONS_DEFAULT_FORMAT);97 format_map.put("", "");90 default_format_map = new HashMap(); 91 default_format_map.put(DATELIST, DATELIST_DEFAULT_FORMAT); 92 default_format_map.put(HLIST, HLIST_DEFAULT_FORMAT); 93 default_format_map.put(VLIST, VLIST_DEFAULT_FORMAT); 94 default_format_map.put(DOCUMENTHEADING, DOCUMENTHEADING_DEFAULT_FORMAT); 95 default_format_map.put(DOCUMENTTEXT, DOCUMENTTEXT_DEFAULT_FORMAT); 96 default_format_map.put(DOCUMENTBUTTONS, DOCUMENTBUTTONS_DEFAULT_FORMAT); 97 default_format_map.put("", ""); 98 98 99 99 DebugStream.println("FormatManager: parsed " + getSize() + " format statements."); … … 162 162 } 163 163 } 164 164 165 165 166 private Format getFormat(String name) { … … 687 688 // Initial value 688 689 689 editor_textarea.setText( part.getDefaultFormat());690 editor_textarea.setText((String) default_format_map.get(f.toString())); 690 691 editor_textarea.setCaretPosition(0); 691 692 … … 973 974 // Initial value 974 975 if (pname !=null && pname.length()!=0 ){ 975 editor_textarea.setText((String) format_map.get(pname));976 editor_textarea.setText((String) default_format_map.get(pname)); 976 977 editor_textarea.setCaretPosition(0); 977 978 } 978 979 else{ 979 editor_textarea.setText((String) format_map.get(name));980 editor_textarea.setText((String) default_format_map.get(name)); 980 981 editor_textarea.setCaretPosition(0); 981 982 }
Note:
See TracChangeset
for help on using the changeset viewer.