удаление мусорного кода с настройками
This commit is contained in:
@@ -307,35 +307,10 @@ public class GlobalProperties {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//выкинуть(?)
|
||||
public void switchAndUpdateFlag(String name) {
|
||||
try {
|
||||
Field field = getClass().getField(name);
|
||||
boolean oldValue = (boolean) field.get(this);
|
||||
boolean newValue = !oldValue;
|
||||
//---
|
||||
field.set(this, newValue);
|
||||
this.Update();
|
||||
//--
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
public File getFile() {
|
||||
return Paths.get(System.getProperty("user.dir"), "properties").toFile();
|
||||
}
|
||||
//-----------------
|
||||
//выкинуть.
|
||||
public void addFlagMenuItem(JMenu menu, String fieldName) {
|
||||
JMenuItem menu_item = new StableMenuItem(getFieldDescription(fieldName),
|
||||
getFlag(fieldName) ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png");
|
||||
//-
|
||||
menu_item.addActionListener(e -> {
|
||||
if (Global.mainModule.getPass(PassCode.UpdateProperty).Do(fieldName, !getFlag(fieldName)))
|
||||
menu_item.setIcon(Utils_.getIcon(getFlag(fieldName) ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||
});
|
||||
menu.add(menu_item);
|
||||
}
|
||||
public Object getValue(String fieldName){
|
||||
Object res=null;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user