use of org.gradle.gradleplugin.userinterface.swing.common.SearchPanel in project gradle by gradle.
the class OutputPanel method createSearchPanel.
private Component createSearchPanel() {
StyleContext styleContent = StyleContext.getDefaultStyleContext();
AttributeSet highlightStyle = gradleOutputTextPane.getDefaultStyle().copyAttributes();
highlightStyle = styleContent.addAttribute(highlightStyle, StyleConstants.Foreground, Color.white);
highlightStyle = styleContent.addAttribute(highlightStyle, StyleConstants.Background, Color.orange);
highlightStyle = styleContent.addAttribute(highlightStyle, StyleConstants.Underline, true);
AttributeSet emphasizedHighlightStyle = highlightStyle.copyAttributes();
emphasizedHighlightStyle = styleContent.addAttribute(emphasizedHighlightStyle, StyleConstants.Foreground, Color.black);
emphasizedHighlightStyle = styleContent.addAttribute(emphasizedHighlightStyle, StyleConstants.Background, Color.yellow);
searchPanel = new SearchPanel(new OutputPanelSearchInteraction(gradleOutputTextPane.getTextComponent(), gradleOutputTextPane.getDefaultStyle(), highlightStyle, emphasizedHighlightStyle));
searchPanel.hide();
return searchPanel.getComponent();
}
Aggregations