Class FlatPasswordFieldUI
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
com.formdev.flatlaf.ui.FlatPasswordFieldUI
- All Implemented Interfaces:
FlatStylingSupport.StyleableUI, ViewFactory
Provides the Flat LaF UI delegate for
JPasswordField.
-
Nested Class Summary
Nested classes/interfaces inherited from class BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Iconprivate booleanprivate KeyListenerprivate Characterprivate static final Stringprivate JToggleButtonprotected Iconprotected booleanprotected booleanprivate booleanFields inherited from class FlatTextFieldUI
clearButton, disabledBackground, focusedBackground, iconTextGap, inactiveBackground, leadingComponent, leadingIcon, minimumWidth, placeholderForeground, showClearButton, trailingComponent, trailingIcon -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyStyle(Object style) protected ObjectapplyStyleProperty(String key, Object value) protected JToggleButtonstatic ComponentUIprotected StringgetStyleableValue(JComponent c, String key) (package private) Stringprotected JComponent[]Returns components placed at the trailing side of the text field.protected intprotected booleanprotected voidprotected voidprotected voidprotected voidvoidprotected booleanprotected voidpaintCapsLock(Graphics g, Rectangle r) protected voidpaintIcons(Graphics g, Rectangle r) Paints the leading and trailing icons in the given rectangle.protected voidprotected voidprotected voidprotected voidvoidprivate voidupdateEchoChar(boolean selected) protected voidMethods inherited from class FlatTextFieldUI
clearButtonClicked, createCaret, createClearButton, documentChanged, getBackground, getIconsRect, getLeadingComponents, getLeadingIconWidth, getMinimumSize, getPadding, getPreferredSize, getVisibleEditorRect, hasDefaultMargins, hasLeadingIcon, installClearButton, installDocumentListener, installLayout, installLeadingComponent, installStyle, installTrailingComponent, isLeftToRight, paintBackground, paintBackground, paintPlaceholder, paintSafely, prepareLeadingOrTrailingComponent, scrollCaretToVisible, uninstallClearButton, uninstallLeadingComponent, uninstallTrailingComponent, updateBackground, updateClearButtonMethods inherited from class BasicTextFieldUI
getBaseline, getBaselineResizeBehaviorMethods inherited from class BasicTextUI
create, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getNextVisualPositionFrom, getRootView, getToolTipText, modelChanged, modelToView, modelToView, modelToView2D, paint, setView, uninstallKeyboardActions, update, viewToModel, viewToModel, viewToModel2DMethods inherited from class TextUI
getToolTipText2DMethods inherited from class ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
-
Field Details
-
KEY_REVEAL_SELECTED
- See Also:
-
echoChar
-
showCapsLock
protected boolean showCapsLock -
showRevealButton
protected boolean showRevealButton- Since:
- 2
-
capsLockIcon
-
revealIcon
- Since:
- 2
-
capsLockListener
-
revealButton
-
uninstallEchoChar
private boolean uninstallEchoChar
-
-
Constructor Details
-
FlatPasswordFieldUI
public FlatPasswordFieldUI()
-
-
Method Details
-
createUI
-
getPropertyPrefix
- Overrides:
getPropertyPrefixin classBasicTextFieldUI
-
installUI
- Overrides:
installUIin classFlatTextFieldUI
-
uninstallUI
- Overrides:
uninstallUIin classFlatTextFieldUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classFlatTextFieldUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classFlatTextFieldUI
-
installListeners
protected void installListeners()- Overrides:
installListenersin classFlatTextFieldUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListenersin classFlatTextFieldUI
-
installKeyboardActions
protected void installKeyboardActions()- Overrides:
installKeyboardActionsin classBasicTextUI
-
getStyleType
String getStyleType()- Overrides:
getStyleTypein classFlatTextFieldUI- Since:
- 2
-
applyStyle
- Overrides:
applyStylein classFlatTextFieldUI
-
applyStyleProperty
- Overrides:
applyStylePropertyin classFlatTextFieldUI- Since:
- 2
-
getStyleableInfos
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Overrides:
getStyleableInfosin classFlatTextFieldUI- Since:
- 2
-
getStyleableValue
- Specified by:
getStyleableValuein interfaceFlatStylingSupport.StyleableUI- Overrides:
getStyleableValuein classFlatTextFieldUI
-
create
- Specified by:
createin interfaceViewFactory- Overrides:
createin classBasicTextFieldUI
-
paintIcons
Description copied from class:FlatTextFieldUIPaints the leading and trailing icons in the given rectangle. The rectangle is updated by this method so that subclasses can use it without painting over leading or trailing icons.- Overrides:
paintIconsin classFlatTextFieldUI- Since:
- 2
-
paintCapsLock
-
hasTrailingIcon
protected boolean hasTrailingIcon()- Overrides:
hasTrailingIconin classFlatTextFieldUI- Since:
- 2
-
getTrailingIconWidth
protected int getTrailingIconWidth()- Overrides:
getTrailingIconWidthin classFlatTextFieldUI- Since:
- 2
-
isCapsLockVisible
protected boolean isCapsLockVisible()- Since:
- 1.4
-
installRevealButton
protected void installRevealButton()- Since:
- 2
-
createRevealButton
- Since:
- 2
-
updateRevealButton
protected void updateRevealButton()- Since:
- 2.5
-
propertyChange
- Overrides:
propertyChangein classFlatTextFieldUI
-
updateEchoChar
private void updateEchoChar(boolean selected) -
uninstallRevealButton
protected void uninstallRevealButton()- Since:
- 2
-
getTrailingComponents
Description copied from class:FlatTextFieldUIReturns components placed at the trailing side of the text field. The returned array may containnull. The default implementation returnsFlatTextFieldUI.trailingComponentandFlatTextFieldUI.clearButton.Note: The components in the array must be in reverse (visual) order.
- Overrides:
getTrailingComponentsin classFlatTextFieldUI
-