no message
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package _VisualDVM.GlobalData.SapforProfile;
|
||||
import Common.Database.Objects.iDBObject;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
public class SapforProfile extends iDBObject {
|
||||
@Description("DEFAULT ''")
|
||||
public String description = "";
|
||||
@Description("DEFAULT 0")
|
||||
public long creationDate= 0;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package _VisualDVM.GlobalData.SapforProfile;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Tables.FKBehaviour;
|
||||
import Common.Database.Tables.FKCurrentObjectBehaviuor;
|
||||
import Common.Database.Tables.FKDataBehaviour;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
import _VisualDVM.GlobalData.SapforProfile.UI.SapforProfileFields;
|
||||
import _VisualDVM.GlobalData.SapforProfileSetting.SapforProfileSetting;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
public class SapforProfilesDBTable extends iDBTable<SapforProfile> {
|
||||
public SapforProfilesDBTable() {
|
||||
super(SapforProfile.class);
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI() {
|
||||
return new DataSetControlForm(this);
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"Описание",
|
||||
"Дата создания"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(SapforProfile object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
return object.description;
|
||||
case 2:
|
||||
return new Date(object.creationDate);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforProfile;
|
||||
}
|
||||
@Override
|
||||
public DBObjectDialog<SapforProfile, SapforProfileFields> getDialog() {
|
||||
return new DBObjectDialog<SapforProfile, SapforProfileFields>(SapforProfileFields.class) {
|
||||
@Override
|
||||
public int getDefaultHeight() {
|
||||
return 250;
|
||||
}
|
||||
@Override
|
||||
public void fillFields() {
|
||||
fields.tfDescription.setText(edit ? Result.description : "По умолчанию");
|
||||
}
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result.description = fields.tfDescription.getText();
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public LinkedHashMap<Class<? extends DBObject>, FKBehaviour> getFKDependencies() {
|
||||
LinkedHashMap<Class<? extends DBObject>, FKBehaviour> res = new LinkedHashMap<>();
|
||||
res.put(SapforProfileSetting.class, new FKBehaviour(FKDataBehaviour.DELETE, FKCurrentObjectBehaviuor.ACTIVE));
|
||||
return res;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.GlobalData.SapforProfile.UI.SapforProfileFields">
|
||||
<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="6fa91" 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="977ca">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
<component id="27b53" class="javax.swing.JTextField" binding="tfDescription" custom-create="true">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
@@ -0,0 +1,18 @@
|
||||
package _VisualDVM.GlobalData.SapforProfile.UI;
|
||||
import Common.Visual.TextField.StyledTextField;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
public class SapforProfileFields implements DialogFields {
|
||||
private JPanel content;
|
||||
public JTextField tfDescription;
|
||||
@Override
|
||||
public Component getContent() {
|
||||
return content;
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
tfDescription = new StyledTextField();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user