cleaned up DataTypes
This commit is contained in:
Jannik
2017-06-16 23:35:56 +02:00
parent 4ce6c06d2f
commit fe88271c90
13 changed files with 37 additions and 22 deletions

View File

@ -1,3 +1,6 @@
/**
* Datatype used in the TreeTableview for
*/
package datatypes;
import com.jfoenix.controls.datamodels.treetable.RecursiveTreeObject;
@ -7,14 +10,14 @@ import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
public class courseTableDataType extends RecursiveTreeObject<courseTableDataType> {
public class CourseTableDataType extends RecursiveTreeObject<CourseTableDataType> {
public final StringProperty title;
public final IntegerProperty downloads;
public final IntegerProperty stars;
public final IntegerProperty id;
public courseTableDataType(String title, int downloads, int stars, int id) {
public CourseTableDataType(String title, int downloads, int stars, int id) {
this.title = new SimpleStringProperty(title);
this.downloads = new SimpleIntegerProperty(downloads);
this.stars = new SimpleIntegerProperty(stars);

View File

@ -1,3 +1,6 @@
/**
* Datatype used for the smmdbapi query
*/
package datatypes;
import javafx.beans.property.IntegerProperty;

View File

@ -0,0 +1,90 @@
/**
* Datatype used for UI ROM elements
*/
package datatypes;
import com.jfoenix.controls.JFXButton;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;
public class UIROMDataType {
private final SimpleObjectProperty<VBox> vBox = new SimpleObjectProperty<>();
private final SimpleObjectProperty<Label> label = new SimpleObjectProperty<>();
private final SimpleObjectProperty<JFXButton> button = new SimpleObjectProperty<>();
private final StringProperty titleID = new SimpleStringProperty();
private final StringProperty romPath = new SimpleStringProperty();
public UIROMDataType (final VBox vBox, final Label label, final JFXButton button, final String titleID, final String romPath){
this.vBox.set(vBox);
this.label.set(label);
this.button.set(button);
this.titleID.set(titleID);
}
public SimpleObjectProperty<VBox> vBoxProperty(){
return vBox;
}
public SimpleObjectProperty<Label> labelProperty(){
return label;
}
public SimpleObjectProperty<JFXButton> buttonProperty(){
return button;
}
public StringProperty titleIDProperty(){
return titleID;
}
public StringProperty romPathProperty(){
return romPath;
}
public final VBox getVBox() {
return vBoxProperty().get();
}
public final Label getLabel() {
return labelProperty().get();
}
public final JFXButton getButton() {
return buttonProperty().get();
}
public final String getTitleID(){
return titleIDProperty().get();
}
public final String getRomPath(){
return romPathProperty().get();
}
public final void setVBox(VBox vBox) {
vBoxProperty().set(vBox);
}
public final void setLabel(Label label) {
labelProperty().set(label);
}
public final void setButton(JFXButton button) {
buttonProperty().set(button);
}
public final void setTitleID(String titleID){
titleIDProperty().set(titleID);
}
public final void setRomPath(String romPath){
romPathProperty().set(romPath);
}
}