2362N/A * Copyright (c) 2004, 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 // Only add border if text is not null 0N/A // A layout manager has been set, so delegate to it 0N/A // A layout manager has been set, so delegate to it 0N/A h +=
1;
// Make it odd 0N/A * A subclass of <code>TitledBorder</code> which implements an arbitrary border 0N/A * with the addition of a JComponent (JLabel, JPanel, etc) in the 0N/A * If the border property value is not 0N/A * specified in the constuctor or by invoking the appropriate 0N/A * set method, the property value will be defined by the current 0N/A * look and feel, using the following property name in the 0N/A * <li>"TitledBorder.border" 0N/A * Creates a LabeledBorder instance. 0N/A * @param label the label the border should display 0N/A * Creates a LabeledBorder instance with the specified border 0N/A * and an empty label. 0N/A * @param border the border 0N/A * Creates a LabeledBorder instance with the specified border and 0N/A * @param border the border 0N/A * @param label the label the border should display 0N/A * Paints the border for the specified component with the 0N/A * specified position and size. 0N/A * @param c the component for which this border is being painted 0N/A * @param g the paint graphics 0N/A * @param x the x position of the painted border 0N/A * @param y the y position of the painted border 0N/A * @param width the width of the painted border 0N/A * @param height the height of the painted border 0N/A // If title is positioned in middle of border AND its fontsize 0N/A // is greater than the border's thickness, we'll need to paint 0N/A // the border in sections to leave space for the component's background 0N/A // to show through the title. 0N/A // save original clip 0N/A // paint strip left of text 0N/A // paint strip right of text 0N/A // paint strip below text 0N/A * Reinitialize the insets parameter with this Border's current Insets. 0N/A * @param c the component for which this border insets value applies 0N/A * @param insets the object to be reinitialized 0N/A // Can't reuse border insets because the Border interface 0N/A // can't be enhanced. 0N/A * Returns the label of the labeled border. 0N/A * Sets the title of the titled border. 0N/A * param title the title for the border 0N/A * Returns the minimum dimensions this border requires 0N/A * in order to fully display the border and title. 0N/A * @param c the component where this border will be drawn 0N/A // This is the best guess for a L&F specific color 0N/A // We will still paint focus even if lost temporarily