package Common.Database.Objects.DBForm;
import Common.Database.Objects.DBObject;
import com.sun.org.glassfish.gmbal.Description;

import java.awt.*;
public class DBForm extends DBObject {
    @Description("PRIMARY KEY,UNIQUE, NOT NULL")
    public String type = null;
    public int X = 0;
    public int Y = 0;
    public int Width = 0;
    public int Height = 0;
    public DBForm(String type_, Window window) {
        type = type_;
        Fill(window);
    }
    public DBForm() {
    }
    public void Apply(Window window) {
        window.setSize(Width, Height);
        window.setLocation(X, Y);
    }
    public void Fill(Window window) {
        X = window.getX();
        Y = window.getY();
        Width = window.getWidth();
        Height = window.getHeight();
    }
    @Override
    public Object getPK() {
        return type;
    }
}
