public class DefaultTreeCellEditor.DefaultTextField extends JTextField
TextField used when no editor is supplied. This textfield locks into the border it is constructed with. It also prefers its parents font over its font. And if the renderer is not null and no font has been specified the preferred height is that of the renderer.
JTextField.AccessibleJTextField JTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBinding JComponent.AccessibleJComponent Container.AccessibleAWTContainer Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy protected Border border
Border to use.
public DefaultTextField(Border border)
Constructs a DefaultTreeCellEditor.DefaultTextField object.
border - a Border objectpublic void setBorder(Border border)
Sets the border of this component.
This is a bound property.
setBorder in class JComponent
border - the border to be rendered for this componentBorder, CompoundBorder
public Border getBorder()
Overrides JComponent.getBorder to returns the current border.
getBorder in class JComponent
JComponent.setBorder(javax.swing.border.Border)public Font getFont()
Description copied from class: Component
Gets the font of this component.
getFont in interface MenuContainer
getFont in class Component
Component.setFont(java.awt.Font)public Dimension getPreferredSize()
Overrides JTextField.getPreferredSize to return the preferred size based on current font, if set, or else use renderer's font.
getPreferredSize in class JTextField
Dimension object containing the preferred sizeJComponent.setPreferredSize(java.awt.Dimension), ComponentUI
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.