Added documentation.
This commit is contained in:
@@ -101,6 +101,40 @@ public class Grafico {
|
||||
return stackPane;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crear un animacion de transicion usando colores que cambian.
|
||||
* @param rectangle Rectangle: El objeto que desea animar.
|
||||
* @param text Text: El texto que desea animar.
|
||||
* @param colorBackground Color: Color del fondo de destacer.
|
||||
* @param colorText Color: Color del texto.
|
||||
* @return PauseTransition: La transition creado con los elementos y colores.
|
||||
*/
|
||||
private static PauseTransition createPauseTransition(Rectangle rectangle , Text text, Color colorBackground, Color colorText) {
|
||||
PauseTransition changeColor = new PauseTransition(new Duration(100));
|
||||
changeColor.setOnFinished(actionEvent -> {
|
||||
rectangle.setFill(colorBackground);
|
||||
text.setStroke(colorText);
|
||||
});
|
||||
return changeColor ;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crear un animacion de transicion usando colores que cambian.
|
||||
* @param circle Circle: El objeto que desea animar.
|
||||
* @param text Text: El texto que desea animar.
|
||||
* @param colorBackground Color: Color del fondo de destacer.
|
||||
* @param colorText Color: Color del texto.
|
||||
* @return PauseTransition: La transition creado con los elementos y colores.
|
||||
*/
|
||||
private static PauseTransition createPauseTransition(Circle circle , Text text, Color colorBackground, Color colorText) {
|
||||
PauseTransition changeColor = new PauseTransition(new Duration(100));
|
||||
changeColor.setOnFinished(actionEvent -> {
|
||||
circle.setFill(colorBackground);
|
||||
text.setStroke(colorText);
|
||||
});
|
||||
return changeColor ;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destacar un elemento
|
||||
* @param valor int: El indice a destacar.
|
||||
@@ -159,38 +193,4 @@ public class Grafico {
|
||||
destacado = -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Crear un animacion de transicion usando colores que cambian.
|
||||
* @param rectangle Rectangle: El objeto que desea animar.
|
||||
* @param text Text: El texto que desea animar.
|
||||
* @param colorBackground Color: Color del fondo de destacer.
|
||||
* @param colorText Color: Color del texto.
|
||||
* @return PauseTransition: La transition creado con los elementos y colores.
|
||||
*/
|
||||
private static PauseTransition createPauseTransition(Rectangle rectangle , Text text, Color colorBackground, Color colorText) {
|
||||
PauseTransition changeColor = new PauseTransition(new Duration(100));
|
||||
changeColor.setOnFinished(actionEvent -> {
|
||||
rectangle.setFill(colorBackground);
|
||||
text.setStroke(colorText);
|
||||
});
|
||||
return changeColor ;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crear un animacion de transicion usando colores que cambian.
|
||||
* @param circle Circle: El objeto que desea animar.
|
||||
* @param text Text: El texto que desea animar.
|
||||
* @param colorBackground Color: Color del fondo de destacer.
|
||||
* @param colorText Color: Color del texto.
|
||||
* @return PauseTransition: La transition creado con los elementos y colores.
|
||||
*/
|
||||
private static PauseTransition createPauseTransition(Circle circle , Text text, Color colorBackground, Color colorText) {
|
||||
PauseTransition changeColor = new PauseTransition(new Duration(100));
|
||||
changeColor.setOnFinished(actionEvent -> {
|
||||
circle.setFill(colorBackground);
|
||||
text.setStroke(colorText);
|
||||
});
|
||||
return changeColor ;
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,18 @@ public class Main extends Application {
|
||||
*/
|
||||
static final public boolean DEBUG = false;
|
||||
|
||||
/**
|
||||
* Inicilizar el logeo y lanzar la interfaz grafica.
|
||||
* @param args String[]: Argumentos desde la consola.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
if (DEBUG) {
|
||||
new Logs();
|
||||
}
|
||||
|
||||
launch(args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Crear el stage y la scene para la aplicación grafica.
|
||||
* @param stage El primer stage donde va todas las cosas visuales.
|
||||
@@ -51,16 +63,4 @@ public class Main extends Application {
|
||||
stage.setMinWidth(768);
|
||||
stage.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Inicilizar el logeo y lanzar la interfaz grafica.
|
||||
* @param args String[]: Argumentos desde la consola.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
if (DEBUG) {
|
||||
new Logs();
|
||||
}
|
||||
|
||||
launch(args);
|
||||
}
|
||||
}
|
@@ -30,6 +30,14 @@ public class TextFieldLimited extends TextField {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lista de estilos aplicable.
|
||||
* @return List: La lista de estilos.
|
||||
*/
|
||||
public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() {
|
||||
return TextFieldLimited.StyleableProperties.STYLEABLES;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reemplazar el texto basado en cambios de teclado, no deja ingresar mas text si length es mayor al maximo.
|
||||
* @param start int: Donde empece el cambio.
|
||||
@@ -73,6 +81,14 @@ public class TextFieldLimited extends TextField {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Devolver la cantidad maxima si está asignado.
|
||||
* @return int: Cantidad de caracters.
|
||||
*/
|
||||
public final int getMaxLength() {
|
||||
return maxLength == null ? 0 : maxLength.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Asignar un valor maximo de caracters permitidio en el TextFieldLimited.
|
||||
* @param value int: La cantidad maxima.
|
||||
@@ -83,14 +99,6 @@ public class TextFieldLimited extends TextField {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Devolver la cantidad maxima si está asignado.
|
||||
* @return int: Cantidad de caracters.
|
||||
*/
|
||||
public final int getMaxLength() {
|
||||
return maxLength == null ? 0 : maxLength.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* JavaFX FXML field property por tamaño maximo
|
||||
* @return IntegerProperty: Property.
|
||||
@@ -144,12 +152,4 @@ public class TextFieldLimited extends TextField {
|
||||
STYLEABLES = Collections.unmodifiableList(styleables);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lista de estilos aplicable.
|
||||
* @return List: La lista de estilos.
|
||||
*/
|
||||
public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() {
|
||||
return TextFieldLimited.StyleableProperties.STYLEABLES;
|
||||
}
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<?import cl.cromer.estructuras.TextFieldLimited?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<VBox prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cl.cromer.estructuras.ArrayController">
|
||||
<VBox xmlns:fx="http://javafx.com/fxml/1" prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" fx:controller="cl.cromer.estructuras.ArrayController">
|
||||
<fx:include source="menu.fxml" />
|
||||
<ScrollPane fitToHeight="true" fitToWidth="true" VBox.vgrow="ALWAYS">
|
||||
<HBox alignment="TOP_CENTER" VBox.vgrow="ALWAYS" spacing="50">
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<VBox prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cl.cromer.estructuras.BurbujaController">
|
||||
<VBox xmlns:fx="http://javafx.com/fxml/1" prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" fx:controller="cl.cromer.estructuras.BurbujaController">
|
||||
<fx:include source="menu.fxml" />
|
||||
<ScrollPane fitToHeight="true" fitToWidth="true" VBox.vgrow="ALWAYS">
|
||||
<HBox alignment="TOP_CENTER" VBox.vgrow="ALWAYS" spacing="50">
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
|
||||
<VBox prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cl.cromer.estructuras.ColaController">
|
||||
<VBox xmlns:fx="http://javafx.com/fxml/1" prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" fx:controller="cl.cromer.estructuras.ColaController">
|
||||
<fx:include source="menu.fxml" />
|
||||
<ScrollPane fitToHeight="true" fitToWidth="true" VBox.vgrow="ALWAYS">
|
||||
<HBox alignment="TOP_CENTER" VBox.vgrow="ALWAYS" spacing="50">
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<VBox prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cl.cromer.estructuras.InsercionController">
|
||||
<VBox xmlns:fx="http://javafx.com/fxml/1" prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" fx:controller="cl.cromer.estructuras.InsercionController">
|
||||
<fx:include source="menu.fxml" />
|
||||
<ScrollPane fitToHeight="true" fitToWidth="true" VBox.vgrow="ALWAYS">
|
||||
<HBox alignment="TOP_CENTER" VBox.vgrow="ALWAYS" spacing="50">
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
|
||||
<VBox prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<VBox xmlns:fx="http://javafx.com/fxml/1" prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92">
|
||||
<fx:include source="menu.fxml"/>
|
||||
<ScrollPane fitToHeight="true" fitToWidth="true" VBox.vgrow="ALWAYS">
|
||||
<HBox alignment="CENTER" VBox.vgrow="ALWAYS">
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
|
||||
<MenuBar fx:id="menuBar" fx:controller="cl.cromer.estructuras.MenuController" xmlns="http://javafx.com/javafx/8.0.92" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<MenuBar xmlns:fx="http://javafx.com/fxml/1" fx:id="menuBar" fx:controller="cl.cromer.estructuras.MenuController" xmlns="http://javafx.com/javafx/8.0.92">
|
||||
<Menu text="%estructuras">
|
||||
<Menu text="%array">
|
||||
<MenuItem text="%arraySimple" onAction="#menuArraySimple"/>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<?import cl.cromer.estructuras.TextFieldLimited?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<VBox prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cl.cromer.estructuras.PilaController">
|
||||
<VBox xmlns:fx="http://javafx.com/fxml/1" prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" fx:controller="cl.cromer.estructuras.PilaController">
|
||||
<fx:include source="menu.fxml" />
|
||||
<ScrollPane fitToHeight="true" fitToWidth="true" VBox.vgrow="ALWAYS">
|
||||
<HBox alignment="TOP_CENTER" VBox.vgrow="ALWAYS" spacing="50">
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<VBox prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cl.cromer.estructuras.SeleccionController">
|
||||
<VBox xmlns:fx="http://javafx.com/fxml/1" prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" fx:controller="cl.cromer.estructuras.SeleccionController">
|
||||
<fx:include source="menu.fxml" />
|
||||
<ScrollPane fitToHeight="true" fitToWidth="true" VBox.vgrow="ALWAYS">
|
||||
<HBox alignment="TOP_CENTER" VBox.vgrow="ALWAYS" spacing="50">
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<VBox prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cl.cromer.estructuras.ShellController">
|
||||
<VBox xmlns:fx="http://javafx.com/fxml/1" prefHeight="768.0" prefWidth="1024.0" spacing="10" xmlns="http://javafx.com/javafx/8.0.92" fx:controller="cl.cromer.estructuras.ShellController">
|
||||
<fx:include source="menu.fxml" />
|
||||
<ScrollPane fitToHeight="true" fitToWidth="true" VBox.vgrow="ALWAYS">
|
||||
<HBox alignment="TOP_CENTER" VBox.vgrow="ALWAYS" spacing="50">
|
||||
|
Reference in New Issue
Block a user