Clase NC_CuadroTexto Funcional

Clase Contenido Funcional
This commit is contained in:
mosterTeco 2024-03-20 08:28:38 -06:00
parent 7e0f41d9bc
commit 4c23e9301f
1 changed files with 30 additions and 2 deletions

View File

@ -4,10 +4,38 @@
*/ */
package com.potrillos.presentacionjfx; package com.potrillos.presentacionjfx;
import javafx.collections.ObservableList;
import javafx.scene.Node;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
/** /**
* *
* @author reyes * @author Juan
*/ */
public class Contenido { public class Contenido extends AnchorPane {
private ObservableList <Node> contenidos;
public Contenido() {
super();
this.setMaxSize(800, 500);
this.setStyle("-fx-background-color: #FFFFFF;");
this.setLayoutX(0);
this.setLayoutY(200);
contenidos = this.getChildren();
}
public void agregaElemento(NC_Texto t) {
this.contenidos.add(t);
}
public void agregaElemento(NC_CuadroTexto ct) {
this.contenidos.add(ct);
}
public void agregaElemento(NC_GraficaBarras gb) {
this.contenidos.add(gb);
}
} }