2024-10-08 16:59:20 +03:00
|
|
|
package Common.Database.Objects.DBForm;
|
2024-10-07 00:58:29 +03:00
|
|
|
import Common.Database.Objects.DBObject;
|
2023-09-17 22:13:42 +03:00
|
|
|
import com.sun.org.glassfish.gmbal.Description;
|
|
|
|
|
|
|
|
|
|
import java.awt.*;
|
|
|
|
|
public class DBForm extends DBObject {
|
|
|
|
|
@Description("PRIMARY KEY,UNIQUE, NOT NULL")
|
2024-10-08 16:20:45 +03:00
|
|
|
public String type = null;
|
2023-09-17 22:13:42 +03:00
|
|
|
public int X = 0;
|
|
|
|
|
public int Y = 0;
|
|
|
|
|
public int Width = 0;
|
|
|
|
|
public int Height = 0;
|
2024-10-08 16:20:45 +03:00
|
|
|
public DBForm(String type_, Window window) {
|
2023-09-17 22:13:42 +03:00
|
|
|
type = type_;
|
2024-10-15 23:01:36 +03:00
|
|
|
Fill(window);
|
2023-09-17 22:13:42 +03:00
|
|
|
}
|
|
|
|
|
public DBForm() {
|
|
|
|
|
}
|
2024-10-15 23:01:36 +03:00
|
|
|
public void Apply(Window window) {
|
|
|
|
|
window.setSize(Width, Height);
|
|
|
|
|
window.setLocation(X, Y);
|
|
|
|
|
}
|
|
|
|
|
public void Fill(Window window) {
|
2023-09-17 22:13:42 +03:00
|
|
|
X = window.getX();
|
|
|
|
|
Y = window.getY();
|
|
|
|
|
Width = window.getWidth();
|
|
|
|
|
Height = window.getHeight();
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public Object getPK() {
|
|
|
|
|
return type;
|
|
|
|
|
}
|
|
|
|
|
}
|