فهرست منبع

Version 11.7.0

Added new MFXComboBoxes to Demo.
Added MFXLabel, MFXLegacyTableView and MFXTableView previews to Demo.

MFXTableView: forgot to add setItems method.
MFXTableViewSkin: filter dialog use automatic centering, it's more accurate than using screen coordinates.
Signed-off-by: PAlex404 <alessandro.parisi406@gmail.com>
PAlex404 4 سال پیش
والد
کامیت
3466817b37

+ 2 - 2
README.md

@@ -86,7 +86,7 @@ repositories {
 }
 
 dependencies {
-implementation 'io.github.palexdev:materialfx:11.6.0'
+implementation 'io.github.palexdev:materialfx:11.7.0'
 }
 ```
 ###### Maven
@@ -94,7 +94,7 @@ implementation 'io.github.palexdev:materialfx:11.6.0'
 <dependency>
   <groupId>io.github.palexdev</groupId>
   <artifactId>materialfx</artifactId>
-  <version>11.6.0</version>
+  <version>11.7.0</version>
 </dependency>
 ```
 

+ 1 - 1
build.gradle

@@ -4,7 +4,7 @@ plugins {
 }
 
 group 'io.github.palexdev'
-version '11.6.0'
+version '11.7.0'
 
 repositories {
     mavenCentral()

+ 14 - 0
demo/src/main/java/io/github/palexdev/materialfx/demo/controllers/ComboBoxesDemoController.java

@@ -1,6 +1,7 @@
 package io.github.palexdev.materialfx.demo.controllers;
 
 import io.github.palexdev.materialfx.controls.MFXCheckbox;
+import io.github.palexdev.materialfx.controls.MFXComboBox;
 import io.github.palexdev.materialfx.controls.legacy.MFXLegacyComboBox;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
@@ -37,6 +38,15 @@ public class ComboBoxesDemoController implements Initializable {
     @FXML
     private MFXCheckbox checkbox;
 
+    @FXML
+    private MFXComboBox<String> style1;
+
+    @FXML
+    private MFXComboBox<String> style2;
+
+    @FXML
+    private MFXComboBox<Label> newCustomized;
+
     @Override
     public void initialize(URL location, ResourceBundle resources) {
         ObservableList<String> stringList = FXCollections.observableArrayList(List.of(
@@ -70,6 +80,10 @@ public class ComboBoxesDemoController implements Initializable {
 
         editable.setEditable(true);
         validated.getValidator().add(checkbox.selectedProperty(), "Checkbox is not selected!");
+
+        style1.setItems(stringList);
+        style2.setItems(stringList);
+        newCustomized.setItems(labelsList);
     }
 
     private FontIcon createIcon(String s) {

+ 10 - 8
demo/src/main/java/io/github/palexdev/materialfx/demo/controllers/DemoController.java

@@ -130,14 +130,16 @@ public class DemoController implements Initializable {
         vLoader.addItem(2, "COMBOBOXES", new MFXToggleNode("COMBOBOXES"), MFXResourcesLoader.load("combo_boxes_demo.fxml"));
         vLoader.addItem(3, "DATEPICKERS", new MFXToggleNode("DATEPICKERS"), MFXResourcesLoader.load("datepickers_demo.fxml"));
         vLoader.addItem(4, "DIALOGS", new MFXToggleNode("DIALOGS"), MFXResourcesLoader.load("dialogs_demo.fxml"), controller -> new DialogsController(demoPane));
-        vLoader.addItem(5, "LISTVIEWS", new MFXToggleNode("LISTVIEWS"), MFXResourcesLoader.load("listviews_demo.fxml"));
-        vLoader.addItem(6, "NOTIFICATIONS", new MFXToggleNode("NOTIFICATIONS"), MFXResourcesLoader.load("notifications_demo.fxml"));
-        vLoader.addItem(7, "PROGRESS_SPINNERS", new MFXToggleNode("PROGRESS_SPINNERS"), MFXResourcesLoader.load("progress_spinners_demo.fxml"));
-        vLoader.addItem(8, "RADIOBUTTONS", new MFXToggleNode("RADIOBUTTONS"), MFXResourcesLoader.load("radio_buttons_demo.fxml"));
-        vLoader.addItem(9, "SCROLLPANES", new MFXToggleNode("SCROLLPANES"), MFXResourcesLoader.load("scrollpanes_demo.fxml"));
-        vLoader.addItem(10, "TEXTFIELDS", new MFXToggleNode("TEXTFIELDS"), MFXResourcesLoader.load("textfields_demo.fxml"));
-        vLoader.addItem(11, "TOGGLES", new MFXToggleNode("TOGGLES"), MFXResourcesLoader.load("toggle_buttons_demo.fxml"));
-        vLoader.addItem(12, "TREEVIEWS", new MFXToggleNode("TREEVIEWS"), MFXResourcesLoader.load("treeviews_demo.fxml"));
+        vLoader.addItem(5, "LABELS", new MFXToggleNode("LABELS"), MFXResourcesLoader.load("labels_demo.fxml"));
+        vLoader.addItem(6, "LISTVIEWS", new MFXToggleNode("LISTVIEWS"), MFXResourcesLoader.load("listviews_demo.fxml"));
+        vLoader.addItem(7, "NOTIFICATIONS", new MFXToggleNode("NOTIFICATIONS"), MFXResourcesLoader.load("notifications_demo.fxml"));
+        vLoader.addItem(8, "PROGRESS_SPINNERS", new MFXToggleNode("PROGRESS_SPINNERS"), MFXResourcesLoader.load("progress_spinners_demo.fxml"));
+        vLoader.addItem(9, "RADIOBUTTONS", new MFXToggleNode("RADIOBUTTONS"), MFXResourcesLoader.load("radio_buttons_demo.fxml"));
+        vLoader.addItem(10, "SCROLLPANES", new MFXToggleNode("SCROLLPANES"), MFXResourcesLoader.load("scrollpanes_demo.fxml"));
+        vLoader.addItem(11, "TABLEVIEWS", new MFXToggleNode("TABLEVIEWS"), MFXResourcesLoader.load("tableviews_demo.fxml"));
+        vLoader.addItem(12, "TEXTFIELDS", new MFXToggleNode("TEXTFIELDS"), MFXResourcesLoader.load("textfields_demo.fxml"));
+        vLoader.addItem(13, "TOGGLES", new MFXToggleNode("TOGGLES"), MFXResourcesLoader.load("toggle_buttons_demo.fxml"));
+        vLoader.addItem(14, "TREEVIEWS", new MFXToggleNode("TREEVIEWS"), MFXResourcesLoader.load("treeviews_demo.fxml"));
         vLoader.setDefault("BUTTONS");
 
         // Others

+ 65 - 0
demo/src/main/java/io/github/palexdev/materialfx/demo/controllers/LabelsDemoController.java

@@ -0,0 +1,65 @@
+/*
+ *     Copyright (C) 2021 Parisi Alessandro
+ *     This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ *     MaterialFX is free software: you can redistribute it and/or modify
+ *     it under the terms of the GNU General Public License as published by
+ *     the Free Software Foundation, either version 3 of the License, or
+ *     (at your option) any later version.
+ *
+ *     MaterialFX is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public License
+ *     along with MaterialFX.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package io.github.palexdev.materialfx.demo.controllers;
+
+import io.github.palexdev.materialfx.controls.MFXIconWrapper;
+import io.github.palexdev.materialfx.controls.MFXLabel;
+import io.github.palexdev.materialfx.effects.RippleGenerator;
+import io.github.palexdev.materialfx.font.MFXFontIcon;
+import io.github.palexdev.materialfx.utils.NodeUtils;
+import javafx.fxml.FXML;
+import javafx.fxml.Initializable;
+import javafx.scene.input.MouseEvent;
+
+import java.net.URL;
+import java.util.ResourceBundle;
+
+public class LabelsDemoController implements Initializable {
+
+    @FXML
+    private MFXLabel custom;
+
+    @Override
+    public void initialize(URL location, ResourceBundle resources) {
+        MFXIconWrapper leading = new MFXIconWrapper(new MFXFontIcon("mfx-filter", 15), 20).addRippleGenerator();
+        MFXIconWrapper trailing = new MFXIconWrapper(new MFXFontIcon("mfx-info-circle", 15), 20).addRippleGenerator();
+
+        NodeUtils.makeRegionCircular(leading);
+        NodeUtils.makeRegionCircular(trailing);
+
+        RippleGenerator lrg = leading.getRippleGenerator();
+        lrg.setRippleRadius(8);
+        RippleGenerator trg = trailing.getRippleGenerator();
+        trg.setRippleRadius(8);
+
+        leading.addEventHandler(MouseEvent.MOUSE_PRESSED, event -> {
+            lrg.setGeneratorCenterX(event.getX());
+            lrg.setGeneratorCenterY(event.getY());
+            lrg.createRipple();
+        });
+        trailing.addEventHandler(MouseEvent.MOUSE_PRESSED, event -> {
+            trg.setGeneratorCenterX(event.getX());
+            trg.setGeneratorCenterY(event.getY());
+            trg.createRipple();
+        });
+
+        custom.setLeadingIcon(leading);
+        custom.setTrailingIcon(trailing);
+    }
+}

+ 133 - 0
demo/src/main/java/io/github/palexdev/materialfx/demo/controllers/TableViewsDemoController.java

@@ -0,0 +1,133 @@
+/*
+ *     Copyright (C) 2021 Parisi Alessandro
+ *     This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ *     MaterialFX is free software: you can redistribute it and/or modify
+ *     it under the terms of the GNU General Public License as published by
+ *     the Free Software Foundation, either version 3 of the License, or
+ *     (at your option) any later version.
+ *
+ *     MaterialFX is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public License
+ *     along with MaterialFX.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package io.github.palexdev.materialfx.demo.controllers;
+
+import io.github.palexdev.materialfx.controls.MFXButton;
+import io.github.palexdev.materialfx.controls.MFXTableView;
+import io.github.palexdev.materialfx.controls.cell.MFXTableColumnCell;
+import io.github.palexdev.materialfx.controls.cell.MFXTableRowCell;
+import io.github.palexdev.materialfx.controls.legacy.MFXLegacyTableView;
+import io.github.palexdev.materialfx.demo.model.FilterablePerson;
+import io.github.palexdev.materialfx.demo.model.Person;
+import javafx.collections.FXCollections;
+import javafx.collections.ObservableList;
+import javafx.fxml.FXML;
+import javafx.fxml.Initializable;
+import javafx.geometry.Pos;
+import javafx.scene.control.TableColumn;
+
+import java.net.URL;
+import java.util.Comparator;
+import java.util.List;
+import java.util.ResourceBundle;
+
+public class TableViewsDemoController implements Initializable {
+
+    @FXML
+    private MFXButton switchButton;
+
+    @FXML
+    private MFXLegacyTableView<Person> legacyTable;
+
+    @FXML
+    private MFXTableView<FilterablePerson> table;
+
+    @Override
+    public void initialize(URL location, ResourceBundle resources) {
+        switchButton.setOnAction(event -> {
+            if (legacyTable.isVisible()) {
+                legacyTable.setVisible(false);
+                table.setVisible(true);
+            } else {
+                legacyTable.setVisible(true);
+                table.setVisible(false);
+            }
+        });
+
+        populateLegacy();
+        populateTable();
+    }
+
+    @SuppressWarnings("unchecked")
+    private void populateLegacy() {
+        ObservableList<Person> people = FXCollections.observableArrayList(
+                List.of(
+                        new Person("Shaw", "Readdie", "972 Campfire St. Hopkins, MN 55343", 24),
+                        new Person("Lonnie", "Dane", "30 Walnut St. Galloway, OH 43119", 27),
+                        new Person("Tia", "Pilgrim", "8141 N. Edgewater Street Cumberland, RI 02864", 45),
+                        new Person("Liberty", "Ward", "483 East Grand St. Stafford, VA 22554", 34),
+                        new Person("Aria", "Watkins", "85 Sunnyslope Dr. Vincentown, NJ 08088", 53),
+                        new Person("Jervis", "Kitchens", "813 Oklahoma Street West Roxbury, MA 02132", 77),
+                        new Person("Dominick", "Church", "99 E. Alton Ave. Canfield, OH 44406", 29),
+                        new Person("Forrest", "Davis", "840 Pilgrim Street Lake Villa, IL 60046", 67),
+                        new Person("Nathaniel", "Crewe", "9407 South 10th Road Wenatchee, WA 98801", 19)
+                )
+        );
+
+        TableColumn<Person, String> firstNameColumn = new TableColumn<>("First Name");
+        firstNameColumn.setCellValueFactory(fName -> fName.getValue().firstNameProperty());
+        TableColumn<Person, String> lastNameColumn = new TableColumn<>("Last Name");
+        lastNameColumn.setCellValueFactory(lName -> lName.getValue().lastNameProperty());
+        TableColumn<Person, String> addressColumn = new TableColumn<>("Address");
+        addressColumn.setCellValueFactory(addr -> addr.getValue().addressProperty());
+        TableColumn<Person, Number> ageColumn = new TableColumn<>("Age");
+        ageColumn.setCellValueFactory(age -> age.getValue().ageProperty());
+
+        legacyTable.setItems(people);
+        legacyTable.getColumns().addAll(firstNameColumn, lastNameColumn, addressColumn, ageColumn);
+    }
+
+    @SuppressWarnings("unchecked")
+    private void populateTable() {
+        ObservableList<FilterablePerson> people = FXCollections.observableArrayList(
+                List.of(
+                        new FilterablePerson("Ashley", "Vance", "566 Inverness Court Miami Beach, FL 33139", 19),
+                        new FilterablePerson("Midge", "Phillips", "7983 Honey Creek Ave. Bemidji, MN 56601", 44),
+                        new FilterablePerson("Joella", "Kendall", "640 Bay St. Astoria, NY 11102", 22),
+                        new FilterablePerson("Cletis", "Bryson", "992 Rose Lane Glen Allen, VA 23059", 46),
+                        new FilterablePerson("Minty", "Joyner", "81 South Central Street Millington, TN 38053", 18),
+                        new FilterablePerson("Rupert", "Patton", "5 Shirley St. Niagara Falls, NY 14304", 59),
+                        new FilterablePerson("Missie", "Ecclestone", "392 Galvin Lane Blackwood, NJ 08012", 75),
+                        new FilterablePerson("Aydan", "Avery", "8726 Wilson Drive Asheville, NC 28803", 89),
+                        new FilterablePerson("Cass", "Robert", "631 West Beaver Ridge Ave. Gallatin, TN 37066", 101),
+                        new FilterablePerson("Alyssa", "Parish", "881 West Mayflower St. Bay City, MI 48706", 24),
+                        new FilterablePerson("Brennan", "Woodham", "7957A Garden Street Rocklin, CA 95677", 68),
+                        new FilterablePerson("Etta", "Low", "127 South Kirkland Road Glenview, IL 60025", 18)
+                )
+        );
+
+        MFXTableColumnCell<FilterablePerson> firstNameColumn = new MFXTableColumnCell<>("First Name", Comparator.comparing(FilterablePerson::getFirstName));
+        firstNameColumn.setRowCellFactory(person -> new MFXTableRowCell(person.firstNameProperty()));
+        MFXTableColumnCell<FilterablePerson> lastNameColumn = new MFXTableColumnCell<>("Last Name", Comparator.comparing(FilterablePerson::getLastName));
+        lastNameColumn.setRowCellFactory(person -> new MFXTableRowCell(person.lastNameProperty()));
+        MFXTableColumnCell<FilterablePerson> addressColumn = new MFXTableColumnCell<>("Address", Comparator.comparing(FilterablePerson::getAddress));
+        addressColumn.setRowCellFactory(person -> new MFXTableRowCell(person.addressProperty()));
+        MFXTableColumnCell<FilterablePerson> ageColumn = new MFXTableColumnCell<>("Age", Comparator.comparing(FilterablePerson::getAge));
+        ageColumn.setRowCellFactory(person -> new MFXTableRowCell(person.ageProperty().asString()) {
+            {
+                setAlignment(Pos.CENTER_RIGHT);
+            }
+        });
+        ageColumn.setAlignment(Pos.CENTER_RIGHT);
+
+        table.setItems(people);
+        table.getColumns().addAll(firstNameColumn, lastNameColumn, addressColumn, ageColumn);
+    }
+}
+

+ 97 - 0
demo/src/main/java/io/github/palexdev/materialfx/demo/model/FilterablePerson.java

@@ -0,0 +1,97 @@
+/*
+ *     Copyright (C) 2021 Parisi Alessandro
+ *     This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ *     MaterialFX is free software: you can redistribute it and/or modify
+ *     it under the terms of the GNU General Public License as published by
+ *     the Free Software Foundation, either version 3 of the License, or
+ *     (at your option) any later version.
+ *
+ *     MaterialFX is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public License
+ *     along with MaterialFX.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package io.github.palexdev.materialfx.demo.model;
+
+import io.github.palexdev.materialfx.filter.IFilterable;
+import javafx.beans.property.IntegerProperty;
+import javafx.beans.property.SimpleIntegerProperty;
+import javafx.beans.property.SimpleStringProperty;
+import javafx.beans.property.StringProperty;
+
+public class FilterablePerson implements IFilterable {
+    private final StringProperty firstName = new SimpleStringProperty();
+    private final StringProperty lastName = new SimpleStringProperty();
+    private final StringProperty address = new SimpleStringProperty();
+    private final IntegerProperty age = new SimpleIntegerProperty();
+
+    public FilterablePerson(String firstName, String lastName, String address, Integer age) {
+        setFirstName(firstName);
+        setLastName(lastName);
+        setAddress(address);
+        setAge(age);
+    }
+
+    public String getFirstName() {
+        return firstName.get();
+    }
+
+    public StringProperty firstNameProperty() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName.set(firstName);
+    }
+
+    public String getLastName() {
+        return lastName.get();
+    }
+
+    public StringProperty lastNameProperty() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName.set(lastName);
+    }
+
+    public String getAddress() {
+        return address.get();
+    }
+
+    public StringProperty addressProperty() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address.set(address);
+    }
+
+    public int getAge() {
+        return age.get();
+    }
+
+    public IntegerProperty ageProperty() {
+        return age;
+    }
+
+    public void setAge(int age) {
+        this.age.set(age);
+    }
+
+    @Override
+    public String toFilterString() {
+        return getFirstName() + getLastName() + getAddress() + getAge();
+    }
+
+    @Override
+    public String toString() {
+        return getFirstName() + " " + getLastName();
+    }
+}

+ 91 - 0
demo/src/main/java/io/github/palexdev/materialfx/demo/model/Person.java

@@ -0,0 +1,91 @@
+/*
+ *     Copyright (C) 2021 Parisi Alessandro
+ *     This file is part of MaterialFX (https://github.com/palexdev/MaterialFX).
+ *
+ *     MaterialFX is free software: you can redistribute it and/or modify
+ *     it under the terms of the GNU General Public License as published by
+ *     the Free Software Foundation, either version 3 of the License, or
+ *     (at your option) any later version.
+ *
+ *     MaterialFX is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ *     You should have received a copy of the GNU General Public License
+ *     along with MaterialFX.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package io.github.palexdev.materialfx.demo.model;
+
+import javafx.beans.property.IntegerProperty;
+import javafx.beans.property.SimpleIntegerProperty;
+import javafx.beans.property.SimpleStringProperty;
+import javafx.beans.property.StringProperty;
+
+public class Person {
+    private final StringProperty firstName = new SimpleStringProperty();
+    private final StringProperty lastName = new SimpleStringProperty();
+    private final StringProperty address = new SimpleStringProperty();
+    private final IntegerProperty age = new SimpleIntegerProperty();
+
+    public Person(String firstName, String lastName, String address, Integer age) {
+        setFirstName(firstName);
+        setLastName(lastName);
+        setAddress(address);
+        setAge(age);
+    }
+
+    public String getFirstName() {
+        return firstName.get();
+    }
+
+    public StringProperty firstNameProperty() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName.set(firstName);
+    }
+
+    public String getLastName() {
+        return lastName.get();
+    }
+
+    public StringProperty lastNameProperty() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName.set(lastName);
+    }
+
+    public String getAddress() {
+        return address.get();
+    }
+
+    public StringProperty addressProperty() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address.set(address);
+    }
+
+    public int getAge() {
+        return age.get();
+    }
+
+    public IntegerProperty ageProperty() {
+        return age;
+    }
+
+    public void setAge(int age) {
+        this.age.set(age);
+    }
+
+    @Override
+    public String toString() {
+        return getFirstName() + " " + getLastName();
+    }
+}

+ 25 - 4
demo/src/main/resources/io/github/palexdev/materialfx/demo/combo_boxes_demo.fxml

@@ -2,11 +2,12 @@
 
 <?import io.github.palexdev.materialfx.controls.legacy.*?>
 <?import io.github.palexdev.materialfx.controls.MFXCheckbox?>
+<?import io.github.palexdev.materialfx.controls.MFXComboBox?>
 <?import javafx.geometry.*?>
 <?import javafx.scene.control.Label?>
 <?import javafx.scene.layout.*?>
-<StackPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" stylesheets="@css/combo_boxes_demo.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.github.palexdev.materialfx.demo.controllers.ComboBoxesDemoController">
-   <Label id="customLabel" alignment="CENTER" prefHeight="26.0" prefWidth="266.0" text="Combo Boxes" StackPane.alignment="TOP_CENTER">
+<StackPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" stylesheets="@css/combo_boxes_demo.css" xmlns="http://javafx.com/javafx/15.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.github.palexdev.materialfx.demo.controllers.ComboBoxesDemoController">
+   <Label id="customLabel" alignment="CENTER" prefHeight="26.0" prefWidth="266.0" text="Legacy Combo Boxes" StackPane.alignment="TOP_CENTER">
       <StackPane.margin>
          <Insets top="20.0" />
       </StackPane.margin>
@@ -51,9 +52,29 @@
          <Insets left="350.0" top="170.0" />
       </StackPane.margin>
    </MFXLegacyComboBox>
-   <MFXCheckbox fx:id="checkbox" text="Validation!" StackPane.alignment="BOTTOM_LEFT">
+   <MFXCheckbox fx:id="checkbox" text="Validation!" StackPane.alignment="BOTTOM_RIGHT">
       <StackPane.margin>
-         <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
+         <Insets bottom="160.0" left="10.0" right="10.0" top="10.0" />
       </StackPane.margin>
    </MFXCheckbox>
+   <Label id="customLabel" alignment="CENTER" prefHeight="26.0" prefWidth="266.0" text="New Combo Boxes">
+      <StackPane.margin>
+         <Insets top="105.0" />
+      </StackPane.margin>
+   </Label>
+   <MFXComboBox fx:id="style1">
+      <StackPane.margin>
+         <Insets right="250.0" top="185.0" />
+      </StackPane.margin>
+   </MFXComboBox>
+   <MFXComboBox fx:id="style2" comboStyle="STYLE2">
+      <StackPane.margin>
+         <Insets top="185.0" />
+      </StackPane.margin>
+   </MFXComboBox>
+   <MFXComboBox fx:id="newCustomized">
+      <StackPane.margin>
+         <Insets left="250.0" top="185.0" />
+      </StackPane.margin>
+   </MFXComboBox>
 </StackPane>

+ 2 - 2
demo/src/main/resources/io/github/palexdev/materialfx/demo/demo.fxml

@@ -4,8 +4,8 @@
 <?import io.github.palexdev.materialfx.controls.MFXVLoader?>
 <?import javafx.geometry.*?>
 <?import javafx.scene.layout.*?>
-<StackPane id="demoPane" fx:id="demoPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="432.0" prefWidth="768.0" stylesheets="@css/demo.css" xmlns="http://javafx.com/javafx/15.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.github.palexdev.materialfx.demo.controllers.DemoController">
-   <StackPane id="contentPane" fx:id="contentPane" prefHeight="207.0" prefWidth="441.0">
+<StackPane id="demoPane" fx:id="demoPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="550.0" prefWidth="768.0" stylesheets="@css/demo.css" xmlns="http://javafx.com/javafx/15.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.github.palexdev.materialfx.demo.controllers.DemoController">
+   <StackPane id="contentPane" fx:id="contentPane" prefHeight="500.0" prefWidth="441.0">
       <StackPane.margin>
          <Insets bottom="15.0" left="20.0" right="20.0" top="15.0" />
       </StackPane.margin>

+ 38 - 0
demo/src/main/resources/io/github/palexdev/materialfx/demo/labels_demo.fxml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import io.github.palexdev.materialfx.controls.*?>
+<?import javafx.geometry.*?>
+<?import javafx.scene.control.Label?>
+<?import javafx.scene.layout.*?>
+<StackPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/15.0.1"
+           xmlns:fx="http://javafx.com/fxml/1"
+           fx:controller="io.github.palexdev.materialfx.demo.controllers.LabelsDemoController">
+   <Label id="customLabel" alignment="CENTER" prefHeight="26.0" prefWidth="266.0" text="Labels"
+          StackPane.alignment="TOP_CENTER">
+      <StackPane.margin>
+         <Insets top="20.0"/>
+      </StackPane.margin>
+   </Label>
+   <HBox maxHeight="-Infinity" maxWidth="-Infinity" spacing="50.0" StackPane.alignment="TOP_CENTER">
+      <StackPane.margin>
+         <Insets top="60.0"/>
+      </StackPane.margin>
+      <padding>
+         <Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
+      </padding>
+      <MFXLabel promptText="Prompt Text"/>
+      <MFXLabel text="Style 1"/>
+      <MFXLabel labelStyle="STYLE2" text="Style 2"/>
+   </HBox>
+   <HBox maxHeight="-Infinity" maxWidth="-Infinity" spacing="50.0" StackPane.alignment="TOP_CENTER">
+      <padding>
+         <Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
+      </padding>
+      <StackPane.margin>
+         <Insets top="120.0"/>
+      </StackPane.margin>
+      <MFXLabel editable="true" promptText="Double Click Me!!"/>
+      <MFXLabel fx:id="custom" editable="true" lineColor="#eb4400" promptText="Double Click Me!! Custom"
+                unfocusedLineColor="#0caf00"/>
+   </HBox>
+</StackPane>

+ 37 - 0
demo/src/main/resources/io/github/palexdev/materialfx/demo/tableviews_demo.fxml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import io.github.palexdev.materialfx.controls.legacy.MFXLegacyTableView?>
+<?import io.github.palexdev.materialfx.controls.MFXButton?>
+<?import io.github.palexdev.materialfx.controls.MFXTableView?>
+<?import javafx.geometry.*?>
+<?import javafx.scene.control.Label?>
+<?import javafx.scene.layout.*?>
+<StackPane prefHeight="500.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/15.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.github.palexdev.materialfx.demo.controllers.TableViewsDemoController">
+    <Label id="customLabel" alignment="CENTER" prefHeight="26.0" prefWidth="266.0" text="Table Views" StackPane.alignment="TOP_CENTER">
+        <StackPane.margin>
+          <Insets top="20.0" />
+        </StackPane.margin>
+    </Label>
+    <StackPane maxHeight="-Infinity" maxWidth="1.7976931348623157E308" prefHeight="430.0" prefWidth="570.0" StackPane.alignment="BOTTOM_CENTER">
+        <StackPane.margin>
+            <Insets bottom="15.0" left="15.0" right="15.0" />
+        </StackPane.margin>
+        <padding>
+            <Insets top="20.0" />
+        </padding>
+        <MFXButton fx:id="switchButton" buttonType="RAISED" depthLevel="LEVEL1" text="Switch Table View" StackPane.alignment="TOP_CENTER">
+         <StackPane.margin>
+            <Insets />
+         </StackPane.margin></MFXButton>
+        <MFXLegacyTableView fx:id="legacyTable" maxHeight="-Infinity" prefHeight="400.0">
+            <StackPane.margin>
+                <Insets left="5.0" right="5.0" top="35.0" />
+            </StackPane.margin>
+        </MFXLegacyTableView>
+        <MFXTableView fx:id="table" visible="false" StackPane.alignment="BOTTOM_CENTER">
+            <StackPane.margin>
+                <Insets left="5.0" right="5.0" />
+            </StackPane.margin>
+        </MFXTableView>
+    </StackPane>
+</StackPane>

+ 1 - 1
materialfx/gradle.properties

@@ -1,6 +1,6 @@
 GROUP=io.github.palexdev
 POM_ARTIFACT_ID=materialfx
-VERSION_NAME=11.6.0
+VERSION_NAME=11.7.0
 
 POM_NAME=materialfx
 POM_DESCRIPTION=Material Desgin components for JavaFX

+ 9 - 1
materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXTableView.java

@@ -47,7 +47,7 @@ public class MFXTableView<T> extends Control {
     private final String STYLE_CLASS = "mfx-table-view";
     private final String STYLESHEET = MFXResourcesLoader.load("css/mfx-tableview.css").toString();
 
-    private final ObservableList<T> items = FXCollections.observableArrayList();
+    private final ObjectProperty<ObservableList<T>> items = new SimpleObjectProperty<>(FXCollections.observableArrayList());
     private final ObjectProperty<ITableSelectionModel<T>> selectionModel = new SimpleObjectProperty<>(null);
 
     private final ObservableList<MFXTableColumnCell<T>> columns = FXCollections.observableArrayList();
@@ -89,9 +89,17 @@ public class MFXTableView<T> extends Control {
     }
 
     public ObservableList<T> getItems() {
+        return items.get();
+    }
+
+    public ObjectProperty<ObservableList<T>> itemsProperty() {
         return items;
     }
 
+    public void setItems(ObservableList<T> items) {
+        this.items.set(items);
+    }
+
     public ITableSelectionModel<T> getSelectionModel() {
         return selectionModel.get();
     }

+ 4 - 14
materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTableViewSkin.java

@@ -41,7 +41,6 @@ import javafx.beans.value.ObservableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
 import javafx.collections.transformation.SortedList;
-import javafx.geometry.Bounds;
 import javafx.geometry.Insets;
 import javafx.geometry.Pos;
 import javafx.scene.Node;
@@ -146,8 +145,7 @@ public class MFXTableViewSkin<T> extends SkinBase<MFXTableView<T>> {
         clearFilterIcon = buildClearFilterIcon();
         filterDialog = new MFXFilterDialog();
         filterDialog.setTitle("Filter TableView");
-        filterDialog.getStage().setCenterInOwner(false);
-        filterDialog.getStage().setManualPosition(true);
+        filterDialog.getStage().setCenterInOwner(true);
         filterDialog.getStage().setOwner(tableView.getScene().getWindow());
         filterDialog.getStage().setModality(Modality.WINDOW_MODAL);
         filterDialog.getFilterButton().setOnAction(event -> filterTable());
@@ -247,15 +245,7 @@ public class MFXTableViewSkin<T> extends SkinBase<MFXTableView<T>> {
             }
         });
 
-        filterIcon.addEventHandler(MouseEvent.MOUSE_PRESSED, event -> {
-            Bounds bounds = tableView.getBoundsInLocal();
-            Bounds screenBounds = tableView.localToScreen(bounds);
-            double x = screenBounds.getMinX() - Math.abs((tableView.getWidth() - filterDialog.getPrefWidth()) / 2.0);
-            double y = screenBounds.getMinY() + Math.abs((tableView.getHeight() - filterDialog.getPrefHeight()) / 2.0);
-            filterDialog.getStage().setManualX(x);
-            filterDialog.getStage().setManualY(y);
-            filterDialog.show();
-        });
+        filterIcon.addEventHandler(MouseEvent.MOUSE_PRESSED, event -> filterDialog.show());
         clearFilterIcon.addEventHandler(MouseEvent.MOUSE_PRESSED, event -> {
             if (tableFiltered.get()) {
                 tableFiltered.set(false);
@@ -302,7 +292,7 @@ public class MFXTableViewSkin<T> extends SkinBase<MFXTableView<T>> {
     /**
      * Builds the rows, from the given list, from the current index up to the max rows displayable and the list size.
      * <p>
-     * First it calls {@link #buildRowBox(T item)} then for each column in {@link MFXTableView#getColumns()} it calls the
+     * First it calls {@link #buildRowBox(Object)} then for each column in {@link MFXTableView#getColumns()} it calls the
      * column row cell factory to build the rows cells which are added to the row box.
      * <p>
      * At the end the rows are added to the rows container, the showRows label's text is updated and {@link #updateSelection()} is called.
@@ -586,7 +576,7 @@ public class MFXTableViewSkin<T> extends SkinBase<MFXTableView<T>> {
 
     /**
      * Sorts the table view using the comparator specified in the clicked column.
-     * The state flow is: ASCENDING -> DESCENDING -> UNSORTED
+     * The state flow is: ASCENDING - DESCENDING - UNSORTED
      */
     protected void sortColumn(MFXTableColumnCell<T> column) {
         if (column.getComparator() == null) {