галочка для назначения профиля по умолчанию
This commit is contained in:
@@ -1,9 +1,23 @@
|
||||
package _VisualDVM.GlobalData.SapforProfile;
|
||||
import Common.Database.Objects.iDBObject;
|
||||
import Common.Utils.Utils_;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
import javax.swing.*;
|
||||
public class SapforProfile extends iDBObject {
|
||||
@Description("DEFAULT ''")
|
||||
public String description = "";
|
||||
@Description("DEFAULT 0")
|
||||
public long creationDate = 0;
|
||||
@Description("DEFAULT 0")
|
||||
public int isAuto = 0;
|
||||
public ImageIcon GetAutoIcon() {
|
||||
return Utils_.getIcon("/Common/icons/" + (isAuto == 1 ? "RedPick" : "NotPick") + ".png");
|
||||
}
|
||||
public String printAuto() {
|
||||
return isAuto > 0 ? "Да" : "Нет";
|
||||
}
|
||||
public void SwitchAuto() {
|
||||
isAuto = (isAuto == 0) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import _VisualDVM.GlobalData.SapforProfile.SapforProfile;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Visual.Tables.RendererProfileAuto;
|
||||
import _VisualDVM.Visual.Tables.SwitcherProfileAuto;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Date;
|
||||
@@ -29,6 +31,28 @@ public class SapforProfilesForm extends DataSetControlForm<SapforProfile> {
|
||||
public Object getFieldAt(SapforProfile object) {
|
||||
return new Date(object.creationDate);
|
||||
}
|
||||
},
|
||||
new ColumnInfo<SapforProfile>("") {
|
||||
@Override
|
||||
public Object getFieldAt(SapforProfile object) {
|
||||
return object.printAuto();
|
||||
}
|
||||
@Override
|
||||
public Class getRendererClass() {
|
||||
return RendererProfileAuto.class;
|
||||
}
|
||||
@Override
|
||||
public Class getEditorClass() {
|
||||
return SwitcherProfileAuto.class;
|
||||
}
|
||||
@Override
|
||||
public int getMinWidth() {
|
||||
return 25;
|
||||
}
|
||||
@Override
|
||||
public int getMaxWidth() {
|
||||
return 25;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user