From 012f1dea267df52ca77d65933e25be2db4d558dc Mon Sep 17 00:00:00 2001 From: NataliaCancinoV Date: Sat, 23 Mar 2024 20:37:44 -0600 Subject: [PATCH] Clase NC_Texto actualizada --- .../java/uvct/presentadorfx/NC_Texto.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 PresentadorFX/src/main/java/uvct/presentadorfx/NC_Texto.java diff --git a/PresentadorFX/src/main/java/uvct/presentadorfx/NC_Texto.java b/PresentadorFX/src/main/java/uvct/presentadorfx/NC_Texto.java new file mode 100644 index 0000000..63886a3 --- /dev/null +++ b/PresentadorFX/src/main/java/uvct/presentadorfx/NC_Texto.java @@ -0,0 +1,25 @@ +package uvct.presentadorfx; + +import javafx.scene.paint.Color; +import javafx.scene.text.Font; +import javafx.scene.text.FontWeight; +import javafx.scene.text.Text; + +public class NC_Texto extends Text { + + public NC_Texto() { + super(); + } + + public void setTexto(String t, int tam, Color c) { + this.setFont(Font.font("Arial", FontWeight.NORMAL, tam)); + this.setFill(c); + this.setText(t); + } + + public void setPosicion(int x, int y) { + this.setLayoutX(x); + this.setLayoutY(y); + } + +}