Package com.formdev.flatlaf.ui
Class FlatTextFieldUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.TextUI
-
- javax.swing.plaf.basic.BasicTextUI
-
- javax.swing.plaf.basic.BasicTextFieldUI
-
- com.formdev.flatlaf.ui.FlatTextFieldUI
-
- All Implemented Interfaces:
ViewFactory
- Direct Known Subclasses:
FlatFormattedTextFieldUI,FlatPasswordFieldUI
public class FlatTextFieldUI extends BasicTextFieldUI
Provides the Flat LaF UI delegate forJTextField.- UiDefault:
- TextField.font Font, TextField.background Color, TextField.foreground Color also used if not editable, TextField.caretForeground Color, TextField.selectionBackground Color, TextField.selectionForeground Color, TextField.disabledBackground Color used if not enabled, TextField.inactiveBackground Color used if not editable, TextField.inactiveForeground Color used if not enabled (yes, this is confusing; this should be named disabledForeground), TextField.border Border, TextField.margin Insets, TextField.caretBlinkRate int default is 500 milliseconds , Component.minimumWidth int, Component.isIntelliJTheme boolean, TextField.placeholderForeground Color, TextField.focusedBackground Color optional, TextComponent.selectAllOnFocusPolicy String never, once (default) or always, TextComponent.selectAllOnMouseClick boolean
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
-
-
Field Summary
Fields Modifier and Type Field Description protected ColorfocusedBackgroundprotected booleanisIntelliJThemeprotected intminimumWidthprotected ColorplaceholderForeground
-
Constructor Summary
Constructors Constructor Description FlatTextFieldUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CaretcreateCaret()static ComponentUIcreateUI(JComponent c)DimensiongetMinimumSize(JComponent c)protected InsetsgetPadding()DimensiongetPreferredSize(JComponent c)protected RectanglegetVisibleEditorRect()protected voidinstallDefaults()protected voidinstallListeners()protected voidpaintBackground(Graphics g)protected voidpaintPlaceholder(Graphics g)protected voidpaintSafely(Graphics g)protected voidpropertyChange(PropertyChangeEvent e)protected voidscrollCaretToVisible()protected voiduninstallDefaults()protected voiduninstallListeners()-
Methods inherited from class javax.swing.plaf.basic.BasicTextFieldUI
create, getBaseline, getBaselineResizeBehavior, getPropertyPrefix
-
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getNextVisualPositionFrom, getRootView, getToolTipText, installKeyboardActions, installUI, modelChanged, modelToView, modelToView, modelToView2D, paint, setView, uninstallKeyboardActions, uninstallUI, update, viewToModel, viewToModel, viewToModel2D
-
Methods inherited from class javax.swing.plaf.TextUI
getToolTipText2D
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
-
-
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaultsin classBasicTextUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaultsin classBasicTextUI
-
installListeners
protected void installListeners()
- Overrides:
installListenersin classBasicTextUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin classBasicTextUI
-
createCaret
protected Caret createCaret()
- Overrides:
createCaretin classBasicTextUI
-
propertyChange
protected void propertyChange(PropertyChangeEvent e)
- Overrides:
propertyChangein classBasicTextUI
-
paintSafely
protected void paintSafely(Graphics g)
- Overrides:
paintSafelyin classBasicTextUI
-
paintBackground
protected void paintBackground(Graphics g)
- Overrides:
paintBackgroundin classBasicTextUI
-
paintPlaceholder
protected void paintPlaceholder(Graphics g)
-
getPreferredSize
public Dimension getPreferredSize(JComponent c)
- Overrides:
getPreferredSizein classBasicTextUI
-
getMinimumSize
public Dimension getMinimumSize(JComponent c)
- Overrides:
getMinimumSizein classBasicTextUI
-
getVisibleEditorRect
protected Rectangle getVisibleEditorRect()
- Overrides:
getVisibleEditorRectin classBasicTextUI
-
getPadding
protected Insets getPadding()
- Since:
- 1.4
-
scrollCaretToVisible
protected void scrollCaretToVisible()
- Since:
- 1.4
-
-