no message
This commit is contained in:
@@ -11,6 +11,11 @@ import java.util.LinkedHashMap;
|
||||
public class Properties {
|
||||
protected LinkedHashMap<String, JMenuItem> controls = new LinkedHashMap<>();
|
||||
private File file = null; //файл где хранятся настройки.
|
||||
public Properties() {
|
||||
}
|
||||
public Properties(File file_in) {
|
||||
setFile(file_in);
|
||||
}
|
||||
public File getFile() {
|
||||
return file;
|
||||
}
|
||||
@@ -24,11 +29,6 @@ public class Properties {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public Properties() {
|
||||
}
|
||||
public Properties(File file_in) {
|
||||
setFile(file_in);
|
||||
}
|
||||
public boolean updateField(String name, Object newValue) {
|
||||
try {
|
||||
Field field = getClass().getField(name);
|
||||
@@ -50,7 +50,7 @@ public class Properties {
|
||||
return "?";
|
||||
}
|
||||
public boolean controlAction(String fieldName, JMenuItem control
|
||||
){
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
public JMenuItem getMenuItem(String fieldName) {
|
||||
@@ -86,8 +86,8 @@ public class Properties {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
public void setControlVisible(String settingName, boolean flag){
|
||||
if (controls.containsKey(settingName)){
|
||||
public void setControlVisible(String settingName, boolean flag) {
|
||||
if (controls.containsKey(settingName)) {
|
||||
controls.get(settingName).setVisible(flag);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user