javax.swing.tree

Class DefaultTreeCellEditor.DefaultTextField

public class DefaultTreeCellEditor.DefaultTextField extends JTextField

The default text field, used in the editing sessions.
Field Summary
protected Borderborder
The border of the text field.
Constructor Summary
DefaultTextField(Border aBorder)
Creates a DefaultTextField object.
Method Summary
BordergetBorder()
Returns the border of the text field.
FontgetFont()
Gets the font of this component.
DimensiongetPreferredSize()
Overrides JTextField.getPreferredSize to return the preferred size based on current font, if set, or else use renderer's font.

Field Detail

border

protected Border border
The border of the text field.

Constructor Detail

DefaultTextField

public DefaultTextField(Border aBorder)
Creates a DefaultTextField object.

Parameters: aBorder the border to use

Method Detail

getBorder

public Border getBorder()
Returns the border of the text field.

Returns: the border

getFont

public Font getFont()
Gets the font of this component.

Returns: this component's font; if a font has not been set for this component, the font of its parent is returned (if the parent is not null, otherwise null is returned).

getPreferredSize

public Dimension getPreferredSize()
Overrides JTextField.getPreferredSize to return the preferred size based on current font, if set, or else use renderer's font.

Returns: the Dimension of this textfield.