public Replacer getReplacer() {
            Map<AttributeKey, Object> attrs = new HashMap<AttributeKey, Object>();
            if (patternRadioButton.isSelected()) {
                attrs.put(AttributeKey.TURN_ON_REGEX, regexCheckBox.isSelected());
                attrs.put(AttributeKey.FROM_PATTERN, fromTextField.getText());
                attrs.put(AttributeKey.TO_PATTERN, toTextField.getText());
                return ReplacerFactory.getInstance(ReplacerType.PATTERN, attrs);
            } else if (allCharsUpperCaseRadioButton.isSelected()) {
                return ReplacerFactory.getInstance(ReplacerType.ALL_UPPER_CASE, attrs);
            } else if (allCharsLowerCaseRadioButton.isSelected()) {
                return ReplacerFactory.getInstance(ReplacerType.ALL_LOWER_CASE, attrs);
            } else if (firstCharUpperCaseRadioButton.isSelected()) {
                return ReplacerFactory.getInstance(ReplacerType.FIRST_CHAR_UPPER_CASE,
                        attrs);
            } else if (sequenceNumberRadioButton.isSelected()) {
                if (startCheckBox.isSelected()) {
                    attrs.put(AttributeKey.INITIAL_NO_FOR_START, startSeqNumberSpinner.getValue());
                }

                if (endCheckBox.isSelected()) {
                    attrs.put(AttributeKey.INITIAL_NO_FOR_END, endSeqNumberSpinner.getValue());
                }

                if (indexCheckBox.isSelected()) {
                    attrs.put(AttributeKey.INITIAL_NO_FOR_INDEX, indexSeqNumberSpinner.getValue());
                    attrs.put(AttributeKey.INDEX_NO, indexSpinner.getValue());
                }
                return ReplacerFactory.getInstance(ReplacerType.SEQUENCE_NUMBER, attrs);
            } else if (charactersRadioButton.isSelected()) {
                attrs.put(AttributeKey.CHARS_FOR_START, startTextField.getText());
                attrs.put(AttributeKey.CHARS_FOR_END, endTextField.getText());
                attrs.put(AttributeKey.CHARS_FOR_INDEX, indexTextField.getText());
                attrs.put(AttributeKey.INDEX_NO, charsIndexSpinner.getValue());
                return ReplacerFactory.getInstance(ReplacerType.CHARACTERS, attrs);
            } else { // No selection
                return null;
            }
        }