public class javax.swing.tree
DefaultTreeCellEditor.DefaultTextField


Hide details Login
Java SE 6
  
Extends: Component > Container > JComponent > JTextComponent > JTextField
Contained within: DefaultTreeCellEditor

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.

Fields
protected Border border
Border to use.

Constructors
public DefaultTreeCellEditor.DefaultTextField(Border border)
Constructs a DefaultTreeCellEditor.DefaultTextField object.
bordera Border object
since1.4

Properties
public void setBorder(Border border)
Sets the border of this component.

This is a bound property.
borderthe border to be rendered for this component
beaninfobound: true preferred: true attribute: visualUpdate true description: The component's border.
See also javax.swing.border.Border, javax.swing.border.CompoundBorder

public Border getBorder()
Overrides JComponent.getBorder to returns the current border.
public Font getFont()
public Dimension getPreferredSize()
Overrides JTextField.getPreferredSize to return the preferred size based on current font, if set, or else use renderer's font.
returna Dimension object containing the preferred size