Top Inners Fields Constructors Methods
com.dlsc.gemsfx.skins

public Class EmailFieldSkin

extends SkinBase<EmailField>
Class Inheritance
Imports
com.dlsc.gemsfx.EmailField, javafx.application.Platform, javafx.beans.binding.Bindings, javafx.collections.transformation.FilteredList, javafx.geometry.Bounds, .Point2D, .Rectangle2D, javafx.scene.Node, javafx.scene.control.ListView, .PopupControl, .Skin, .SkinBase, .Tooltip, javafx.scene.control.skin.TextFieldSkin, javafx.scene.input.KeyCode, .KeyEvent, .MouseButton, .MouseEvent, javafx.scene.layout.Region, .StackPane, org.apache.commons.lang3.StringUtils, org.controlsfx.control.textfield.CustomTextField, java.util.Objects

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
EmailFieldSkin.DomainPopup

DomainPopup is a private class that extends PopupControl to create a custom popup used for displaying domain suggestions in the context of an EmailField component.

private class

Field Summary

Modifier and TypeField and Description
private final CustomTextField
private final EmailFieldSkin.DomainPopup

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
handleSuggestionPopupVisibility()

Controls the visibility of the domain suggestion popup based on specific conditions.

private void
private void
private void
showSuggestionPopup(int atIndex)

private void
updateTooltipVisibility(String invalidText, StackPane node, Tooltip invalidToolTip)

Inherited from javafx.scene.control.SkinBase:
computeBaselineOffsetcomputeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthconsumeMouseEventsdisposeexecuteAccessibleActiongetChildrengetClassCssMetaDatagetCssMetaDatagetNodegetSkinnablelayoutChildrenlayoutInArealayoutInArealayoutInAreapositionInAreapositionInAreapseudoClassStateChangedqueryAccessibleAttributeregisterChangeListenerregisterInvalidationListenerregisterListChangeListenersnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYunregisterChangeListenersunregisterInvalidationListenersunregisterListChangeListeners

Field Detail

customTextFieldback to summary
private final CustomTextField customTextField
domainPopupback to summary
private final EmailFieldSkin.DomainPopup domainPopup

Constructor Detail

EmailFieldSkinback to summary
public EmailFieldSkin(EmailField field)

Method Detail

handleSuggestionPopupVisibilityback to summary
private void handleSuggestionPopupVisibility()

Controls the visibility of the domain suggestion popup based on specific conditions.

The popup is shown when all the following conditions are met: - There is no exact domain match with the text entered after the '@' symbol. - At least one domain in the domain list starts with the entered text (case-insensitive). - Auto domain completion is enabled. - The custom text field is currently focused.

If any of these conditions are not met, the popup will be hidden.

handleSuggestionSelectionback to summary
private void handleSuggestionSelection(ListView<String> listView)
initializeSuggestionListViewback to summary
private void initializeSuggestionListView(ListView<String> listView)
showSuggestionPopupback to summary
private void showSuggestionPopup(int atIndex)
updateTooltipVisibilityback to summary
private void updateTooltipVisibility(String invalidText, StackPane node, Tooltip invalidToolTip)
com.dlsc.gemsfx.skins back to summary

private Class EmailFieldSkin.DomainPopup

extends PopupControl
Class Inheritance

DomainPopup is a private class that extends PopupControl to create a custom popup used for displaying domain suggestions in the context of an EmailField component.

It has properties that automatically fix and hide the popup as needed.

Field Summary

Modifier and TypeField and Description
public static final String
Inherited from javafx.scene.control.PopupControl:
bridgeUSE_COMPUTED_SIZEUSE_PREF_SIZE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.PopupControl.createDefaultSkin.

Create a new instance of the default skin for this control.

Inherited from javafx.scene.control.PopupControl:
getClassCssMetaDatagetCssMetaDatagetIdgetMaxHeightgetMaxWidthgetMinHeightgetMinWidthgetPrefHeightgetPrefWidthgetPseudoClassStatesgetSkingetStylegetStyleableNodegetStyleableParentgetStyleClassgetTypeSelectoridPropertymaxHeightmaxHeightPropertymaxWidthmaxWidthPropertyminHeightminHeightPropertyminWidthminWidthPropertyprefHeightprefHeightPropertyprefWidthprefWidthPropertypseudoClassStateChangedsetIdsetMaxHeightsetMaxSizesetMaxWidthsetMinHeightsetMinSizesetMinWidthsetPrefHeightsetPrefSizesetPrefWidthsetSkinsetStyleskinPropertystyleProperty

Field Detail

DEFAULT_STYLE_CLASSback to summary
public static final String DEFAULT_STYLE_CLASS

Constructor Detail

DomainPopupback to summary
public DomainPopup()

Method Detail

createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Overrides javafx.scene.control.PopupControl.createDefaultSkin.

Doc from javafx.scene.control.PopupControl.createDefaultSkin.

Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).

Annotations
@Override
com.dlsc.gemsfx.skins back to summary

private Class EmailFieldSkin.DomainPopupSkin

extends Object
implements Skin<EmailFieldSkin.DomainPopup>
Class Inheritance
All Implemented Interfaces
javafx.scene.control.Skin

Field Summary

Modifier and TypeField and Description
private final EmailFieldSkin.DomainPopup
private final StackPane

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control.

public Node
getNode()

Implements javafx.scene.control.Skin.getNode.

Gets the Node which represents this Skin.

public EmailFieldSkin.DomainPopup
getSkinnable()

Implements javafx.scene.control.Skin.getSkinnable.

Gets the Skinnable to which this Skin is assigned.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

popupback to summary
private final EmailFieldSkin.DomainPopup popup
rootback to summary
private final StackPane root

Constructor Detail

DomainPopupSkinback to summary
public DomainPopupSkin(EmailFieldSkin.DomainPopup popup)

Method Detail

disposeback to summary
public void dispose()

Implements javafx.scene.control.Skin.dispose.

Doc from javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control. This allows the skin to do clean up, like removing listeners and bindings, and undo any changes to the control's properties. After this method completes, getSkinnable() and getNode() should return null.

Calling dispose() more than once has no effect.

Annotations
@Override
getNodeback to summary
public Node getNode()

Implements javafx.scene.control.Skin.getNode.

Doc from javafx.scene.control.Skin.getNode.

Gets the Node which represents this Skin. This must never be null, except after a call to dispose(), and must never change except when changing to null.

Annotations
@Override
getSkinnableback to summary
public EmailFieldSkin.DomainPopup getSkinnable()

Implements javafx.scene.control.Skin.getSkinnable.

Doc from javafx.scene.control.Skin.getSkinnable.

Gets the Skinnable to which this Skin is assigned. A Skin must be created for one and only one Skinnable. This value will only ever go from a non-null to null value when the Skin is removed from the Skinnable, and only as a consequence of a call to dispose().

The caller who constructs a Skinnable must also construct a Skin and properly establish the relationship between the Control and its Skin.

Annotations
@Override