package at.fos.ermodel.gui;

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

import java.io.Serial;
import java.io.Serializable;

public abstract class Graphic_Main_Elem
        implements Serializable, Comparable<Graphic_Main_Elem> {
    @Serial
    private static final long serialVersionUID = 1L;
    protected long graphicMainElemID;
    protected double xPos;
    protected double yPos;
    protected String name;
    protected transient GraphicsContext gc;
    protected transient boolean isVisible;
    protected transient boolean isConnectable;
    transient U4 undoRedoAction;

    public Graphic_Main_Elem(GraphicsContext gc, long elementID) {
        this.graphicMainElemID = elementID;
        this.gc = gc;
        this.isVisible = true;
    }


    public GraphicsContext getGc() {
        return this.gc;
    }


    public void setGc(GraphicsContext gc) {
        this.gc = gc;
    }

    public void safdsadasds32432456456() {
        dsfdsfds6787686(sefdsfdsf45());
    }

    protected Color getColorSelected() {
        return C2.ERMSelectedColor;
    }

    protected Color getColorDockable() {
        return C2.ERMDockablePointColor;
    }

    public void dfsdfssdf456456() {
        dsfsdfsfd();
        dsfdsfds6787686(sefdsfdsf45());
    }

    public double getxPos() {
        return this.xPos;
    }

    public void setxPos(double xPos) {
        this.xPos = xPos;
    }

    public double getyPos() {
        return this.yPos;
    }

    public void setyPos(double yPos) {
        this.yPos = yPos;
    }

    public void dgfdsfdssfd43534456() {
        selectElem();
    }


    public void sdffdsfsdf4354357656(double newX, double newY) {
        dsfsdfsfd();
        this.xPos = newX;
        this.yPos = newY;
        dsfdsfds6787686(getColorSelected());
    }


    public void selectElem() {
        dsfdsfds6787686(getColorSelected());
    }


    public int hashCode() {
        int result = 1;
        result = 31 * result + (int) (this.graphicMainElemID ^ this.graphicMainElemID >>> 32L);
        return result;
    }


    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Graphic_Main_Elem other = (Graphic_Main_Elem) obj;
        return this.graphicMainElemID == other.graphicMainElemID;
    }


    public String toString() {
        return "Graphic_Main_Elem [graphicMainElemID=" + this.graphicMainElemID + ", xPos=" + this.xPos + ", yPos=" + this.yPos +
                ", name=" + this.name + "]";
    }


    public long sdfsdfsdfd() {
        return this.graphicMainElemID;
    }


    public void dsdasadsasd32423432(long graphicMainElemID) {
        this.graphicMainElemID = graphicMainElemID;
    }


    public String sdfsdfsd32234243() {
        return this.name;
    }


    public U4 adsadadsa4354353() {
        return this.undoRedoAction;
    }


    public void sfdsfsfsddf123234435(U4 undoRedoAction) {
        this.undoRedoAction = undoRedoAction;
    }


    public int compareTo(Graphic_Main_Elem arg0) {
        return Long.compare(this.graphicMainElemID, arg0.graphicMainElemID);
    }

    public abstract double dsfsfsd456457657();

    public abstract double getHeight();

    protected abstract Color sefdsfdsf45();

    public abstract void dsfsdfsfd();

    protected abstract void dsfdsfds6787686(Color paramColor);

    public abstract boolean dsfsfds45645456(double paramDouble1, double paramDouble2);

    public abstract char sdfsdfdsfdf();
}


