рефакторинг. вынес в обобщенную часть бд, но еще не все
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Editor.Viewer;
|
||||
import Common_old.UI.Menus_2023.FileMenuBar.FileMenuBar;
|
||||
@@ -171,29 +173,29 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
//----
|
||||
@Override
|
||||
public void ShowWarningsCount() {
|
||||
boolean flag = Global.db.settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
messagesTabs.setTitleAt(1, (flag ? "Предупреждения: " : "") + file.father.db.warnings.getVisibleKeys().size());
|
||||
}
|
||||
@Override
|
||||
public void ShowErrorsCount() {
|
||||
boolean flag = Global.db.settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
messagesTabs.setTitleAt(2, (flag ? "Ошибки: " : "") + file.father.db.errors.getVisibleKeys().size());
|
||||
}
|
||||
@Override
|
||||
public void ShowNotesCount() {
|
||||
boolean flag = Global.db.settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
messagesTabs.setTitleAt(0, (flag ? "Примечания: " : "") + file.father.db.notes.getVisibleKeys().size());
|
||||
}
|
||||
@Override
|
||||
public void ShowRecommendationsCount() {
|
||||
boolean flag = Global.db.settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
messagesTabs.setTitleAt(3, (flag ? "Рекомендации: " : "") + file.father.db.recommendations.getVisibleKeys().size());
|
||||
}
|
||||
//---
|
||||
@Override
|
||||
public void RefreshTabsNames() {
|
||||
UI.ShowTabsNames(graphsTabs);
|
||||
boolean flag = Global.db.settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
boolean flag = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
//--
|
||||
ShowNotesCount();
|
||||
ShowWarningsCount();
|
||||
@@ -235,7 +237,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
}
|
||||
@Override
|
||||
public void ShowNoMessages() {
|
||||
boolean full_tiles = Global.db.settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
boolean full_tiles = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.ShowFullTabsNames).toBoolean();
|
||||
file.father.db.notes.ClearUI();
|
||||
file.father.db.warnings.ClearUI();
|
||||
file.father.db.errors.ClearUI();
|
||||
@@ -367,7 +369,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
//--
|
||||
@Override
|
||||
public void CollapseGraphs() {
|
||||
Global.db.splitters.get("SC12").position = SC12.getDividerLocation();
|
||||
CommonUtils.db.splitters.get("SC12").position = SC12.getDividerLocation();
|
||||
CommonUI.Clear(editorBackground);
|
||||
editorBackground.add(editorPanel);
|
||||
}
|
||||
@@ -377,12 +379,12 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
SC12.setRightComponent(editorPanel);
|
||||
editorBackground.add(SC12);
|
||||
//--
|
||||
SC12.setDividerLocation(Global.db.splitters.get("SC12").position);
|
||||
SC12.setDividerLocation(CommonUtils.db.splitters.get("SC12").position);
|
||||
SC12.updateUI();
|
||||
}
|
||||
@Override
|
||||
public void CollapseMessages() {
|
||||
Global.db.splitters.get("SC1").position = SC1.getDividerLocation();
|
||||
CommonUtils.db.splitters.get("SC1").position = SC1.getDividerLocation();
|
||||
CommonUI.Clear(content);
|
||||
content.add(editorBackground);
|
||||
}
|
||||
@@ -391,7 +393,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
CommonUI.Clear(content);
|
||||
SC1.setLeftComponent(editorBackground);
|
||||
content.add(SC1);
|
||||
SC1.setDividerLocation(Global.db.splitters.get("SC1").position);
|
||||
SC1.setDividerLocation(CommonUtils.db.splitters.get("SC1").position);
|
||||
SC1.updateUI();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user