4586N/A * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved. 4586N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4586N/A * This code is free software; you can redistribute it and/or modify it 4586N/A * under the terms of the GNU General Public License version 2 only, as 4586N/A * published by the Free Software Foundation. Oracle designates this 4586N/A * particular file as subject to the "Classpath" exception as provided 4586N/A * by Oracle in the LICENSE file that accompanied this code. 4586N/A * This code is distributed in the hope that it will be useful, but WITHOUT 4586N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 4586N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * Windows text rendering. * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is appropriate * for short term storage or RMI between applications running the same * version of Swing. A future release of Swing will provide support for * Creates the object to use for a caret. By default an * instance of WindowsCaret is created. This method * can be redefined to provide something else that implements * the InputPosition interface or a subclass of DefaultCaret. * @return the caret object * Gets the painter for the Highlighter. // --- HighlightPainter methods --------------------------------------- * @param g the graphics context * @param offs0 the starting model offset >= 0 * @param offs1 the ending model offset >= offs1 * @param bounds the bounding box for the highlight // --- determine locations --- // same line, render a rectangle // --- LayerPainter methods ---------------------------- * Paints a portion of a highlight. * @param g the graphics context * @param offs0 the starting model offset >= 0 * @param offs1 the ending model offset >= offs1 * @param bounds the bounding box of the view, which is not * necessarily the region to paint. * @param view View painting for * @return region drawing occured in // Contained in view, can just use bounds. // Should only render part of View. // --- determine locations ---