рефактиринг фильтров завершен.
This commit is contained in:
2023-12-26 20:37:20 +03:00
parent b21e25e932
commit 64073e8b15
7 changed files with 50 additions and 142 deletions

View File

@@ -2,7 +2,6 @@ package TestingSystem.Common.Group;
import Common.Current;
import Common.Database.*;
import Common.UI.DataSetControlForm;
import Common.UI.Menus_2023.DataMenuBar;
import Common.UI.UI;
import Common.UI.Windows.Dialog.DBObjectDialog;
import ProjectData.LanguageName;
@@ -10,9 +9,7 @@ import TestingSystem.Common.Group.UI.GroupFields;
import TestingSystem.Common.Test.Test;
import TestingSystem.Common.Test.TestType;
import javax.swing.*;
import java.util.LinkedHashMap;
import java.util.Vector;
//-
public class GroupsDBTable extends iDBTable<Group> {
public static boolean filterMyOnly = false;
@@ -26,7 +23,7 @@ public class GroupsDBTable extends iDBTable<Group> {
@Override
public void fill() {
for (TestType type : TestType.values())
filters.add(new DBObjectFilter<Group>(dataSet, type.getDescription()) {
field_filters.add(new DBObjectFilter<Group>(dataSet, type.getDescription()) {
@Override
protected boolean validate(Group object) {
return object.type.equals(type);
@@ -38,7 +35,7 @@ public class GroupsDBTable extends iDBTable<Group> {
@Override
public void fill() {
for (LanguageName languageName : LanguageName.values()) {
filters.add(new DBObjectFilter<Group>(dataSet, languageName.getDescription()) {
field_filters.add(new DBObjectFilter<Group>(dataSet, languageName.getDescription()) {
@Override
protected boolean validate(Group object) {
return object.language.equals(languageName);

View File

@@ -35,18 +35,4 @@ public class GroupsMenuBar extends DataMenuBar {
}
});
}
/*
public void addFilters(JMenu typesFilterMenu, JMenu languagesFilterMenu) {
filters = addMenus(typesFilterMenu, languagesFilterMenu);
}
JMenuBar filters= null;
public void DropFilters() {
if (filters != null) {
remove(filters);
filters = null;
}
revalidate();
repaint();
}
*/
}