noeasydb/at/fos/ermodel/gui/Graphic_RS_ISA_Elem.java
Mystikfluu a08dae9ad9 init
2023-02-13 18:17:29 +01:00

159 lines
3.4 KiB
Java

package at.fos.ermodel.gui;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color;
import java.io.Serial;
public class Graphic_RS_ISA_Elem
extends Graphic_RS_Main_Elem
{
@Serial
private static final long serialVersionUID = 1L;
private String partial_or_total;
private String disjunct_or_notdisjunct;
public Graphic_RS_ISA_Elem(GraphicsContext gc, double x, double y, String name, long elementID) {
super(gc, null, 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.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.fillText("(" + this.partial_or_total + "," + this.disjunct_or_notdisjunct + ")", this.xPos + this.textWidth / 2.0D + 5.0D, this.yPos - 5.0D);
this.gc.closePath();
}
public String safsafdsa456456456() {
return "ISA";
}
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);
this.gc.clearRect(this.xPos + this.textWidth / 2.0D + 5.0D - 3.0D,
this.yPos - 15.0D,
C2.computeTextWidth("(" + this.partial_or_total + "," + this.disjunct_or_notdisjunct + ")", 2000.0D) + 10.0D,
C2.computeTextHeight() + 12.0D);
}
public double dsfsfsd456457657() {
return this.textWidth;
}
public double getHeight() {
return this.textHeight;
}
public char sdfsdfdsfdf() {
return 'r';
}
protected Color sefdsfdsf45() {
return C2.ERMRSISAColor;
}
public String getPartial_or_total() {
return this.partial_or_total;
}
public void setPartial_or_total(String partial_or_total) {
this.partial_or_total = partial_or_total;
}
public String getDisjunct_or_notdisjunct() {
return this.disjunct_or_notdisjunct;
}
public void setDisjunct_or_notdisjunct(String disjunct_or_notdisjunct) {
this.disjunct_or_notdisjunct = disjunct_or_notdisjunct;
}
protected void changeP_T_D_ND(String partial_or_total, String disjunct_or_notdisjunct) {
this.partial_or_total = partial_or_total;
this.disjunct_or_notdisjunct = disjunct_or_notdisjunct;
if (partial_or_total == null) this.partial_or_total = getDefaultPartial_or_total();
if (disjunct_or_notdisjunct == null) this.disjunct_or_notdisjunct = getDefaultDisjunct_or_notdisjunct();
dsfsdfsfd();
safdsadasds32432456456();
}
private String getDefaultPartial_or_total() {
return "p";
}
private String getDefaultDisjunct_or_notdisjunct() {
return "nd";
}
public String sdfsdfsd32234243() {
return safsafdsa456456456() + "(" + this.partial_or_total + "," + this.disjunct_or_notdisjunct + ")";
}
}