no message
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
package Visual_DVM_2021.Passes;
|
||||
import Common.Current_;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Stopwatch;
|
||||
import Common.Utils.TextLog;
|
||||
import Common.Visual.CommonUI;
|
||||
import Visual_DVM_2021.PassStats.PassStats;
|
||||
import Visual_DVM_2021.Passes.UI.PassForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.Visual.Controls.PassButton;
|
||||
import _VisualDVM.Visual.Controls.PassControl;
|
||||
import _VisualDVM.Visual.Menus.StablePassMenuItem;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import Common.Utils.Stopwatch;
|
||||
import Common.Utils.TextLog;
|
||||
import Visual_DVM_2021.PassStats.PassStats;
|
||||
import Visual_DVM_2021.Passes.UI.PassForm;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
@@ -49,27 +49,25 @@ public class Pass<T> {
|
||||
for (PassCode code_in : codes_in)
|
||||
passes.get(code_in).setControlsVisible(flag);
|
||||
}
|
||||
//важно. вызывать только если есть интерфейс.
|
||||
//важно. вызывать только если есть интерфейс. passstats делать частью общей бд.пусть будут.
|
||||
public static void CheckAllStats() throws Exception {
|
||||
for (Pass pass : FAPasses) {
|
||||
if (!((GlobalDatabase)CommonUtils.db).passStats.Data.containsKey(pass.code()))
|
||||
if (!((GlobalDatabase) CommonUtils.db).passStats.Data.containsKey(pass.code()))
|
||||
CommonUtils.db.Insert(pass.stats = new PassStats(pass));
|
||||
else pass.stats = ((GlobalDatabase)CommonUtils.db).passStats.Data.get(pass.code());
|
||||
else pass.stats = ((GlobalDatabase) CommonUtils.db).passStats.Data.get(pass.code());
|
||||
}
|
||||
FAPasses.sort(new SortPassesByStats());
|
||||
}
|
||||
public static void CreateAll() {
|
||||
for (PassCode code : PassCode.values()) {
|
||||
if (code != PassCode.Undefined) {
|
||||
try {
|
||||
Class<?> clazz = Class.forName("Visual_DVM_2021.Passes.All." + code.toString());
|
||||
Pass pass = ((Pass) clazz.newInstance());
|
||||
passes.put(code, pass);
|
||||
if (pass.hasStats())
|
||||
FAPasses.add(pass);
|
||||
} catch (Exception ex) {
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
try {
|
||||
Class<?> clazz = Class.forName("Visual_DVM_2021.Passes.All." + code.toString());
|
||||
Pass pass = ((Pass) clazz.newInstance());
|
||||
passes.put(code, pass);
|
||||
if (pass.hasStats())
|
||||
FAPasses.add(pass);
|
||||
} catch (Exception ex) {
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,7 +76,7 @@ public class Pass<T> {
|
||||
public String getIconPath() {
|
||||
return null;
|
||||
}
|
||||
public Icon getTabIcon(){
|
||||
public Icon getTabIcon() {
|
||||
return CommonUtils.getTabIcon(getIconPath());
|
||||
}
|
||||
public AbstractAction getControlAction() {
|
||||
|
||||
Reference in New Issue
Block a user