Class CapsLockPasswordBorderWidget
- java.lang.Object
-
- org.pushingpixels.radiance.theming.api.RadianceThemingWidget<javax.swing.JPasswordField>
-
- org.pushingpixels.radiance.theming.internal.widget.text.CapsLockPasswordBorderWidget
-
public class CapsLockPasswordBorderWidget extends RadianceThemingWidget<javax.swing.JPasswordField>
Adds visual indication when caps-lock key is on in focused password fields.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
CapsLockPasswordBorderWidget.CapsLockBorder
Border with "caps lock" indication.
-
Field Summary
Fields Modifier and Type Field Description private boolean
isUninstalling
true
if this widget is uninstalling.private java.awt.event.KeyAdapter
keyAdapter
private static java.lang.String
ORIGINAL_BORDER
Name for client property that stores the original border.private java.beans.PropertyChangeListener
propertyChangeListener
Listens on all properties to decide whether a caps lock border should be shown / hidden.-
Fields inherited from class org.pushingpixels.radiance.theming.api.RadianceThemingWidget
jcomp
-
-
Constructor Summary
Constructors Constructor Description CapsLockPasswordBorderWidget()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static boolean
hasCapsLockIcon(java.awt.Component comp)
Checks whether the specified component should show a lock icon.private void
installCapsLockBorder()
Installs the lock border on the associated component.void
installDefaults()
Installs default settings for the associated component.void
installListeners()
Installs listeners for the associated component.private void
restoreOriginalBorder()
Restores the original border on the associated component.void
uninstallDefaults()
Uninstalls default settings for the associated component.void
uninstallListeners()
Uninstalls listeners for the associated component.void
uninstallUI()
Uninstalls UI on the associated component.-
Methods inherited from class org.pushingpixels.radiance.theming.api.RadianceThemingWidget
installComponents, installUI, setComponent, uninstallComponents
-
-
-
-
Field Detail
-
propertyChangeListener
private java.beans.PropertyChangeListener propertyChangeListener
Listens on all properties to decide whether a caps lock border should be shown / hidden.
-
keyAdapter
private java.awt.event.KeyAdapter keyAdapter
-
isUninstalling
private boolean isUninstalling
true
if this widget is uninstalling.
-
ORIGINAL_BORDER
private static final java.lang.String ORIGINAL_BORDER
Name for client property that stores the original border.- See Also:
- Constant Field Values
-
-
Method Detail
-
installListeners
public void installListeners()
Description copied from class:RadianceThemingWidget
Installs listeners for the associated component.- Overrides:
installListeners
in classRadianceThemingWidget<javax.swing.JPasswordField>
-
uninstallListeners
public void uninstallListeners()
Description copied from class:RadianceThemingWidget
Uninstalls listeners for the associated component.- Overrides:
uninstallListeners
in classRadianceThemingWidget<javax.swing.JPasswordField>
-
uninstallUI
public void uninstallUI()
Description copied from class:RadianceThemingWidget
Uninstalls UI on the associated component.- Overrides:
uninstallUI
in classRadianceThemingWidget<javax.swing.JPasswordField>
-
installDefaults
public void installDefaults()
Description copied from class:RadianceThemingWidget
Installs default settings for the associated component.- Overrides:
installDefaults
in classRadianceThemingWidget<javax.swing.JPasswordField>
-
uninstallDefaults
public void uninstallDefaults()
Description copied from class:RadianceThemingWidget
Uninstalls default settings for the associated component.- Overrides:
uninstallDefaults
in classRadianceThemingWidget<javax.swing.JPasswordField>
-
installCapsLockBorder
private void installCapsLockBorder()
Installs the lock border on the associated component.
-
restoreOriginalBorder
private void restoreOriginalBorder()
Restores the original border on the associated component.
-
hasCapsLockIcon
private static boolean hasCapsLockIcon(java.awt.Component comp)
Checks whether the specified component should show a lock icon. Is used in theCapsLockPasswordBorderWidget
widget.- Parameters:
comp
- Component.- Returns:
true
if the specified component should show a lock icon,false
otherwise.
-
-