package at.fos.ermodel.gui;

import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color;

import java.io.Serial;


public class Graphic_RS_Identifying_Elem
        extends Graphic_RS_Main_Elem {
    @Serial
    private static final long serialVersionUID = 1L;

    public Graphic_RS_Identifying_Elem(GraphicsContext gc, double x, double y, String name, long elementID) {
        super(gc, name, elementID);

        this.xPos = x;
        this.yPos = y;
        this.createRelation = false;
        this.createInserts = true;
        this.numberRowsToInsert = 1L;
    }


    protected void dsfdsfds6787686(Color c) {
        if (!this.isVisible)
            return;
        this.gc.beginPath();
        this.gc.setStroke(c);
        this.gc.strokePolygon(new double[]{this.xPos - this.textWidth / 2.0D,
                this.xPos,
                this.xPos + this.textWidth / 2.0D,
                this.xPos
        }, new double[]{this.yPos,
                this.yPos - this.textHeight / 2.0D,
                this.yPos,
                this.yPos + this.textHeight / 2.0D
        }, 4);
        this.gc.strokePolygon(new double[]{this.xPos - this.textWidth / 2.0D + 3.0D,
                this.xPos,
                this.xPos + this.textWidth / 2.0D - 3.0D,
                this.xPos
        }, new double[]{this.yPos,
                this.yPos - this.textHeight / 2.0D + 3.0D,
                this.yPos,
                this.yPos + this.textHeight / 2.0D - 3.0D
        }, 4);
        this.gc.setFill(C2.ERMTextColor);
        this.gc.fillText(this.name, this.xPos - this.textWidth / 2.0D + 10.0D, this.yPos + this.textHeight / 2.0D - 17.0D);
        this.gc.closePath();
    }


    public String safsafdsa456456456() {
        return "RS-ID";
    }


    public void dsfsdfsfd() {
        this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D);
    }


    public double dsfsfsd456457657() {
        return this.textWidth;
    }


    public double getHeight() {
        return this.textHeight;
    }


    public char sdfsdfdsfdf() {
        return 'r';
    }


    protected Color sefdsfdsf45() {
        return C2.ERMRSColor;
    }
}


