no message
This commit is contained in:
53
.idea/workspace.xml
generated
53
.idea/workspace.xml
generated
@@ -7,19 +7,60 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/SubscriberWorkspace/SubscriberWorkspacesForm.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/Group/UI/GroupsForm.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/Test/UI/TestsForm.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforSettingsCommand/UI/SapforSettingsCommandsForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Database/Objects/DBObject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Database/Objects/DBObject.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Database/Tables/DataSet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Database/Tables/DataSet.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Visual/DataSetControlForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/DataSetControlForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Global.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Global.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Compiler/Compiler.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Compiler/Compiler.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Compiler/UI/CompilersForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Compiler/UI/CompilersForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/DVMParameter/DVMParameterDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/DVMParameter/DVMParameterDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/EnvironmentValue/EnvironmentValue.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/EnvironmentValue/EnvironmentValue.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/EnvironmentValue/EnvironmentValuesDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/EnvironmentValue/EnvironmentValuesDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/EnvironmentValue/UI/EnvironmentsValuesForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/EnvironmentValue/UI/EnvironmentsValuesForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Makefile/Makefile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Makefile/Makefile.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Makefile/UI/MakefilesForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Makefile/UI/MakefilesForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Module/Module.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Module/Module.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Module/UI/ModulesForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Module/UI/ModulesForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/RunConfiguration/RunConfiguration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/RunConfiguration/RunConfiguration.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/RunConfiguration/RunConfigurationsDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/RunConfiguration/RunConfigurationsDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/RunConfiguration/UI/RunConfigurationsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/RunConfiguration/UI/RunConfigurationsForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/SapforProfileSetting/SapforProfileSetting.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/SapforProfileSetting/SapforProfileSetting.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/SapforProfileSetting/UI/SapforProfileSettingsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/SapforProfileSetting/UI/SapforProfileSettingsForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/CompilationTask/CompilationTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/CompilationTask/CompilationTask.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/CompilationTask/UI/CompilationTasksForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/CompilationTask/UI/CompilationTasksForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/RunTask/RunTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/RunTask/RunTask.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/RunTask/UI/RunTasksForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/RunTask/UI/RunTasksForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/User/UI/UsersForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/User/UI/UsersForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/User/User.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/User/User.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/GetComponentsActualVersions.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/GetComponentsActualVersions.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/MassSelectArrays.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/MassSelectArrays.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Messages/Message.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Messages/Message.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Messages/MessagesControlForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Messages/MessagesControlForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Messages/MessagesDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Messages/MessagesDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReport/BugReportsDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReport/BugReportsDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Messages/Recommendations/MessageRecommendation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Messages/Recommendations/MessageRecommendation.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/ProjectArray.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/ProjectArray.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/UI/ProjectArraysForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/UI/ProjectArraysForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReport/BugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReport/BugReport.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReport/UI/BugReportsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReport/UI/BugReportsForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMPackage/DVMPackageDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMPackage/DVMPackageDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/Component/Component.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/Component/Component.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/SubscriberWorkspace/SubscriberWorkspace.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/SubscriberWorkspace/SubscriberWorkspace.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/SubscriberWorkspace/SubscriberWorkspaceDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/SubscriberWorkspace/SubscriberWorkspaceDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/Group/Group.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/Group/Group.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/Group/GroupsDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/Group/GroupsDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/Test/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/Test/Test.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/Test/TestDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/Test/TestDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMPackage/DVMPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMPackage/DVMPackage.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMPackage/UI/DVMPackagesForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMPackage/UI/DVMPackagesForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMTasks/DVMRunTasksSet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMTasks/DVMRunTasksSet.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMTasks/DVMRunTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMTasks/DVMRunTask.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMTasks/UI/DVMRunTasksForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMTasks/UI/DVMRunTasksForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/SapforPackageDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/SapforPackageDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/SapforPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/SapforPackage.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/UI/SapforPackagesForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/UI/SapforPackagesForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/ServerSapfor/ServerSapforsDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/ServerSapfor/ServerSapforsDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforSettingsCommand/SapforSettingsCommand.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforSettingsCommand/SapforSettingsCommand.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforSettingsCommand/SapforSettingsCommandsDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforSettingsCommand/SapforSettingsCommandsDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/ServerSapfor/UI/ServerSapforsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/ServerSapfor/UI/ServerSapforsForm.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
|
||||
@@ -35,9 +35,6 @@ public abstract class DBObject implements Selectable, Serializable {
|
||||
public Index getSelectionCounter() {
|
||||
return null;
|
||||
}
|
||||
public boolean isVisible() {
|
||||
return true;
|
||||
}
|
||||
public abstract Object getPK();
|
||||
public String getBDialogName() {
|
||||
return Utils_.Brackets(getDialogName());
|
||||
|
||||
@@ -57,7 +57,7 @@ public class DataSet<K, D extends DBObject> extends DataSetAnchestor {
|
||||
}
|
||||
public void SelectAll(boolean flag) {
|
||||
for (D object : Data.values()) {
|
||||
if (object.isVisible())
|
||||
if (getUI().isObjectVisible(object))
|
||||
object.Select(flag);
|
||||
}
|
||||
RefreshUI();
|
||||
@@ -128,10 +128,10 @@ public class DataSet<K, D extends DBObject> extends DataSetAnchestor {
|
||||
}
|
||||
//-
|
||||
public int getSelectedCount() {
|
||||
return (int) Data.values().stream().filter(d -> d.isVisible() && d.isSelected()).count();
|
||||
return (int) Data.values().stream().filter(d -> getUI().isObjectVisible(d) && d.isSelected()).count();
|
||||
}
|
||||
public Vector<D> getSelectedItems() {
|
||||
return Data.values().stream().filter(d -> d.isVisible() && d.isSelected()).collect(Collectors.toCollection(Vector::new));
|
||||
return Data.values().stream().filter(d -> getUI().isObjectVisible(d) && d.isSelected()).collect(Collectors.toCollection(Vector::new));
|
||||
}
|
||||
public Vector<K> getSelectedKeys() {
|
||||
return Data.values().stream().filter(DBObject::isSelected).map(d -> (K) d.getPK()).collect(Collectors.toCollection(Vector::new));
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.Vector;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
public class DataSetControlForm<D extends DBObject> extends ControlForm<DataTable> {
|
||||
protected DataSet dataSource; //источник данных
|
||||
protected DataSet<?, D> dataSource; //источник данных
|
||||
protected DataMenuBar bar = null; //верхняя панель меню
|
||||
protected int current_row_i; //индекс текущей строки.
|
||||
protected boolean events_on = true;
|
||||
@@ -112,22 +112,25 @@ public class DataSetControlForm<D extends DBObject> extends ControlForm<DataTabl
|
||||
protected void AdditionalInitColumns() {
|
||||
//уточнение инфы по столбцам.
|
||||
}
|
||||
public Comparator getDefaultComparator() {
|
||||
protected Comparator getDefaultComparator() {
|
||||
return null;
|
||||
}
|
||||
public boolean isObjectVisible(D object){
|
||||
return true;
|
||||
}
|
||||
Vector<Object> getVisibleKeys() {
|
||||
Comparator comparator = getDefaultComparator();
|
||||
Vector<Object> res_keys = new Vector<>();
|
||||
if (comparator == null) {
|
||||
for (Object key : dataSource.Data.keySet())
|
||||
if (dataSource.get(key).isVisible())
|
||||
res_keys.add(key);
|
||||
for (D object: dataSource.Data.values()){
|
||||
if (isObjectVisible(object))
|
||||
res_keys.add(object.getPK());
|
||||
}
|
||||
} else {
|
||||
Vector<D> raw = new Vector<>();
|
||||
for (Object object : dataSource.Data.values()) {
|
||||
D object1 = (D) object;
|
||||
if (object1.isVisible())
|
||||
raw.add(object1);
|
||||
for (D object : dataSource.Data.values()) {
|
||||
if (isObjectVisible(object))
|
||||
raw.add(object);
|
||||
}
|
||||
raw.sort(comparator);
|
||||
for (D object : raw)
|
||||
@@ -247,7 +250,7 @@ public class DataSetControlForm<D extends DBObject> extends ControlForm<DataTabl
|
||||
if ((row >= 0)) {
|
||||
if (row != current_row_i) {
|
||||
current_row_i = row;
|
||||
dataSource.setCurrent(control.getRowObject(row));
|
||||
dataSource.setCurrent((D) control.getRowObject(row));
|
||||
if (events_on) {
|
||||
try {
|
||||
ShowCurrentObject();
|
||||
@@ -330,15 +333,6 @@ public class DataSetControlForm<D extends DBObject> extends ControlForm<DataTabl
|
||||
//могут быть и другие фильтры ( например свои/активные). перенести их сюда и обобщить
|
||||
return applyFiltersMenus(object);
|
||||
}
|
||||
/*
|
||||
//todo упразднить.
|
||||
// применить значение фильтра к фильру объекта напирмер Message.filterValue = text;
|
||||
public void changeHeaderFilterValue(int columnIndex, String text) {
|
||||
}
|
||||
public Object getHeaderFilterValue(int columnIndex) {
|
||||
return "";
|
||||
}
|
||||
*/
|
||||
@Override
|
||||
protected void redrawControl() {
|
||||
control.CorrectSizes();
|
||||
@@ -415,7 +409,7 @@ public class DataSetControlForm<D extends DBObject> extends ControlForm<DataTabl
|
||||
if ((dataSource.CurrentName() != null) && (dataSource.getCurrent() != null)) {
|
||||
savedCurrentKey = dataSource.getCurrent().getPK();
|
||||
}
|
||||
savedSelectedKeys = dataSource.getSelectedKeys();
|
||||
savedSelectedKeys = (Vector<Object>) dataSource.getSelectedKeys();
|
||||
}
|
||||
public void RestoreLastCurrent() {
|
||||
for (Object key : savedSelectedKeys) {
|
||||
@@ -426,13 +420,4 @@ public class DataSetControlForm<D extends DBObject> extends ControlForm<DataTabl
|
||||
SetCurrentByPK(savedCurrentKey);
|
||||
}
|
||||
}
|
||||
/*
|
||||
List<RowSorter.SortKey> sortKeys = new ArrayList<>();
|
||||
for (int i = 0; i < 6; ++i)
|
||||
sorter.setSortable(i, false);
|
||||
sortKeys.add(new RowSorter.SortKey(6, SortOrder.DESCENDING));
|
||||
sortKeys.add(new RowSorter.SortKey(7, SortOrder.DESCENDING));
|
||||
// sorter.setSortKeys(sortKeys);
|
||||
// sorter.sort();
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ public class Global {
|
||||
public static boolean ValidateComponentsStates() {
|
||||
bad_state = need_update = need_publish = 0;
|
||||
for (Component component : Components.Data.values()) {
|
||||
if (component.isVisible()) {
|
||||
// if (component.isVisible()) {
|
||||
switch (component.getState()) {
|
||||
case Not_found:
|
||||
case Unknown_version:
|
||||
@@ -192,7 +192,7 @@ public class Global {
|
||||
component.Select(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
return (bad_state == 0);
|
||||
}
|
||||
@@ -242,7 +242,8 @@ public class Global {
|
||||
Components.put(ComponentType.Instruction, new Instruction());
|
||||
//-
|
||||
for (Component component : Components.Data.values())
|
||||
if (component.isVisible()) component.InitialVersionCheck();
|
||||
// if (component.isVisible())
|
||||
component.InitialVersionCheck();
|
||||
//-
|
||||
AbstractTokenMakerFactory atmf = (AbstractTokenMakerFactory) TokenMakerFactory.getDefaultInstance();
|
||||
atmf.putMapping("text/FortranSPF", "_VisualDVM.Visual.Syntax.FortranSPFTokenMaker");
|
||||
|
||||
@@ -85,11 +85,6 @@ public class Compiler extends iDBObject {
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.Machine, machine_id);
|
||||
}
|
||||
//todo понять как извлекать версию чтобы выдавать нормальную инфу.
|
||||
@Override
|
||||
public String toString() {
|
||||
return call_command;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package _VisualDVM.GlobalData.Compiler.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -45,4 +47,8 @@ public class CompilersForm extends DataSetControlForm<Compiler> {
|
||||
PassCode.ShowCompilerVersion,
|
||||
PassCode.ShowCompilerHelp);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Compiler object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,10 @@ public class DVMParameterDBTable extends iDBTable<DVMParameter> {
|
||||
}
|
||||
*/
|
||||
for (DVMParameter par : (Global.mainModule.getDb()).dvmParameters.Data.values()) {
|
||||
if (par.isVisible() && (Result.id != par.id) && (par.name.equals(name))) {
|
||||
if (
|
||||
Global.mainModule.getDb().dvmParameters.getUI().isObjectVisible(par)
|
||||
|
||||
&& (Result.id != par.id) && (par.name.equals(name))) {
|
||||
Log.Writeln("В конфигурации запуска уже задан параметр DVM системы с именем " + Utils_.Brackets(name));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -10,10 +10,6 @@ public class EnvironmentValue extends iDBObject {
|
||||
public int machine_id = CommonConstants.Nan; //для удаления машин
|
||||
public int run_configuration_id = CommonConstants.Nan;
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.RunConfiguration, run_configuration_id);
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return name + "=" + Utils_.DQuotes(value);
|
||||
}
|
||||
|
||||
@@ -48,8 +48,10 @@ public class EnvironmentValuesDBTable extends iDBTable<EnvironmentValue> {
|
||||
if (value.contains("\"")) {
|
||||
Log.Writeln("Значение переменной окружения не может содержать двойные кавычки");
|
||||
}
|
||||
for (EnvironmentValue env : (Global.mainModule.getDb()).environmentValues.Data.values()) {
|
||||
if (env.isVisible() && (Result.id != env.id) && (env.name.equals(name))) {
|
||||
for (EnvironmentValue env : Global.mainModule.getDb().environmentValues.Data.values()) {
|
||||
if (
|
||||
Global.mainModule.getDb().environmentValues.getUI().isObjectVisible(env)
|
||||
&& (Result.id != env.id) && (env.name.equals(name))) {
|
||||
Log.Writeln("В конфигурации запуска уже задана переменная окружения с именем " + Utils_.Brackets(name));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package _VisualDVM.GlobalData.EnvironmentValue.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.EnvironmentValue;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -28,4 +31,8 @@ public class EnvironmentsValuesForm extends DataSetControlForm<EnvironmentValue>
|
||||
PassCode.DeleteEnvironmentValue,
|
||||
PassCode.PickCompilerEnvironments);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(EnvironmentValue object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.RunConfiguration, object.run_configuration_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,10 +21,6 @@ import java.util.stream.Collectors;
|
||||
public class Makefile extends ModuleAnchestor {
|
||||
public Makefile() {
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.Machine, machine_id);
|
||||
}
|
||||
public LinkedHashMap<LanguageName, Module> getActiveModules() {
|
||||
return Global.mainModule.getDb().getByFKAndGroupBy(this, Module.class, "language", LanguageName.class).values().stream().filter(Module::isSelected).collect(Collectors.toMap(module -> module.language, module -> module, (a, b) -> b, LinkedHashMap::new));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package _VisualDVM.GlobalData.Makefile.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Makefile.Makefile;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -39,4 +42,8 @@ public class MakefilesForm extends DataSetControlForm<Makefile> {
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Makefile object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,10 +19,6 @@ public class Module extends ModuleAnchestor {
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.Makefile, makefile_id);
|
||||
}
|
||||
@Override
|
||||
public boolean isSelected() {
|
||||
return on > 0;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package _VisualDVM.GlobalData.Module.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Module.Module;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -31,4 +34,9 @@ public class ModulesForm extends DataSetControlForm<Module> {
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.EditModule);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Module object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Makefile, object.makefile_id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -182,10 +182,6 @@ public class RunConfiguration extends iDBObject {
|
||||
return res;
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.Machine, machine_id);
|
||||
}
|
||||
@Override
|
||||
public String getFKName() {
|
||||
return "run_configuration_id";
|
||||
}
|
||||
|
||||
@@ -43,7 +43,8 @@ public class RunConfigurationsDBTable extends iDBTable<RunConfiguration> {
|
||||
@Override
|
||||
public void fillFields() {
|
||||
for (Compiler compiler : (Global.mainModule.getDb()).compilers.Data.values()) {
|
||||
if (compiler.isVisible() && compiler.type.equals(CompilerType.dvm))
|
||||
if (Global.mainModule.getDb().compilers.getUI().isObjectVisible(compiler)
|
||||
&& compiler.type.equals(CompilerType.dvm))
|
||||
fields.cbLauncherCall.addItem(compiler);
|
||||
}
|
||||
UI.TrySelect_s(fields.cbLauncherCall, Result.LauncherCall);
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package _VisualDVM.GlobalData.RunConfiguration.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -39,4 +42,8 @@ public class RunConfigurationsForm extends DataSetControlForm<RunConfiguration>
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(RunConfiguration object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +13,6 @@ public class SapforProfileSetting extends iDBObject {
|
||||
@Description("DEFAULT -1")
|
||||
public int sapforprofile_id = CommonConstants.Nan;
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.SapforProfile, sapforprofile_id);
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package _VisualDVM.GlobalData.SapforProfileSetting.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.SapforProfileSetting.SapforProfileSetting;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -23,4 +26,8 @@ public class SapforProfileSettingsForm extends DataSetControlForm<SapforProfileS
|
||||
public boolean hasMenuBar() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(SapforProfileSetting object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.SapforProfile, object.sapforprofile_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,14 +69,6 @@ public class CompilationTask extends Task {
|
||||
public File getHome() {
|
||||
return Global.CompilationTasksDirectory;
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return
|
||||
Global.mainModule.matchCurrentID(Current.Machine, machine_id) &&
|
||||
Global.mainModule.matchCurrentID(Current.User, user_id) &&
|
||||
Global.mainModule.HasProject() &&
|
||||
belongsToProject(Global.mainModule.getProject());
|
||||
}
|
||||
public Makefile getMakefile() {
|
||||
return Global.mainModule.getDb().getById(Makefile.class, makefile_id);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package _VisualDVM.GlobalData.Tasks.CompilationTask.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererDate;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Tasks.CompilationTask.CompilationTask;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -53,4 +55,11 @@ public class CompilationTasksForm extends DataSetControlForm<CompilationTask> {
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.DeleteCompilationTasks);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(CompilationTask object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id) &&
|
||||
MainModule_.instance.matchCurrentID(Current.User, object.user_id) &&
|
||||
Global.mainModule.HasProject() &&
|
||||
object.belongsToProject(Global.mainModule.getProject());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,17 +48,6 @@ public class RunTask extends Task {
|
||||
return getRunConfiguration().getLaunchScriptText(getCompilationTask().binary_name, matrix);
|
||||
}
|
||||
//---------------------------------------
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return
|
||||
Global.mainModule.matchCurrentID(Current.Machine, machine_id) &&
|
||||
Global.mainModule.matchCurrentID(Current.User, user_id) &&
|
||||
Global.mainModule.matchCurrentID(Current.RunConfiguration, run_configuration_id) &&
|
||||
Global.mainModule.HasProject() &&
|
||||
belongsToProject(Global.mainModule.getProject()) &&
|
||||
Global.mainModule.HasCompilationTask() &&
|
||||
compilation_task_id == Global.mainModule.getCompilationTask().id;
|
||||
}
|
||||
public RunConfiguration getRunConfiguration() {
|
||||
return (Global.mainModule.getDb()).runConfigurations.Data.get(run_configuration_id);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package _VisualDVM.GlobalData.Tasks.RunTask.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererDate;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Tasks.RunTask.RunTask;
|
||||
import _VisualDVM.MainModule;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -46,4 +49,15 @@ public class RunTasksForm extends DataSetControlForm<RunTask> {
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.DeleteRunTasks);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(RunTask object) {
|
||||
return
|
||||
MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id) &&
|
||||
MainModule_.instance.matchCurrentID(Current.User, object.user_id) &&
|
||||
MainModule_.instance.matchCurrentID(Current.RunConfiguration, object.run_configuration_id) &&
|
||||
Global.mainModule.HasProject() &&
|
||||
object.belongsToProject(Global.mainModule.getProject()) &&
|
||||
Global.mainModule.HasCompilationTask() &&
|
||||
object.compilation_task_id == Global.mainModule.getCompilationTask().id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package _VisualDVM.GlobalData.User.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -45,4 +47,9 @@ public class UsersForm extends DataSetControlForm<User> {
|
||||
PassCode.InitialiseUser,
|
||||
PassCode.DeleteUser);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isObjectVisible(User object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.GlobalData.User;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.iDBObject;
|
||||
import Common.MainModule_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
@@ -19,10 +20,6 @@ public class User extends iDBObject {
|
||||
//-
|
||||
@Description("IGNORE")
|
||||
public UserConnection connection = null;
|
||||
/*
|
||||
@Description("DEFAULT '?'")
|
||||
public String email = "?";
|
||||
*/
|
||||
//--
|
||||
public User(Machine machine_in, String login_in, String password_in) {
|
||||
machine_id = machine_in.id;
|
||||
@@ -41,10 +38,6 @@ public class User extends iDBObject {
|
||||
public User() {
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.Machine, machine_id);
|
||||
}
|
||||
@Override
|
||||
public String getDialogName() {
|
||||
return login;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ public class GetComponentsActualVersions extends ComponentsRepositoryPass {
|
||||
protected void ServerAction() throws Exception {
|
||||
Vector<String> versions = new Vector<>();
|
||||
for (Component component : Global.Components.Data.values())
|
||||
if (component.isVisible())
|
||||
versions.add(component.getComponentType().toString());
|
||||
//if (component.isVisible())
|
||||
versions.add(component.getComponentType().toString());
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.GetComponentsVersions, String.join("\n", versions)));
|
||||
LinkedHashMap<ComponentType, String> response_actual_versions = (LinkedHashMap<ComponentType, String>) response.object;
|
||||
for (ComponentType componentType : response_actual_versions.keySet()) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class MassSelectArrays extends SapforModification {
|
||||
Vector<String> keys = new Vector<>();
|
||||
Vector<String> states = new Vector<>();
|
||||
for (ProjectArray array : arrays) {
|
||||
if (array.isVisible() && array.isSelectionEnabled()) {
|
||||
if (Global.mainModule.getProject().declaratedArrays.getUI().isObjectVisible(array) && array.isSelectionEnabled()) {
|
||||
keys.add(array.UniqKey);
|
||||
states.add(String.valueOf(new_state.ordinal()));
|
||||
}
|
||||
@@ -60,7 +60,10 @@ public class MassSelectArrays extends SapforModification {
|
||||
sapfor.ResetAllAnalyses();
|
||||
//--
|
||||
for (ProjectArray array : arrays) {
|
||||
if (array.isVisible() && array.isSelectionEnabled()) {
|
||||
if (
|
||||
|
||||
|
||||
Global.mainModule.getProject().declaratedArrays.getUI().isObjectVisible(array) && array.isSelectionEnabled()) {
|
||||
array.State = new_state;
|
||||
array.SaveUserState();
|
||||
}
|
||||
|
||||
@@ -443,16 +443,7 @@ public class Message extends FileObject {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return true;
|
||||
/*
|
||||
if (Global.mainModule.HasFile() && Global.mainModule.getFile().name.equals(file)) {
|
||||
Object o = Global.mainModule.get(Current.FileGraphElement);
|
||||
return !(o instanceof FileObjectWithMessages) || ((FileObjectWithMessages) o).HasMessage(this);
|
||||
} else return false;
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getFieldAt(int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
|
||||
@@ -40,11 +40,22 @@ public class MessagesControlForm extends DataSetControlForm<Message> {
|
||||
}
|
||||
*/
|
||||
@Override
|
||||
public Comparator<Message> getDefaultComparator() {
|
||||
protected Comparator<Message> getDefaultComparator() {
|
||||
return Comparator.comparingInt(o -> o.line);
|
||||
}
|
||||
@Override
|
||||
public boolean hasMenuBar() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Message object) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
if (Global.mainModule.HasFile() && Global.mainModule.getFile().name.equals(file)) {
|
||||
Object o = Global.mainModule.get(Current.FileGraphElement);
|
||||
return !(o instanceof FileObjectWithMessages) || ((FileObjectWithMessages) o).HasMessage(this);
|
||||
} else return false;
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -42,10 +42,6 @@ public class MessageRecommendation extends iDBObject {
|
||||
argValue.equals(recommendation_in.argValue);
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
|
||||
@@ -8,8 +8,4 @@ public class MessageWarning extends Message {
|
||||
}
|
||||
public MessageWarning() {
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return super.isVisible() && Global.mainModule.getProject().db.warnings.getUI().ApplyFilters(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,15 +368,6 @@ public class ProjectArray extends DBObject {
|
||||
return (State == ArrayState.Selected);
|
||||
}
|
||||
//-
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
if (isTemplFlag > 0) return true;
|
||||
return shortName.startsWith(filterName) &&
|
||||
location.toString().startsWith(filterLocation) &&
|
||||
locName.startsWith(filterLocationName) &&
|
||||
has_decl_place(filterFile) &&
|
||||
has_region(filterRegion);
|
||||
}
|
||||
public void init_new_ac() {
|
||||
ac_new.clear();
|
||||
for (int dim : ac_current.keySet())
|
||||
|
||||
@@ -39,4 +39,13 @@ public class ProjectArraysForm extends DataSetControlForm<ProjectArray> {
|
||||
columns.get(4).setMaxWidth(200);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(ProjectArray object) {
|
||||
if (object.isTemplFlag > 0) return true;
|
||||
return object.shortName.startsWith(object.filterName) &&
|
||||
object.location.toString().startsWith(object.filterLocation) &&
|
||||
object.locName.startsWith(object.filterLocationName) &&
|
||||
object.has_decl_place(object.filterFile) &&
|
||||
object.has_region(object.filterRegion);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,10 +70,6 @@ public class BugReport extends rDBObject {
|
||||
owner = b.owner;
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return BugReportInterface.isVisible(this);
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
|
||||
@@ -79,7 +79,11 @@ public class BugReportsForm extends DataSetControlForm<BugReport> {
|
||||
PassCode.DeleteBugReport);
|
||||
}
|
||||
@Override
|
||||
public Comparator<BugReport> getDefaultComparator() {
|
||||
protected Comparator<BugReport> getDefaultComparator() {
|
||||
return (o1, o2) -> -(o1.getDate().compareTo(o2.getDate()));
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(BugReport object) {
|
||||
return BugReportInterface.isVisible(object);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,10 +77,6 @@ public abstract class Component extends DBObject implements Loggable {
|
||||
"\nна выполнение");
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public Object getPK() {
|
||||
return getComponentType();
|
||||
}
|
||||
|
||||
@@ -6,12 +6,6 @@ public class SubscriberWorkspace extends iDBObject {
|
||||
public String URL; //адрес:порт машины
|
||||
public String login; // имя пользователя
|
||||
public String path; //рабочая папка на машине
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.HasSubscriber() &&
|
||||
Global.mainModule.getSubscriber().address.equals(email) &&
|
||||
(Global.mainModule.getAccount().isAdmin() || Global.mainModule.getAccount().email.equals(Global.mainModule.getSubscriber().address));
|
||||
}
|
||||
//-
|
||||
@Override
|
||||
public Object getFieldAt(int columnIndex) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -33,19 +34,7 @@ public class SubscriberWorkspaceDBTable extends iDBTable<SubscriberWorkspace> {
|
||||
//-
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new DataSetControlForm(this, mountPanel) {
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"URL",
|
||||
"пользователь",
|
||||
"папка"};
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(getPluralDescription(), PassCode.DeleteSubscriberWorkspace);
|
||||
}
|
||||
};
|
||||
return new SubscriberWorkspacesForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public PassCode_ getDeletePassCode() {
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package _VisualDVM.Repository.SubscriberWorkspace;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import javax.swing.*;
|
||||
public class SubscriberWorkspacesForm extends DataSetControlForm<SubscriberWorkspace> {
|
||||
public SubscriberWorkspacesForm(DataSet<?, SubscriberWorkspace> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"URL",
|
||||
"пользователь",
|
||||
"папка"};
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.DeleteSubscriberWorkspace);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(SubscriberWorkspace object) {
|
||||
return Global.mainModule.HasSubscriber() && Global.mainModule.getSubscriber().address.equals(object.email) &&
|
||||
(Global.mainModule.getAccount().isAdmin() || Global.mainModule.getAccount().email.equals(Global.mainModule.getSubscriber().address));
|
||||
}
|
||||
}
|
||||
@@ -69,11 +69,6 @@ public class Group extends riDBObject {
|
||||
}
|
||||
}
|
||||
//--
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return (!GroupsDBTable.filterMyOnly || Global.mainModule.getAccount().email.equals(sender_address)) &&
|
||||
Global.testingServer.db.groups.getUI().ApplyFilters(this);
|
||||
}
|
||||
public String getSummary() {
|
||||
return description + " " + language.getDescription();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import _VisualDVM.ProjectData.LanguageName;
|
||||
import _VisualDVM.TestingSystem.Common.Group.UI.AddGroupMenu;
|
||||
import _VisualDVM.TestingSystem.Common.Group.UI.EditGroupMenu;
|
||||
import _VisualDVM.TestingSystem.Common.Group.UI.GroupFields;
|
||||
import _VisualDVM.TestingSystem.Common.Group.UI.GroupsForm;
|
||||
import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||
import _VisualDVM.TestingSystem.Common.Test.TestType;
|
||||
|
||||
@@ -48,76 +49,7 @@ public class GroupsDBTable extends iDBTable<Group> {
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new DataSetControlForm(this, mountPanel) {
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"имя",
|
||||
"автор",
|
||||
"тип",
|
||||
"язык"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.SynchronizeTests,
|
||||
PassCode.ConvertCorrectnessTests) {
|
||||
{
|
||||
addMenus(new AddGroupMenu(), new EditGroupMenu());
|
||||
addPasses(PassCode.DeleteGroup);
|
||||
add(new JSeparator());
|
||||
add(new MenuBarButton() {
|
||||
{
|
||||
setText("Свои");
|
||||
setToolTipText("Отображать только группы тестов авторства пользователя");
|
||||
Mark();
|
||||
addActionListener(e -> {
|
||||
GroupsDBTable.filterMyOnly = !GroupsDBTable.filterMyOnly;
|
||||
Mark();
|
||||
Global.testingServer.db.groups.ShowUI();
|
||||
});
|
||||
}
|
||||
public void Mark() {
|
||||
setIcon(Utils_.getIcon(GroupsDBTable.filterMyOnly ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected void createFilters() {
|
||||
filtersMenus.add(new DataSetFiltersMenu<Group>("Тип", dataSource) {
|
||||
@Override
|
||||
public void fill() {
|
||||
for (TestType type : TestType.values())
|
||||
field_filters.add(new Common.Visual.DBObjectFilter<Group>(dataSet, type.getDescription()) {
|
||||
@Override
|
||||
protected boolean validate(Group object) {
|
||||
return object.type.equals(type);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
filtersMenus.add(new DataSetFiltersMenu<Group>("Язык", dataSource) {
|
||||
@Override
|
||||
public void fill() {
|
||||
for (LanguageName languageName : LanguageName.values()) {
|
||||
field_filters.add(new DBObjectFilter<Group>(dataSet, languageName.getDescription()) {
|
||||
@Override
|
||||
protected boolean validate(Group object) {
|
||||
return object.language.equals(languageName);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
return new GroupsForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
|
||||
94
src/_VisualDVM/TestingSystem/Common/Group/UI/GroupsForm.java
Normal file
94
src/_VisualDVM/TestingSystem/Common/Group/UI/GroupsForm.java
Normal file
@@ -0,0 +1,94 @@
|
||||
package _VisualDVM.TestingSystem.Common.Group.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Controls.MenuBarButton;
|
||||
import Common.Visual.DBObjectFilter;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.DataSetFiltersMenu;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.LanguageName;
|
||||
import _VisualDVM.TestingSystem.Common.Group.Group;
|
||||
import _VisualDVM.TestingSystem.Common.Group.GroupsDBTable;
|
||||
import _VisualDVM.TestingSystem.Common.Test.TestType;
|
||||
|
||||
import javax.swing.*;
|
||||
public class GroupsForm extends DataSetControlForm<Group> {
|
||||
public GroupsForm(DataSet<?, Group> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"имя",
|
||||
"автор",
|
||||
"тип",
|
||||
"язык"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Group object) {
|
||||
return (!GroupsDBTable.filterMyOnly || Global.mainModule.getAccount().email.equals(object.sender_address)) &&
|
||||
Global.testingServer.db.groups.getUI().ApplyFilters(object);
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
PassCode.SynchronizeTests,
|
||||
PassCode.ConvertCorrectnessTests) {
|
||||
{
|
||||
addMenus(new AddGroupMenu(), new EditGroupMenu());
|
||||
addPasses(PassCode.DeleteGroup);
|
||||
add(new JSeparator());
|
||||
add(new MenuBarButton() {
|
||||
{
|
||||
setText("Свои");
|
||||
setToolTipText("Отображать только группы тестов авторства пользователя");
|
||||
Mark();
|
||||
addActionListener(e -> {
|
||||
GroupsDBTable.filterMyOnly = !GroupsDBTable.filterMyOnly;
|
||||
Mark();
|
||||
Global.testingServer.db.groups.ShowUI();
|
||||
});
|
||||
}
|
||||
public void Mark() {
|
||||
setIcon(Utils_.getIcon(GroupsDBTable.filterMyOnly ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected void createFilters() {
|
||||
filtersMenus.add(new DataSetFiltersMenu<Group>("Тип", dataSource) {
|
||||
@Override
|
||||
public void fill() {
|
||||
for (TestType type : TestType.values())
|
||||
field_filters.add(new Common.Visual.DBObjectFilter<Group>(dataSet, type.getDescription()) {
|
||||
@Override
|
||||
protected boolean validate(Group object) {
|
||||
return object.type.equals(type);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
filtersMenus.add(new DataSetFiltersMenu<Group>("Язык", dataSource) {
|
||||
@Override
|
||||
public void fill() {
|
||||
for (LanguageName languageName : LanguageName.values()) {
|
||||
field_filters.add(new DBObjectFilter<Group>(dataSet, languageName.getDescription()) {
|
||||
@Override
|
||||
protected boolean validate(Group object) {
|
||||
return object.language.equals(languageName);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -56,11 +56,6 @@ public class Test extends riDBObject {
|
||||
if (UI.isActive())
|
||||
Global.mainModule.getUI().getMainWindow().ShowCheckedTestsCount();
|
||||
}
|
||||
//---
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.Group, group_id);
|
||||
}
|
||||
//-
|
||||
public File getArchive() {
|
||||
return new File(Global.TestsDirectory, id + ".zip");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.TestingSystem.Common.Test;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.MainModule_;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
@@ -11,6 +12,7 @@ import _VisualDVM.TestingSystem.Common.Group.Group;
|
||||
import _VisualDVM.TestingSystem.Common.Test.UI.AddTestMenu;
|
||||
import _VisualDVM.TestingSystem.Common.Test.UI.EditTestMenu;
|
||||
import _VisualDVM.TestingSystem.Common.Test.UI.TestFields;
|
||||
import _VisualDVM.TestingSystem.Common.Test.UI.TestsForm;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Vector;
|
||||
@@ -28,33 +30,8 @@ public class TestDBTable extends iDBTable<Test> {
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new DataSetControlForm(this, mountPanel) {
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"имя",
|
||||
"min_dim",
|
||||
"max_dim",
|
||||
"файлы"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(getPluralDescription()) {
|
||||
{
|
||||
addMenus(new AddTestMenu(), new EditTestMenu());
|
||||
addPasses(PassCode.DownloadTest, PassCode.DeleteTest);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
return new TestsForm(this, mountPanel);
|
||||
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
|
||||
45
src/_VisualDVM/TestingSystem/Common/Test/UI/TestsForm.java
Normal file
45
src/_VisualDVM/TestingSystem/Common/Test/UI/TestsForm.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package _VisualDVM.TestingSystem.Common.Test.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||
|
||||
import javax.swing.*;
|
||||
public class TestsForm extends DataSetControlForm<Test> {
|
||||
public TestsForm(DataSet<?, Test> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"имя",
|
||||
"min_dim",
|
||||
"max_dim",
|
||||
"файлы"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription()) {
|
||||
{
|
||||
addMenus(new AddTestMenu(), new EditTestMenu());
|
||||
addPasses(PassCode.DownloadTest, PassCode.DeleteTest);
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Test object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Group, object.group_id);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -110,11 +110,6 @@ public class DVMPackage extends TestingPackage<DVMPackage_json> {
|
||||
return new User(user_name, user_password, user_workspace);
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return (!DVMPackageDBTable.filterMyOnly || Global.mainModule.getAccount().email.equals(sender_address)) &&
|
||||
(!DVMPackageDBTable.filterActive || state.isActive());
|
||||
}
|
||||
@Override
|
||||
public void checkFinishState() throws Exception {
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -111,7 +111,7 @@ public class DVMPackagesForm extends DataSetControlForm<DVMPackage> {
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Comparator<DVMPackage> getDefaultComparator() {
|
||||
protected Comparator<DVMPackage> getDefaultComparator() {
|
||||
return new Comparator<DVMPackage>() {
|
||||
@Override
|
||||
public int compare(DVMPackage o1, DVMPackage o2) {
|
||||
@@ -119,4 +119,9 @@ public class DVMPackagesForm extends DataSetControlForm<DVMPackage> {
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(DVMPackage object) {
|
||||
return (!DVMPackageDBTable.filterMyOnly || Global.mainModule.getAccount().email.equals(object.sender_address)) &&
|
||||
(!DVMPackageDBTable.filterActive || object.state.isActive());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,10 +111,6 @@ public class DVMRunTask extends DVMTask {
|
||||
public String getUsrPar() {
|
||||
return usr_par.replace("\n", ";");
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.testingServer.db.dvmRunTasks.getUI().ApplyFilters(this);
|
||||
}
|
||||
public File getCompilationTaskWorkspace() {
|
||||
return Paths.get(
|
||||
Global.DVMPackagesDirectory.getAbsolutePath(),
|
||||
|
||||
@@ -6,6 +6,7 @@ import Common.Visual.DataSetFiltersMenu;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererProgressBar;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Tasks.TaskState;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.DVM.DVMTasks.DVMRunTask;
|
||||
@@ -81,7 +82,7 @@ public class DVMRunTasksForm extends DataSetControlForm<DVMRunTask> {
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public Comparator<DVMRunTask> getDefaultComparator() {
|
||||
protected Comparator<DVMRunTask> getDefaultComparator() {
|
||||
return new Comparator<DVMRunTask>() {
|
||||
@Override
|
||||
public int compare(DVMRunTask o1, DVMRunTask o2) {
|
||||
@@ -89,4 +90,8 @@ public class DVMRunTasksForm extends DataSetControlForm<DVMRunTask> {
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(DVMRunTask object) {
|
||||
return Global.testingServer.db.dvmRunTasks.getUI().ApplyFilters(object);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,12 +100,6 @@ public class SapforPackage extends TestingPackage<SapforPackage_json> {
|
||||
package_json = null; // объект больше не нужен.
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return (!SapforPackageDBTable.filterMyOnly || Global.mainModule.getAccount().email.equals(sender_address)) &&
|
||||
(!SapforPackageDBTable.filterActive || state.isActive())
|
||||
;
|
||||
}
|
||||
@Override
|
||||
public void checkFinishState() throws Exception {
|
||||
readJson();
|
||||
int good = 0;
|
||||
|
||||
@@ -94,7 +94,7 @@ public class SapforPackagesForm extends DataSetControlForm<SapforPackage> {
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Comparator<SapforPackage> getDefaultComparator() {
|
||||
protected Comparator<SapforPackage> getDefaultComparator() {
|
||||
return new Comparator<SapforPackage>() {
|
||||
@Override
|
||||
public int compare(SapforPackage o1, SapforPackage o2) {
|
||||
@@ -102,4 +102,9 @@ public class SapforPackagesForm extends DataSetControlForm<SapforPackage> {
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(SapforPackage object) {
|
||||
return (!SapforPackageDBTable.filterMyOnly || Global.mainModule.getAccount().email.equals(object.sender_address)) &&
|
||||
(!SapforPackageDBTable.filterActive || object.state.isActive());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import Common.MainModule_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -16,10 +17,6 @@ public class SapforSettingsCommand extends riDBObject {
|
||||
this.SynchronizeFields(sapforSettingsCommand);
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.SapforSettings, sapforsettings_id);
|
||||
}
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
SapforSettingsCommand c = (SapforSettingsCommand) src;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import Common.MainModule_;
|
||||
import Common.Passes.PassCode_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
@@ -10,6 +11,7 @@ import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettings.SapforSettings;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettings.UI.SapforSettingsCommandFields;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand.UI.SapforSettingsCommandsForm;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Vector;
|
||||
@@ -31,25 +33,7 @@ public class SapforSettingsCommandsDBTable extends iDBTable<SapforSettingsComman
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI(JPanel mountPanel) {
|
||||
return new DataSetControlForm(this, mountPanel) {
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"Проход"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(getPluralDescription(),
|
||||
PassCode.PublishSapforSettingsCommand,
|
||||
PassCode.EditSapforSettingsCommand,
|
||||
PassCode.DeleteSapforSettingsCommand);
|
||||
}
|
||||
};
|
||||
return new SapforSettingsCommandsForm(this, mountPanel);
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<SapforSettingsCommand, SapforSettingsCommandFields> getDialog() {
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettingsCommand.SapforSettingsCommand;
|
||||
|
||||
import javax.swing.*;
|
||||
public class SapforSettingsCommandsForm extends DataSetControlForm<SapforSettingsCommand> {
|
||||
public SapforSettingsCommandsForm(DataSet<?, SapforSettingsCommand> dataSource_in, JPanel mountPanel_in) {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
public boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"Проход"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
PassCode.PublishSapforSettingsCommand,
|
||||
PassCode.EditSapforSettingsCommand,
|
||||
PassCode.DeleteSapforSettingsCommand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isObjectVisible(SapforSettingsCommand object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.SapforSettings, object.sapforsettings_id);
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class ServerSapforsForm extends DataSetControlForm<ServerSapfor> {
|
||||
PassCode.DeleteServerSapfor);
|
||||
}
|
||||
@Override
|
||||
public Comparator<ServerSapfor> getDefaultComparator() {
|
||||
protected Comparator<ServerSapfor> getDefaultComparator() {
|
||||
return new Comparator<ServerSapfor>() {
|
||||
@Override
|
||||
public int compare(ServerSapfor o1, ServerSapfor o2) {
|
||||
|
||||
Reference in New Issue
Block a user