Class CPassword

    • Constructor Detail

      • CPassword

        public CPassword()
        Constructs a new JPasswordField, with a default document, null starting text string, and 0 column width.
      • CPassword

        public CPassword​(String text)
        Constructs a new JPasswordField initialized with the specified text. The document model is set to the default, and the number of columns to 0.
        Parameters:
        text - the text to be displayed, null if none
      • CPassword

        public CPassword​(int columns)
        Constructs a new empty JPasswordField with the specified number of columns. A default model is created, and the initial string is set to null.
        Parameters:
        columns - the number of columns >= 0
      • CPassword

        public CPassword​(String text,
                         int columns)
        Constructs a new JPasswordField initialized with the specified text and columns. The document model is set to the default.
        Parameters:
        text - the text to be displayed, null if none
        columns - the number of columns >= 0
      • CPassword

        public CPassword​(Document doc,
                         String txt,
                         int columns)
        Constructs a new JPasswordField that uses the given text storage model and the given number of columns. This is the constructor through which the other constructors feed. The echo character is set to '*'. If the document model is null, a default one will be created.
        Parameters:
        doc - the text storage to use
        txt - the text to be displayed, null if none
        columns - the number of columns to use to calculate the preferred width >= 0; if columns is set to zero, the preferred width will be whatever naturally results from the component implementation
    • Method Detail

      • setMandatory

        public void setMandatory​(boolean mandatory)
        Set Editor Mandatory
        Specified by:
        setMandatory in interface CEditor
        Parameters:
        mandatory - true, if you have to enter data
      • isMandatory

        public boolean isMandatory()
        Is Field mandatory
        Specified by:
        isMandatory in interface CEditor
        Returns:
        true, if mandatory
      • setReadWrite

        public void setReadWrite​(boolean rw)
        Enable Editor
        Specified by:
        setReadWrite in interface CEditor
        Parameters:
        rw - true, if you can enter/select data
      • isReadWrite

        public boolean isReadWrite()
        Is it possible to edit
        Specified by:
        isReadWrite in interface CEditor
        Returns:
        true, if editable
      • setBackground

        public void setBackground​(boolean error)
        Set Background based on editable / mandatory / error
        Specified by:
        setBackground in interface CEditor
        Parameters:
        error - if true, set background to error color, otherwise mandatory/editable
      • setValue

        public void setValue​(Object value)
        Set Editor to value
        Specified by:
        setValue in interface CEditor
        Parameters:
        value - value of the editor
      • getValue

        public Object getValue()
        Return Editor value
        Specified by:
        getValue in interface CEditor
        Returns:
        current value
      • getDisplay

        public String getDisplay()
        Return Display Value
        Specified by:
        getDisplay in interface CEditor
        Returns:
        displayed String value