@Override
    public void update(Action action) {
        switch (action) {

            case InitProgram:
                convertButton.setEnabled(false);
                break;

            case FileLoad:// fall down.
            case ChangeEncoding:

                String extEncoding = getExtEncoding();
                byte[] contentData = data.getFileContent();

                if (ExtEncodingUtil.isRightEncoding(contentData, extEncoding)) {
                    convertButton.setEnabled(true);
                } else {
                    convertButton.setEnabled(false);
                }
                break;

            default:
                break;
        }
    }