当前位置: 首页>>代码示例>>Java>>正文


Java Gutter.setLineNumberColor方法代码示例

本文整理汇总了Java中org.fife.ui.rtextarea.Gutter.setLineNumberColor方法的典型用法代码示例。如果您正苦于以下问题:Java Gutter.setLineNumberColor方法的具体用法?Java Gutter.setLineNumberColor怎么用?Java Gutter.setLineNumberColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.fife.ui.rtextarea.Gutter的用法示例。


在下文中一共展示了Gutter.setLineNumberColor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initWithOddProperties

import org.fife.ui.rtextarea.Gutter; //导入方法依赖的package包/类
/**
 * Initializes a text area and gutter pair with non-standard values for
 * all properties loaded and saved by a <code>Theme</code>.
 *
 * @param textArea The text area to manipulate.
 * @param gutter The gutter to manipulate.
 */
private void initWithOddProperties(RSyntaxTextArea textArea,
		Gutter gutter) {

	Font font = new Font("Dialog", Font.PLAIN, 13);
	textArea.setFont(font);
	textArea.setSyntaxScheme(createSyntaxScheme(font, Color.orange));
	textArea.setBackground(Color.orange);
	textArea.setCaretColor(Color.orange);
	textArea.setUseSelectedTextColor(true);
	textArea.setSelectedTextColor(Color.orange);
	textArea.setSelectionColor(Color.orange);
	textArea.setRoundedSelectionEdges(true);
	textArea.setCurrentLineHighlightColor(Color.orange);
	textArea.setFadeCurrentLineHighlight(true);
	textArea.setMarginLineColor(Color.orange);
	textArea.setMarkAllHighlightColor(Color.pink); // orange is the default (!)
	textArea.setMarkOccurrencesColor(Color.orange);
	textArea.setPaintMarkOccurrencesBorder(!textArea.getPaintMarkOccurrencesBorder());
	textArea.setMatchedBracketBGColor(Color.orange);
	textArea.setMatchedBracketBorderColor(Color.orange);
	textArea.setPaintMatchedBracketPair(!textArea.getPaintMatchedBracketPair());
	textArea.setAnimateBracketMatching(!textArea.getAnimateBracketMatching());
	textArea.setHyperlinkForeground(Color.orange);
	for (int i=0; i<textArea.getSecondaryLanguageCount(); i++) {
		textArea.setSecondaryLanguageBackground(i+1, Color.orange);
	}

	gutter.setBackground(Color.orange);
	gutter.setBorderColor(Color.orange);
	gutter.setActiveLineRangeColor(Color.orange);
	gutter.setIconRowHeaderInheritsGutterBackground(!gutter.getIconRowHeaderInheritsGutterBackground());
	gutter.setLineNumberColor(Color.orange);
	gutter.setLineNumberFont(font);
	gutter.setFoldIndicatorForeground(Color.orange);
	gutter.setFoldBackground(Color.orange);

}
 
开发者ID:curiosag,项目名称:ftc,代码行数:45,代码来源:ThemeTest.java

示例2: apply

import org.fife.ui.rtextarea.Gutter; //导入方法依赖的package包/类
/**
 * Applies this theme to a text area.
 *
 * @param textArea The text area to apply this theme to.
 */
public void apply(RSyntaxTextArea textArea) {

	textArea.setFont(baseFont);
	textArea.setBackground(bgColor);
	textArea.setCaretColor(caretColor);
	textArea.setUseSelectedTextColor(useSelctionFG);
	textArea.setSelectedTextColor(selectionFG);
	textArea.setSelectionColor(selectionBG);
	textArea.setRoundedSelectionEdges(selectionRoundedEdges);
	textArea.setCurrentLineHighlightColor(currentLineHighlight);
	textArea.setFadeCurrentLineHighlight(fadeCurrentLineHighlight);
	textArea.setMarginLineColor(marginLineColor);
	textArea.setMarkAllHighlightColor(markAllHighlightColor);
	textArea.setMarkOccurrencesColor(markOccurrencesColor);
	textArea.setPaintMarkOccurrencesBorder(markOccurrencesBorder);
	textArea.setMatchedBracketBGColor(matchedBracketBG);
	textArea.setMatchedBracketBorderColor(matchedBracketFG);
	textArea.setPaintMatchedBracketPair(matchedBracketHighlightBoth);
	textArea.setAnimateBracketMatching(matchedBracketAnimate);
	textArea.setHyperlinkForeground(hyperlinkFG);

	int count = secondaryLanguages.length;
	for (int i=0; i<count; i++) {
		textArea.setSecondaryLanguageBackground(i+1, secondaryLanguages[i]);
	}

	textArea.setSyntaxScheme(scheme);

	Gutter gutter = RSyntaxUtilities.getGutter(textArea);
	if (gutter!=null) {
		gutter.setBackground(bgColor);
		gutter.setBorderColor(gutterBorderColor);
		gutter.setActiveLineRangeColor(activeLineRangeColor);
		gutter.setIconRowHeaderInheritsGutterBackground(iconRowHeaderInheritsGutterBG);
		gutter.setLineNumberColor(lineNumberColor);
		String fontName = lineNumberFont!=null ? lineNumberFont :
			baseFont.getFamily();
		int fontSize = lineNumberFontSize>0 ? lineNumberFontSize :
			baseFont.getSize();
		Font font = getFont(fontName, Font.PLAIN, fontSize);
		gutter.setLineNumberFont(font);
		gutter.setFoldIndicatorForeground(foldIndicatorFG);
		gutter.setFoldBackground(foldBG);
	}

}
 
开发者ID:curiosag,项目名称:ftc,代码行数:52,代码来源:Theme.java

示例3: apply

import org.fife.ui.rtextarea.Gutter; //导入方法依赖的package包/类
/**
 * Applies this theme to a text area.
 *
 * @param textArea The text area to apply this theme to.
 */
public void apply(RSyntaxTextArea textArea) {

	textArea.setFont(baseFont);
	textArea.setBackground(bgColor);
	textArea.setCaretColor(caretColor);
	textArea.setUseSelectedTextColor(useSelctionFG);
	textArea.setSelectedTextColor(selectionFG);
	textArea.setSelectionColor(selectionBG);
	textArea.setRoundedSelectionEdges(selectionRoundedEdges);
	textArea.setCurrentLineHighlightColor(currentLineHighlight);
	textArea.setFadeCurrentLineHighlight(fadeCurrentLineHighlight);
	textArea.setMarginLineColor(marginLineColor);
	textArea.setMarkAllHighlightColor(markAllHighlightColor);
	textArea.setMarkOccurrencesColor(markOccurrencesColor);
	textArea.setPaintMarkOccurrencesBorder(markOccurrencesBorder);
	textArea.setMatchedBracketBGColor(matchedBracketBG);
	textArea.setMatchedBracketBorderColor(matchedBracketFG);
	textArea.setPaintMatchedBracketPair(matchedBracketHighlightBoth);
	textArea.setAnimateBracketMatching(matchedBracketAnimate);
	textArea.setHyperlinkForeground(hyperlinkFG);

	int count = secondaryLanguages.length;
	for (int i=0; i<count; i++) {
		textArea.setSecondaryLanguageBackground(i+1, secondaryLanguages[i]);
	}

	textArea.setSyntaxScheme(scheme);

	Gutter gutter = RSyntaxUtilities.getGutter(textArea);
	if (gutter!=null) {
		gutter.setBackground(bgColor);
		gutter.setBorderColor(gutterBorderColor);
		gutter.setLineNumberColor(lineNumberColor);
		String fontName = lineNumberFont!=null ? lineNumberFont :
			baseFont.getFamily();
		int fontSize = lineNumberFontSize>0 ? lineNumberFontSize :
			baseFont.getSize();
		Font font = getFont(fontName, Font.PLAIN, fontSize);
		gutter.setLineNumberFont(font);
		gutter.setFoldIndicatorForeground(foldIndicatorFG);
		gutter.setFoldBackground(foldBG);
	}

}
 
开发者ID:Nanonid,项目名称:RSyntaxTextArea,代码行数:50,代码来源:Theme.java


注:本文中的org.fife.ui.rtextarea.Gutter.setLineNumberColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。