public void refresh() {
            for (Setting setting : modelSettings.getSettings())
                setting.read();
            System.out.println("refresh");
            ArrayList<Pair<Property, String>> need = ModelType.getNewInstance(
                    ModelType.valueOf((String) cb.getSelectedItem())).neededSettings();
            for (Setting setting : list) {
                JComponent jc = setting.updateUiElement();
                jc.setEnabled(!setting.getLocked());
            }
            for (Pair<Property, String> p : need) {
                Setting s = modelSettings.getSetting(p.getFirst());
                JComponent jc = s.updateUiElement(p.getSecond());
                jc.setEnabled(false);
            }
        }