src/share/classes/javax/swing/text/rtf/RTFGenerator.java

Print this page

        

*** 94,110 **** static protected CharacterKeywordPair[] textKeywords; static { MagicToken = new Object(); ! Dictionary textKeywordDictionary = RTFReader.textKeywords; ! Enumeration keys = textKeywordDictionary.keys(); Vector<CharacterKeywordPair> tempPairs = new Vector<CharacterKeywordPair>(); while(keys.hasMoreElements()) { CharacterKeywordPair pair = new CharacterKeywordPair(); ! pair.keyword = (String)keys.nextElement(); ! pair.character = ((String)textKeywordDictionary.get(pair.keyword)).charAt(0); tempPairs.addElement(pair); } textKeywords = new CharacterKeywordPair[tempPairs.size()]; tempPairs.copyInto(textKeywords); } --- 94,110 ---- static protected CharacterKeywordPair[] textKeywords; static { MagicToken = new Object(); ! Dictionary<String, String> textKeywordDictionary = RTFReader.textKeywords; ! Enumeration<String> keys = textKeywordDictionary.keys(); Vector<CharacterKeywordPair> tempPairs = new Vector<CharacterKeywordPair>(); while(keys.hasMoreElements()) { CharacterKeywordPair pair = new CharacterKeywordPair(); ! pair.keyword = keys.nextElement(); ! pair.character = textKeywordDictionary.get(pair.keyword).charAt(0); tempPairs.addElement(pair); } textKeywords = new CharacterKeywordPair[tempPairs.size()]; tempPairs.copyInto(textKeywords); }
*** 338,348 **** writeLineBreak(); /* write color table */ if (colorCount > 1) { Color[] sortedColorTable = new Color[colorCount]; ! Enumeration colors = colorTable.keys(); Color color; while(colors.hasMoreElements()) { color = (Color)colors.nextElement(); Integer num = colorTable.get(color); sortedColorTable[num.intValue()] = color; --- 338,348 ---- writeLineBreak(); /* write color table */ if (colorCount > 1) { Color[] sortedColorTable = new Color[colorCount]; ! Enumeration<Object> colors = colorTable.keys(); Color color; while(colors.hasMoreElements()) { color = (Color)colors.nextElement(); Integer num = colorTable.get(color); sortedColorTable[num.intValue()] = color;