package _VisualDVM.Visual;
import Common.Database.Objects.riDBObject;
import Common.Database.Tables.DataSet;
import Common.Utils.TextLog;
import Common.Visual.DataSetControlForm;
import _VisualDVM.Global;

import javax.swing.*;
public abstract class RDataSetControlForm<D extends riDBObject> extends DataSetControlForm<D> {
    public RDataSetControlForm(DataSet<?, D> dataSource_in, JPanel mountPanel_in) {
        super(dataSource_in, mountPanel_in);
    }
    @Override
    public boolean canModifyCurrent(TextLog Log) {
        return super.canModifyCurrent(Log) && (
                !(current instanceof riDBObject) ||
                        Global.mainModule.getAccount().CheckAuthorship(((riDBObject) current).sender_address, Log));
    }
}
