2362N/A * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * (C) Copyright IBM Corp. 1998, All Rights Reserved 0N/A * This class provides drawing and bounds-measurement of 0N/A * underlines. Additionally, it has a factory method for 0N/A * obtaining underlines from values of underline attributes. 0N/A * Draws the underline into g2d. The thickness should be obtained 0N/A * from a LineMetrics object. Note that some underlines ignore the 0N/A * thickness parameter. 0N/A * The underline is drawn from (x1, y) to (x2, y). 0N/A * Returns the bottom of the bounding rectangle for this underline. 0N/A * Returns a Shape representing the underline. The thickness should be obtained 0N/A * from a LineMetrics object. Note that some underlines ignore the 0N/A * thickness parameter. 0N/A // Implementation of underline for standard and Input Method underlines. 0N/A // These classes are private. 0N/A // IM Underlines ignore thickness param, and instead use 0N/A // DEFAULT_THICKNESS 0N/A // StandardUnderline's constructor takes a boolean param indicating 0N/A // whether to override the default thickness. These values clarify 0N/A // the semantics of the parameter. 0N/A // Implementation of standard underline and all input method underlines 0N/A // except UNDERLINE_LOW_GRAY. 0N/A // the amount by which to move the underline 0N/A // the actual line thickness is this value times 0N/A // the requested thickness 0N/A // if non-null, underline is drawn with a BasicStroke 0N/A // with this dash pattern 0N/A // if false, all underlines are DEFAULT_THICKNESS thick 0N/A // if true, use thickness param 0N/A // cached BasicStroke 0N/A // Implementation of UNDERLINE_LOW_GRAY. 0N/A // Keep a map of underlines, one for each type 0N/A // of underline. The Underline objects are Flyweights 0N/A // (shared across multiple clients), so they should be immutable. 0N/A // If this implementation changes then clone underline 0N/A // instances in getUnderline before returning them. 0N/A * Return the Underline for the given value of 0N/A * TextAttribute.INPUT_METHOD_UNDERLINE or 0N/A * TextAttribute.UNDERLINE. 0N/A * If value is not an input method underline value or 0N/A * TextAttribute.UNDERLINE_ON, null is returned.