Class JLabeledRadioI18N

    • Constructor Detail

      • JLabeledRadioI18N

        public JLabeledRadioI18N​(String label_resouce,
                                 String[] item_resources,
                                 String selectedItem)
        Parameters:
        label_resouce - text resource name for group label
        item_resources - list of resource names for individual buttons
        selectedItem - button to be selected (if not null)
      • JLabeledRadioI18N

        @Deprecated
        public JLabeledRadioI18N()
        Deprecated.
        - only for use in testing
    • Method Detail

      • resetButtons

        public void resetButtons​(String[] resouces,
                                 String selected)
        Method is responsible for removing current JRadioButtons of ButtonGroup and add creating the JRadioButtons and adding them to the ButtonGroup. The resource name is used as the action command for the button model, and the resource value is used to set the button label.
        Parameters:
        resouces - list of resource names
        selected - initially selected resource (if not null)
      • getText

        public String getText()
        The implementation will get the resource name from the selected radio button in the JButtonGroup.
        Specified by:
        getText in interface JLabeledField
      • setText

        public void setText​(String resourcename)
        The implementation will iterate through the radio buttons and find the match. It then sets it to selected and sets all other radio buttons as not selected.
        Specified by:
        setText in interface JLabeledField
        Parameters:
        resourcename - name of resource whose button is to be selected
      • setLabel

        public final void setLabel​(String label_resource)
        Set the group label from the resource name.
        Specified by:
        setLabel in interface JLabeledField
        Parameters:
        label_resource - The text to be looked up and set