亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rtfgenerator.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
        RTFAttribute attr = words[wordIndex];	if (attr.domain() == domain)	    checkControlWord(currentAttributes, newAttributes, attr);    }}void updateSectionAttributes(MutableAttributeSet current,			     AttributeSet newAttributes,			     boolean emitStyleChanges)    throws IOException{    if (emitStyleChanges) {	Object oldStyle = current.getAttribute("sectionStyle");	Object newStyle = findStyleNumber(newAttributes, Constants.STSection);	if (oldStyle != newStyle) {	    if (oldStyle != null) {		resetSectionAttributes(current);	    }	    if (newStyle != null) {		writeControlWord("ds", ((Integer)newStyle).intValue());		current.addAttribute("sectionStyle", newStyle);	    } else {		current.removeAttribute("sectionStyle");	    }	}    }	    checkControlWords(current, newAttributes,		      RTFAttributes.attributes, RTFAttribute.D_SECTION);}protected void resetSectionAttributes(MutableAttributeSet currentAttributes)    throws IOException{    writeControlWord("sectd");    int wordIndex;    int wordCount = RTFAttributes.attributes.length;    for(wordIndex = 0; wordIndex < wordCount; wordIndex++) {        RTFAttribute attr = RTFAttributes.attributes[wordIndex];	if (attr.domain() == RTFAttribute.D_SECTION)	    attr.setDefault(currentAttributes);    }    currentAttributes.removeAttribute("sectionStyle");}    void updateParagraphAttributes(MutableAttributeSet current,			       AttributeSet newAttributes,			       boolean emitStyleChanges)    throws IOException{    Object parm;    Object oldStyle, newStyle;        /* The only way to get rid of tabs or styles is with the \pard keyword,       emitted by resetParagraphAttributes(). Ideally we should avoid       emitting \pard if the new paragraph's tabs are a superset of the old       paragraph's tabs. */    if (emitStyleChanges) {	oldStyle = current.getAttribute("paragraphStyle");	newStyle = findStyleNumber(newAttributes, Constants.STParagraph);	if (oldStyle != newStyle) {	    if (oldStyle != null) {		resetParagraphAttributes(current);		oldStyle = null;	    }	}    } else {	oldStyle = null;	newStyle = null;    }	    Object oldTabs = current.getAttribute(Constants.Tabs);    Object newTabs = newAttributes.getAttribute(Constants.Tabs);    if (oldTabs != newTabs) {	if (oldTabs != null) {	    resetParagraphAttributes(current);	    oldTabs = null;	    oldStyle = null;	}    }    if (oldStyle != newStyle && newStyle != null) {	writeControlWord("s", ((Integer)newStyle).intValue());	current.addAttribute("paragraphStyle", newStyle);    }    checkControlWords(current, newAttributes,		      RTFAttributes.attributes, RTFAttribute.D_PARAGRAPH);    if (oldTabs != newTabs && newTabs != null) {	TabStop tabs[] = (TabStop[])newTabs;	int index;	for(index = 0; index < tabs.length; index ++) {	    TabStop tab = tabs[index];	    switch (tab.getAlignment()) {	      case TabStop.ALIGN_LEFT:	      case TabStop.ALIGN_BAR:		break;	      case TabStop.ALIGN_RIGHT:		writeControlWord("tqr");		break;	      case TabStop.ALIGN_CENTER:		writeControlWord("tqc");		break;	      case TabStop.ALIGN_DECIMAL:		writeControlWord("tqdec");		break;	    }	    switch (tab.getLeader()) {	      case TabStop.LEAD_NONE:		break;	      case TabStop.LEAD_DOTS:		writeControlWord("tldot");		break;	      case TabStop.LEAD_HYPHENS:		writeControlWord("tlhyph");		break;	      case TabStop.LEAD_UNDERLINE:		writeControlWord("tlul");		break;	      case TabStop.LEAD_THICKLINE:		writeControlWord("tlth");		break;	      case TabStop.LEAD_EQUALS:		writeControlWord("tleq");		break;	    }	    int twips = Math.round(20f * tab.getPosition());	    if (tab.getAlignment() == TabStop.ALIGN_BAR) {		writeControlWord("tb", twips);	    } else {		writeControlWord("tx", twips);	    }	}	current.addAttribute(Constants.Tabs, tabs);    }}public void writeParagraphElement(Element el)    throws IOException{    updateParagraphAttributes(outputAttributes, el.getAttributes(), true);    int sub_count = el.getElementCount();    for(int idx = 0; idx < sub_count; idx ++) {	writeTextElement(el.getElement(idx));    }    writeControlWord("par");    writeLineBreak();  /* makes the raw file more readable */}/* debugging. TODO: remove.private static String tabdump(Object tso){    String buf;    int i;    if (tso == null)	return "[none]";    TabStop[] ts = (TabStop[])tso;    buf = "[";    for(i = 0; i < ts.length; i++) {	buf = buf + ts[i].toString();	if ((i+1) < ts.length)	    buf = buf + ",";    }    return buf + "]";}*/protected void resetParagraphAttributes(MutableAttributeSet currentAttributes)    throws IOException{    writeControlWord("pard");    currentAttributes.addAttribute(StyleConstants.Alignment,       Zero);    int wordIndex;    int wordCount = RTFAttributes.attributes.length;    for(wordIndex = 0; wordIndex < wordCount; wordIndex++) {        RTFAttribute attr = RTFAttributes.attributes[wordIndex];	if (attr.domain() == RTFAttribute.D_PARAGRAPH)	    attr.setDefault(currentAttributes);    }    currentAttributes.removeAttribute("paragraphStyle");    currentAttributes.removeAttribute(Constants.Tabs);}    void updateCharacterAttributes(MutableAttributeSet current,			       AttributeSet newAttributes,			       boolean updateStyleChanges)    throws IOException{    Object parm;    if (updateStyleChanges) {	Object oldStyle = current.getAttribute("characterStyle");	Object newStyle = findStyleNumber(newAttributes,					  Constants.STCharacter);	if (oldStyle != newStyle) {	    if (oldStyle != null) {		resetCharacterAttributes(current);	    }	    if (newStyle != null) {		writeControlWord("cs", ((Integer)newStyle).intValue());		current.addAttribute("characterStyle", newStyle);	    } else {		current.removeAttribute("characterStyle");	    }	}    }    if ((parm = attrDiff(current, newAttributes,			 StyleConstants.FontFamily, null)) != null) {	Number fontNum = (Number)fontTable.get(parm);	writeControlWord("f", fontNum.intValue());    }    checkNumericControlWord(current, newAttributes,			    StyleConstants.FontSize, "fs",			    defaultFontSize, 2f);    checkControlWords(current, newAttributes,		      RTFAttributes.attributes, RTFAttribute.D_CHARACTER);    checkNumericControlWord(current, newAttributes,			    StyleConstants.LineSpacing, "sl",			    0, 20f); /* TODO: sl wackiness */    if ((parm = attrDiff(current, newAttributes,			 StyleConstants.Background, MagicToken)) != null) {	int colorNum;	if (parm == MagicToken)	    colorNum = 0;	else	    colorNum = ((Number)colorTable.get(parm)).intValue();	writeControlWord("cb", colorNum);    }    if ((parm = attrDiff(current, newAttributes,			 StyleConstants.Foreground, null)) != null) {	int colorNum;	if (parm == MagicToken)	    colorNum = 0;	else	    colorNum = ((Number)colorTable.get(parm)).intValue();	writeControlWord("cf", colorNum);    }}protected void resetCharacterAttributes(MutableAttributeSet currentAttributes)    throws IOException{    writeControlWord("plain");    int wordIndex;    int wordCount = RTFAttributes.attributes.length;    for(wordIndex = 0; wordIndex < wordCount; wordIndex++) {        RTFAttribute attr = RTFAttributes.attributes[wordIndex];	if (attr.domain() == RTFAttribute.D_CHARACTER)	    attr.setDefault(currentAttributes);    }    StyleConstants.setFontFamily(currentAttributes, defaultFontFamily);    currentAttributes.removeAttribute(StyleConstants.FontSize); /* =default */    currentAttributes.removeAttribute(StyleConstants.Background);    currentAttributes.removeAttribute(StyleConstants.Foreground);    currentAttributes.removeAttribute(StyleConstants.LineSpacing);    currentAttributes.removeAttribute("characterStyle");}    public void writeTextElement(Element el)    throws IOException{    updateCharacterAttributes(outputAttributes, el.getAttributes(), true);    if (el.isLeaf()) {	try {	    el.getDocument().getText(el.getStartOffset(),				     el.getEndOffset() - el.getStartOffset(),				     this.workingSegment);	} catch (BadLocationException ble) {	    /* TODO is this the correct error to raise? */	    ble.printStackTrace();	    throw new InternalError(ble.getMessage());	}	writeText(this.workingSegment);    } else {	int sub_count = el.getElementCount();	for(int idx = 0; idx < sub_count; idx ++)	    writeTextElement(el.getElement(idx));    }}public void writeText(Segment s)    throws IOException{    int pos, end;    char[] array;    pos = s.offset;    end = pos + s.count;    array = s.array;    for( ; pos < end; pos ++)	writeCharacter(array[pos]);}public void writeText(String s)    throws IOException{    int pos, end;    pos = 0;    end = s.length();    for( ; pos < end; pos ++)	writeCharacter(s.charAt(pos));}public void writeRawString(String str)    throws IOException{    int strlen = str.length();    for (int offset = 0; offset < strlen; offset ++)	outputStream.write((int)str.charAt(offset));}public void writeControlWord(String keyword)    throws IOException{    outputStream.write('\\');    writeRawString(keyword);    afterKeyword = true;}public void writeControlWord(String keyword, int arg)    throws IOException{    outputStream.write('\\');    writeRawString(keyword);    writeRawString(String.valueOf(arg)); /* TODO: correct in all cases? */    afterKeyword = true;}    public void writeBegingroup()    throws IOException{    outputStream.write('{');    afterKeyword = false;}public void writeEndgroup()    throws IOException{    outputStream.write('}');    afterKeyword = false;}public void writeCharacter(char ch)    throws IOException{    /* Nonbreaking space is in most RTF encodings, but the keyword is       preferable; same goes for tabs */    if (ch == 0xA0) { /* nonbreaking space */        outputStream.write(0x5C);  /* backslash */	outputStream.write(0x7E);  /* tilde */	afterKeyword = false; /* non-alpha keywords are self-terminating */	return;    }    if (ch == 0x09) { /* horizontal tab */	writeControlWord("tab");	return;    }    if (ch == 10 || ch == 13) { /* newline / paragraph */	/* ignore CRs, we'll write a paragraph element soon enough */	return;    }    int b = convertCharacter(outputConversion, ch);    if (b == 0) {        /* Unicode characters which have corresponding RTF keywords */        int i;	for(i = 0; i < textKeywords.length; i++) {	    if (textKeywords[i].character == ch) {	        writeControlWord(textKeywords[i].keyword);		return;	    }	}        /* In some cases it would be reasonable to check to see if the	   glyph being written out is in the Symbol encoding, and if so,	   to switch to the Symbol font for this character. TODO. */        /* Currently all unrepresentable characters are written as	   Unicode escapes. */        String approximation = approximationForUnicode(ch);	if (approximation.length() != unicodeCount) {	    unicodeCount = approximation.length();	    writeControlWord("uc", unicodeCount);	}	writeControlWord("u", (int)ch);	writeRawString(" ");	writeRawString(approximation);	afterKeyword = false;        return;    }    if (b > 127) {	int nybble;        outputStream.write('\\');	outputStream.write('\'');	nybble = ( b & 0xF0 ) >>> 4;	outputStream.write(hexdigits[nybble]);	nybble = ( b & 0x0F );	outputStream.write(hexdigits[nybble]);	afterKeyword = false;	return;    }    switch (b) {    case '}':    case '{':    case '\\':        outputStream.write(0x5C);  /* backslash */	afterKeyword = false;  /* in a keyword, actually ... */        /* fall through */    default:	if (afterKeyword) {            outputStream.write(0x20);  /* space */	    afterKeyword = false;	}        outputStream.write(b);        break;    }}String approximationForUnicode(char ch){    /* TODO: Find reasonable approximations for all Unicode characters       in all RTF code pages... heh, heh... */    return "?";}    /** Takes a translation table (a 256-element array of characters) * and creates an output conversion table for use by  * convertCharacter(). */    /* Not very efficient at all. Could be changed to sort the table       for binary search. TODO. (Even though this is inefficient however,       writing RTF is still much faster than reading it.) */static int[] outputConversionFromTranslationTable(char[] table){    int[] conversion = new int[2 * table.length];    int index;    for(index = 0; index < table.length; index ++) {        conversion[index * 2] = table[index];	conversion[(index * 2) + 1] = index;    }    return conversion;}    static int[] outputConversionForName(String name)    throws IOException{    char[] table = (char[])RTFReader.getCharacterSet(name);    return outputConversionFromTranslationTable(table);}/** Takes a char and a conversion table (an int[] in the current * implementation, but conversion tables should be treated as an opaque * type) and returns the * corresponding byte value (as an int, since bytes are signed). */    /* Not very efficient. TODO. */static protected int convertCharacter(int[] conversion, char ch){   int index;   for(index = 0; index < conversion.length; index += 2) {       if(conversion[index] == ch)	   return conversion[index + 1];   }   return 0;  /* 0 indicates an unrepresentable character */}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一区在线| 2021中文字幕一区亚洲| 精品国产露脸精彩对白| 日本一区免费视频| 亚洲综合成人在线视频| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 欧美韩日一区二区三区四区| 亚洲国产成人va在线观看天堂| 91成人免费电影| 欧美一级免费大片| 欧美三级电影一区| 中文字幕一区在线观看视频| 欧美日韩一区小说| 色综合天天综合在线视频| 久久99精品久久久久久| 亚洲一区二区成人在线观看| 欧美国产成人精品| 精品剧情在线观看| 蜜桃久久av一区| 亚洲裸体在线观看| 亚洲国产精品99久久久久久久久| 欧美二区三区91| 欧美日韩高清不卡| 色八戒一区二区三区| 91在线观看免费视频| 国产一区二区三区四区五区入口| 欧美嫩在线观看| 国产真实乱偷精品视频免| 一区二区三区精密机械公司| 精品国产网站在线观看| 色婷婷国产精品| 亚洲小少妇裸体bbw| 国产91精品久久久久久久网曝门| 欧美日韩高清在线| 亚洲自拍偷拍网站| 久久久三级国产网站| 精久久久久久久久久久| 中文一区在线播放| 欧美一级xxx| 在线观看亚洲专区| 91丨porny丨蝌蚪视频| 成人性生交大片免费看视频在线| 免费在线视频一区| 天堂蜜桃一区二区三区| 国产精品色婷婷久久58| 久久精品欧美日韩| 精品乱码亚洲一区二区不卡| 欧美老肥妇做.爰bbww| 欧美美女一区二区在线观看| 欧美综合一区二区| 91福利资源站| 欧美美女直播网站| 欧美日韩亚洲国产综合| 欧美精品粉嫩高潮一区二区| 欧美色国产精品| 欧美日韩大陆在线| 欧美xxxxxxxxx| 国产视频视频一区| ●精品国产综合乱码久久久久 | 日韩亚洲电影在线| 香蕉久久夜色精品国产使用方法| 久久伊人中文字幕| 在线日韩国产精品| 欧美一区二区在线免费播放| 成人综合在线观看| 91丝袜国产在线播放| 91美女视频网站| 91国偷自产一区二区开放时间| 高清av一区二区| 精品一区二区日韩| 国产精品妹子av| 麻豆一区二区三| 亚洲一区二区在线免费观看视频 | 亚洲精品免费电影| 午夜精品国产更新| 国产精品综合av一区二区国产馆| 高清日韩电视剧大全免费| 欧洲国产伦久久久久久久| 日韩一级精品视频在线观看| 欧美高清在线精品一区| 悠悠色在线精品| 国产一区二区三区不卡在线观看 | 午夜一区二区三区在线观看| 六月丁香婷婷色狠狠久久| 色综合久久久久| 久久亚洲一级片| 天堂久久一区二区三区| thepron国产精品| 欧美一区二区三区四区久久| 亚洲国产精品精华液ab| 精品一区二区精品| 欧美又粗又大又爽| 国产精品久久久久aaaa樱花 | 91精品国产综合久久精品| 亚洲男同1069视频| 成人午夜激情片| 国产亚洲精品资源在线26u| 免费在线视频一区| 欧美巨大另类极品videosbest | 久久婷婷久久一区二区三区| 日本一不卡视频| 日本二三区不卡| 亚洲第一福利视频在线| 欧美日本韩国一区二区三区视频 | 久久蜜桃av一区二区天堂| 日韩激情在线观看| 日本一区二区电影| 看电影不卡的网站| 欧美日韩国产高清一区| 午夜久久久影院| 欧美一区二区在线视频| 精品在线一区二区| 欧美激情自拍偷拍| 懂色一区二区三区免费观看| 亚洲人成影院在线观看| 欧美日韩成人在线一区| 精品一区二区三区免费视频| 国产欧美一区二区精品仙草咪| 国产成人精品午夜视频免费| 玉足女爽爽91| 精品日韩一区二区| 99re成人精品视频| 美女高潮久久久| 亚洲视频免费观看| 欧美一区二区福利视频| 不卡影院免费观看| 麻豆成人综合网| **性色生活片久久毛片| 精品久久久影院| 欧美无砖砖区免费| 激情国产一区二区 | 亚洲精品一区二区三区在线观看| 成人免费看片app下载| 无码av免费一区二区三区试看| 久久精品视频一区二区| 欧美一区二区三区性视频| 国产成人在线视频免费播放| 日本中文字幕一区二区视频| 国产精品国产三级国产普通话99| 欧美日本在线看| 色老头久久综合| caoporn国产一区二区| 国产夫妻精品视频| 伊人一区二区三区| 丁香六月综合激情| 成人午夜在线视频| 国产成人综合在线观看| 亚洲美腿欧美偷拍| 日韩欧美国产1| 欧美日韩中字一区| 国产激情一区二区三区| 日韩电影在线一区二区三区| 一区二区在线观看视频| 国产精品美日韩| 国产精品免费观看视频| 欧美乱妇15p| 欧美日韩大陆在线| 5858s免费视频成人| 精品国产一区二区国模嫣然| 欧美精品一区二区三区蜜臀| 久久精品一区二区| 综合久久给合久久狠狠狠97色 | 蜜臀av一区二区| 国产成人免费视频网站高清观看视频| 国产成人一区在线| 91蝌蚪porny| 日韩欧美成人一区| 国产精品女主播在线观看| 亚洲午夜精品在线| 久久99精品网久久| 91豆麻精品91久久久久久| 日韩精品一区二区三区中文不卡 | 欧美国产精品专区| 亚洲午夜在线观看视频在线| 国产一区二区伦理| 欧美在线一二三四区| 国产亚洲一区二区三区在线观看| 亚洲欧美日韩电影| 国产一区二区三区免费观看| 欧美少妇bbb| 136国产福利精品导航| 久久精品99国产国产精| 欧美色图片你懂的| 亚洲欧美成aⅴ人在线观看| 国产精一区二区三区| 91精品欧美一区二区三区综合在| 日本一区二区动态图| 国产精品一区免费在线观看| 欧美亚洲综合另类| 亚洲国产精品视频| 色综合久久综合| 亚洲精品国产无套在线观| 国产v综合v亚洲欧| 中文字幕二三区不卡| 国产成人亚洲精品青草天美| 精品国产网站在线观看| 麻豆国产精品一区二区三区| 欧美一区二区在线视频| 免费成人美女在线观看| 欧美一级一区二区|