553N/A * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. 254N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 254N/A * This code is free software; you can redistribute it and/or modify it 254N/A * under the terms of the GNU General Public License version 2 only, as 553N/A * published by the Free Software Foundation. Oracle designates this 254N/A * particular file as subject to the "Classpath" exception as provided 553N/A * by Oracle in the LICENSE file that accompanied this code. 254N/A * This code is distributed in the hope that it will be useful, but WITHOUT 254N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 254N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 254N/A * version 2 for more details (a copy is included in the LICENSE file that 254N/A * accompanied this code). 254N/A * You should have received a copy of the GNU General Public License version 254N/A * 2 along with this work; if not, write to the Free Software Foundation, 254N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 553N/A * or visit www.oracle.com if you need additional information or have any 254N/A * Provides the Synth L&F UI delegate for {@link javax.swing.JTextField}. 254N/A * <strong>Warning:</strong> 254N/A * Serialized objects of this class will not be compatible with 254N/A * future Swing releases. The current serialization support is 254N/A * appropriate for short term storage or RMI between applications running 254N/A * the same version of Swing. As of 1.4, support for long term storage 254N/A * of all JavaBeans<sup><font size="-2">TM</font></sup> 254N/A * has been added to the <code>java.beans</code> package. 254N/A * @author Shannon Hickey 254N/A * Creates a UI for a JTextField. 254N/A * @param c the text field 254N/A * @return the UI object 254N/A // Some places assume margins are non-null. 254N/A * Notifies this UI delegate to repaint the specified component. 254N/A * This method paints the component background, then calls 254N/A * the {@link #paint(SynthContext,Graphics)} method. 254N/A * <p>In general, this method does not need to be overridden by subclasses. 254N/A * All Look and Feel rendering code should reside in the {@code paint} method. 254N/A * @param g the {@code Graphics} object used for painting 254N/A * @param c the component being painted 254N/A * @see #paint(SynthContext,Graphics) 254N/A * Paints the specified component. 254N/A * <p>This is routed to the {@link #paintSafely} method under 254N/A * the guarantee that the model does not change from the view of this 254N/A * thread while it is rendering (if the associated model is 254N/A * derived from {@code AbstractDocument}). This enables the 254N/A * model to potentially be updated asynchronously. 254N/A * @param context context for the component being painted 254N/A * @param g the {@code Graphics} object used for painting 254N/A * @see #update(Graphics,JComponent) 254N/A * Overridden to do nothing. 254N/A * This method gets called when a bound property is changed 254N/A * on the associated JTextComponent. This is a hook 254N/A * which UI implementations may change to reflect how the 254N/A * UI displays bound properties of JTextComponent subclasses. 254N/A * This is implemented to do nothing (i.e. the response to 254N/A * properties in JTextComponent itself are handled prior 254N/A * to calling this method). 254N/A * @param evt the property change event 254N/A // Installs the text cursor on the component