Java Code Examples for javax.swing.text.DefaultHighlighter#DefaultPainter
The following examples show how to use
javax.swing.text.DefaultHighlighter#DefaultPainter .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainPanel.java From java-swing-tips with MIT License | 5 votes |
@Override protected Highlighter.HighlightPainter getSelectionPainter() { // JComponent c = getComponent(); // boolean selected = c.hasFocus(); // Container f = SwingUtilities.getAncestorOfClass(JInternalFrame.class, c); // if (f instanceof JInternalFrame) { // System.out.println("bbbbbbbbbbbbbb"); // JInternalFrame frame = (JInternalFrame) f; // selected = frame.isSelected(); // } // return selected ? DefaultHighlighter.DefaultPainter : nonFocusHighlightPainter; return getComponent().hasFocus() ? DefaultHighlighter.DefaultPainter : NONFOCUS; }
Example 2
Source File: CaretFloatingPointAPITest.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
protected Highlighter.HighlightPainter getSelectionPainter() { return DefaultHighlighter.DefaultPainter; }
Example 3
Source File: CaretFloatingPointAPITest.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
protected Highlighter.HighlightPainter getSelectionPainter() { return DefaultHighlighter.DefaultPainter; }
Example 4
Source File: ColorHandler.java From mae-annotation with GNU General Public License v3.0 | 4 votes |
public static Highlighter.HighlightPainter getDefaultHighlighter() { return DefaultHighlighter.DefaultPainter; }