本文整理汇总了Java中org.fife.ui.rtextarea.Gutter.setIconRowHeaderInheritsGutterBackground方法的典型用法代码示例。如果您正苦于以下问题:Java Gutter.setIconRowHeaderInheritsGutterBackground方法的具体用法?Java Gutter.setIconRowHeaderInheritsGutterBackground怎么用?Java Gutter.setIconRowHeaderInheritsGutterBackground使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.fife.ui.rtextarea.Gutter
的用法示例。
在下文中一共展示了Gutter.setIconRowHeaderInheritsGutterBackground方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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);
}
}