Class CCheckBox

    • Constructor Detail

      • CCheckBox

        public CCheckBox()
        Creates an initially unselected check box button with no text, no icon.
      • CCheckBox

        public CCheckBox​(Icon icon)
        Creates an initially unselected check box with an icon.
        Parameters:
        icon - the Icon image to display
      • CCheckBox

        public CCheckBox​(Icon icon,
                         boolean selected)
        Creates a check box with an icon and specifies whether or not it is initially selected.
        Parameters:
        icon - the Icon image to display
        selected - a boolean value indicating the initial selection state. If true the check box is selected
      • CCheckBox

        public CCheckBox​(String text)
        Creates an initially unselected check box with text.
        Parameters:
        text - the text of the check box.
      • CCheckBox

        public CCheckBox​(Action a)
        Creates a check box where properties are taken from the Action supplied.
        Parameters:
        a -
      • CCheckBox

        public CCheckBox​(String text,
                         boolean selected)
        Creates a check box with text and specifies whether or not it is initially selected.
        Parameters:
        text - the text of the check box.
        selected - a boolean value indicating the initial selection state. If true the check box is selected
      • CCheckBox

        public CCheckBox​(String text,
                         Icon icon)
        Creates an initially unselected check box with the specified text and icon.
        Parameters:
        text - the text of the check box.
        icon - the Icon image to display
      • CCheckBox

        public CCheckBox​(String text,
                         Icon icon,
                         boolean selected)
        Creates a check box with text and icon, and specifies whether or not it is initially selected.
        Parameters:
        text - the text of the check box.
        icon - the Icon image to display
        selected - a boolean value indicating the initial selection state. If true the check box is selected
    • 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 - ignored -
        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. Interpret Y/N and Boolean
        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 as String or Boolean
      • getDisplay

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

        public void setText​(String mnemonicLabel)
        Set Text
        Overrides:
        setText in class AbstractButton
        Parameters:
        mnemonicLabel - text
      • setMnemonic

        public void setMnemonic​(int mnemonic)
        Overrides the JCheckBox.setMnemonic() method, setting modifier keys to CTRL+SHIFT.
        Overrides:
        setMnemonic in class AbstractButton
        Parameters:
        mnemonic - The mnemonic character code.