упорядочил папки с кодом.
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
package TestingSystem.SAPFOR.SapforConfigurationCommand;
|
||||
import Common.Constants;
|
||||
import Common.Current;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Database.riDBObject;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
public class SapforConfigurationCommand extends riDBObject {
|
||||
@Description("DEFAULT -1")
|
||||
public int sapforconfiguration_id = Constants.Nan;
|
||||
public PassCode_2021 passCode = PassCode_2021.SPF_RemoveDvmDirectives;
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Current.HasSapforConfiguration() && (Current.getSapforConfiguration().id == sapforconfiguration_id);
|
||||
}
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
SapforConfigurationCommand c = (SapforConfigurationCommand) src;
|
||||
sapforconfiguration_id = c.sapforconfiguration_id;
|
||||
passCode = c.passCode;
|
||||
}
|
||||
public SapforConfigurationCommand() {
|
||||
}
|
||||
public SapforConfigurationCommand(SapforConfigurationCommand sapforConfigurationCommand) {
|
||||
this.SynchronizeFields(sapforConfigurationCommand);
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package TestingSystem.SAPFOR.SapforConfigurationCommand;
|
||||
import Common.Current;
|
||||
import Common.Database.iDBTable;
|
||||
import Common.UI.DataSetControlForm;
|
||||
import Common.UI.UI;
|
||||
import Common.UI.Windows.Dialog.DBObjectDialog;
|
||||
import TestingSystem.SAPFOR.SapforConfigurationCommand.UI.SapforConfigurationCommandFields;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
public class SapforConfigurationCommandsDBTable extends iDBTable<SapforConfigurationCommand> {
|
||||
public SapforConfigurationCommandsDBTable() {
|
||||
super(SapforConfigurationCommand.class);
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "команда";
|
||||
}
|
||||
@Override
|
||||
public String getPluralDescription() {
|
||||
return "команды";
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI() {
|
||||
return new DataSetControlForm(this){
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
//columns.get(0).setVisible(false);
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"Проход"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(SapforConfigurationCommand object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
return object.passCode.getDescription();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforConfigurationCommand;
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<SapforConfigurationCommand, SapforConfigurationCommandFields> getDialog() {
|
||||
return new DBObjectDialog<SapforConfigurationCommand, SapforConfigurationCommandFields>(SapforConfigurationCommandFields.class) {
|
||||
@Override
|
||||
public int getDefaultHeight() {
|
||||
return 250;
|
||||
}
|
||||
@Override
|
||||
public void fillFields() {
|
||||
UI.TrySelect(fields.cbPassCode, Result.passCode);
|
||||
}
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result.passCode = (PassCode_2021) fields.cbPassCode.getSelectedItem();
|
||||
Result.sapforconfiguration_id = Current.getSapforConfiguration().id;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="TestingSystem.SAPFOR.SapforConfigurationCommand.UI.SapforConfigurationCommandFields">
|
||||
<grid id="27dc6" binding="content" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="97a3c" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<font name="Times New Roman" size="16" style="2"/>
|
||||
<text value="проход"/>
|
||||
</properties>
|
||||
</component>
|
||||
<vspacer id="7e4ea">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
<component id="e95d0" class="javax.swing.JComboBox" binding="cbPassCode" custom-create="true">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<toolTipText value="выберите проход"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
@@ -1,32 +0,0 @@
|
||||
package TestingSystem.SAPFOR.SapforConfigurationCommand.UI;
|
||||
import Common.Current;
|
||||
import Common.UI.Tables.StyledCellLabel;
|
||||
import Common.UI.Windows.Dialog.DialogFields;
|
||||
import Repository.Component.Sapfor.Sapfor;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
public class SapforConfigurationCommandFields implements DialogFields {
|
||||
private JPanel content;
|
||||
public JComboBox<PassCode_2021> cbPassCode;
|
||||
@Override
|
||||
public Component getContent() {
|
||||
return content;
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
cbPassCode = new JComboBox<>();
|
||||
cbPassCode.setRenderer((list, value, index, isSelected, cellHasFocus) -> {
|
||||
JLabel res = new StyledCellLabel();
|
||||
res.setText(value.getDescription());
|
||||
res.setBackground(isSelected ?
|
||||
Current.getTheme().selection_background : Current.getTheme().background
|
||||
);
|
||||
return res;
|
||||
});
|
||||
//-
|
||||
for (PassCode_2021 code : Sapfor.getScenariosCodes())
|
||||
cbPassCode.addItem(code);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user