net.sf.jguiraffe.gui.platform.javafx.builder.components
Returns the current restriction of the maximum text length.
Returns the current restriction of the maximum text length.
the maximum number of characters allowed for this text control
The property for storing the maximum text length.
<invalid inheritdoc annotation> This implementation allows the change of the selection only if the maximum text length restriction is not violated.
<invalid inheritdoc annotation> This implementation allows the change of the selection only if the maximum text length restriction is not violated. If necessary, only parts of the new text are inserted. If the maximum text length is already reached, no text can be added.
<invalid inheritdoc annotation> This implementation allows the current text change only if the maximum text length restriction is not violated.
<invalid inheritdoc annotation> This implementation allows the current text change only if the maximum text length restriction is not violated. If necessary, only parts of the new text are inserted. If the maximum text length is already reached, no text can be added.
Sets the maximum length restriction.
Sets the maximum length restriction. Values less than or equal zero disable the restriction. Positive values are interpreted as the maximum number of allowed characters.
the maximum number of characters allowed for this text control
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
A trait that can be mixed into a Java FX text component to restrict the maximum text length.
Per default, Java FX text components do not have a property for setting a maximum text length. The user can enter an arbitrary number of characters into a text field. If the data entered in the field has a length restriction - for instance if it should be stored in a database columns with a specific length -, validation has to be applied to ensure that the length restriction is not violated. However, it would be handy to tell the input field to only accept a given number of characters.
This trait adds this feature to arbitrary Java FX text input controls derived from TextInputControl. It introduces a new property for setting a maximum text length. If it is set to a value greater than 0, all user input is intercepted and checked against the length restriction. It is only processed if the restriction is not violated. This also works with selected text and copy & paste.