Skip to content

Commit

Permalink
Merge pull request #45 from palexdev/staging
Browse files Browse the repository at this point in the history
Version 11.11.1, merge from staging
  • Loading branch information
palexdev authored Jun 11, 2021
2 parents 160f7f3 + e850bee commit c7bff88
Show file tree
Hide file tree
Showing 46 changed files with 1,289 additions and 548 deletions.
132 changes: 130 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
## Table of Contents

* [About the Project and History of JavaFX](#about-the-project-and-history-of-javafx)
* [Some GIFs](#preview-gifs)
* [Getting Started](#getting-started)
* [Build](#build)
* [Usage](#usage)
Expand Down Expand Up @@ -76,6 +77,133 @@ available [JFoenix](https://github.com/jfoenixadmin/JFoenix) library, which is a
In recent months the project has evolved a lot, to the point that it is no longer a simple substitute.
To date MaterialFX offers not only restyled controls, but also: new and unique controls such as the Stepper, controls completely redone from scratch such as ComboBoxes or TableViews (and many others), and many utilities for JavaFX and Java (NodeUtils, ColorUtils, StringUtils ...).

<!-- PREVIEW GIFS -->

## Preview GIFs

#### Imgur Link: [Gallery](https://imgur.com/gallery/J0HUrSZ)

<i>
<details>
<summary>Buttons</summary>
<br>
<a href="https://imgur.com/n3bKDN9"><img src="https://i.imgur.com/n3bKDN9.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>CheckBoxes</summary>
<br>
<a href="https://imgur.com/gbf69gq"><img src="https://i.imgur.com/gbf69gq.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>ComboBoxes</summary>
<br>
<a href="https://imgur.com/uS8rwgS"><img src="https://i.imgur.com/uS8rwgS.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>DatePickers</summary>
<br>
<a href="https://imgur.com/QVOBaXG"><img src="https://imgur.com/QVOBaXG.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>Dialogs</summary>
<br>
<a href="https://imgur.com/ilKuKF9"><img src="https://imgur.com/ilKuKF9.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>Labels</summary>
<br>
<a href="https://imgur.com/XWO40LR"><img src="https://imgur.com/XWO40LR.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>ListViews</summary>
<br>
<a href="https://imgur.com/WhYKgUI"><img src="https://imgur.com/WhYKgUI.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>Notifications</summary>
<br>
<a href="https://imgur.com/lT8zqzV"><img src="https://imgur.com/lT8zqzV.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>ProgressBars</summary>
<br>
<a href="https://imgur.com/8FEW5bt"><img src="https://imgur.com/8FEW5bt.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>ProgressSpinners</summary>
<br>
<a href="https://imgur.com/x0FiFXW"><img src="https://imgur.com/x0FiFXW.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>RadioButtons</summary>
<br>
<a href="https://imgur.com/i2fEmjB"><img src="https://imgur.com/i2fEmjB.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>ScrollPanes</summary>
<br>
<a href="https://imgur.com/bqRADeQ"><img src="https://imgur.com/bqRADeQ.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>Stepper</summary>
<br>
<a href="https://imgur.com/tNuAwF4"><img src="https://imgur.com/tNuAwF4.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>TableViews</summary>
<br>
<a href="https://imgur.com/GZYQtDT"><img src="https://imgur.com/GZYQtDT.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>TextFields</summary>
<br>
<a href="https://imgur.com/NYp8LJV"><img src="https://imgur.com/NYp8LJV.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>Toggles</summary>
<br>
<a href="https://imgur.com/HcXXi8q"><img src="https://imgur.com/HcXXi8q.gif" title="source: imgur.com" /></a>
</details>
<p></p>

<details>
<summary>FontResources</summary>
<br>
<a href="https://imgur.com/PkCZM0v"><img src="https://imgur.com/PkCZM0v.gif" title="source: imgur.com" /></a>
</details>
<p></p>
</i>

<!-- GETTING STARTED -->

## Getting Started
Expand Down Expand Up @@ -105,7 +233,7 @@ repositories {
}
dependencies {
implementation 'io.github.palexdev:materialfx:11.11.0'
implementation 'io.github.palexdev:materialfx:11.11.1'
}
```

Expand All @@ -115,7 +243,7 @@ implementation 'io.github.palexdev:materialfx:11.11.0'
<dependency>
<groupId>io.github.palexdev</groupId>
<artifactId>materialfx</artifactId>
<version>11.11.0</version>
<version>11.11.1</version>
</dependency>
```

Expand Down
16 changes: 16 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# TODOs and Future Plans

- [ ] *MFXCard*
- [ ] *MFXChipView(?)*
- [ ] *MFXSlider*
- [ ] *MFXHighlighter(?)*
<br></br>
- [ ] *MFXColorPicker*
- [ ] *MFXDateTimePicker(?)*
- [ ] *MFXTimePicker*
<br></br>
- [ ] *MFXCheckboxTableView*
- [ ] *Scrollable MFXTableView*
<br></br>
- [ ] *MFXToastNotification*
- [ ] *Improve Notification System(?)*
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group 'io.github.palexdev'
version '11.11.0'
version '11.11.1'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@ private HBox buildNode(FontResources fontResource) {
l1.setStyle("-fx-background-color: transparent");
l1.setText("Description: " + fontResource.getDescription());
l1.setMinWidth(300);
l1.setAlignment(Pos.CENTER_LEFT);

MFXLabel l2 = new MFXLabel();
l2.setLineColor(Color.TRANSPARENT);
l2.setUnfocusedLineColor(Color.TRANSPARENT);
l2.setStyle("-fx-background-color: transparent");
l2.setText("Code: " + Integer.toHexString(fontResource.getCode() | 0x10000).substring(1).toUpperCase());
l2.setMinWidth(300);
l2.setAlignment(Pos.CENTER_LEFT);

Separator s1 = new Separator(Orientation.VERTICAL);
s1.setStyle("-fx-fill: white");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import java.util.Random;
import java.util.ResourceBundle;

public class ListViewDemoController implements Initializable {
public class ListViewsDemoController implements Initializable {
private final Random random = new Random(System.currentTimeMillis());

private enum State {
Expand Down Expand Up @@ -82,14 +82,20 @@ private enum State {
private MFXFlowlessListView<String> cssViewNew;

@FXML
private MFXButton switchButton;
private MFXButton swapButton;

@FXML
private MFXButton depthButton;

@FXML
private MFXButton colorsButton;

@FXML
private Label mulLabel;

@FXML
private MFXCheckbox allowSelection;

private ObservableList<String> stringList;
private ObservableList<Label> labelsList;
private ObservableList<HBox> hBoxesList;
Expand All @@ -103,14 +109,18 @@ public void initialize(URL location, ResourceBundle resources) {

state.addListener((observable, oldValue, newValue) -> {
if (newValue == State.NEW) {
mulLabel.setVisible(true);
legacyBox.setVisible(false);
newBox.setVisible(true);
} else {
mulLabel.setVisible(false);
legacyBox.setVisible(true);
newBox.setVisible(false);
}
});

checkList.getSelectionModel().allowsSelectionProperty().bind(allowSelection.selectedProperty());

// LEGACY //
stringView.setItems(stringList);
labelView.setItems(labelsList);
Expand All @@ -124,7 +134,7 @@ public void initialize(URL location, ResourceBundle resources) {
checkList.setItems(stringList);
cssViewNew.setItems(stringList);

switchButton.addEventHandler(MouseEvent.MOUSE_PRESSED, event -> updateState());
swapButton.addEventHandler(MouseEvent.MOUSE_PRESSED, event -> updateState());
depthButton.addEventHandler(MouseEvent.MOUSE_PRESSED, event -> updateDepth());
colorsButton.addEventHandler(MouseEvent.MOUSE_PRESSED, event -> updateColors());

Expand Down Expand Up @@ -235,7 +245,7 @@ private HBox createHBox(int index) {

private void updateState() {
State curr = state.get();
switchButton.setText(curr == State.LEGACY ? "Switch to Legacy" : "Switch to New");
swapButton.setText(curr == State.LEGACY ? "Switch to Legacy" : "Switch to New");
state.set(curr == State.LEGACY ? State.NEW : State.LEGACY);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ public void initialize(URL location, ResourceBundle resources) {
passwordValidated.setValidated(true);
passwordValidated.getValidator().add(
BindingUtils.toProperty(passwordValidated.passwordProperty().length().greaterThanOrEqualTo(8)),
"Password must be at least 8 characters long"
"Must be at least 8 characters long"
);
passwordValidated.getValidator().add(BindingUtils.toProperty(
Bindings.createBooleanBinding(() -> passwordValidated.getPassword().matches(".*\\d.*"), passwordValidated.passwordProperty())),
"Password must contain at least one digit"
"Must contain at least one digit"
);
passwordValidated.getValidator().add(BindingUtils.toProperty(
Bindings.createBooleanBinding(() -> StringUtils.containsAny(passwordValidated.getPassword(), "", "?", "!", "@", "(", ")", "[", "]", "{", "}", "-", "_"), passwordValidated.passwordProperty())),
"Password must contain at least one special character among these: ?!@()[]{}-_"
"Must contain at least one among these: ?!@()[]{}-_"
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<?import javafx.scene.paint.Stop?>
<StackPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0"
prefWidth="600.0" stylesheets="@css/CheckBoxesDemo.css" xmlns="http://javafx.com/javafx/16">
<Label id="customLabel" alignment="CENTER" prefHeight="26.0" prefWidth="266.0" text="Checkboxes color" StackPane.alignment="TOP_CENTER">
<Label id="customLabel" alignment="CENTER" prefHeight="26.0" prefWidth="266.0" text="Checkboxes" StackPane.alignment="TOP_CENTER">
<StackPane.margin>
<Insets top="20.0" />
</StackPane.margin>
Expand Down Expand Up @@ -48,32 +48,30 @@
<Label id="customLabel" alignment="CENTER" prefHeight="26.0" prefWidth="266.0" text="Checkboxes Mark Types" />
<GridPane hgap="25.0" maxHeight="-Infinity" maxWidth="-Infinity" vgap="10.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"/>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"/>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"/>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"/>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<StackPane.margin>
<Insets top="180.0"/>
<Insets top="180.0" />
</StackPane.margin>
<MFXCheckbox markType="mfx-caspian-mark" text="Caspian"/>
<MFXCheckbox markType="mfx-modena-mark" text="Modena" GridPane.columnIndex="1"/>
<MFXCheckbox markType="mfx-variant3-mark" text="Variant 3" GridPane.columnIndex="2"/>
<MFXCheckbox markType="mfx-variant4-mark" text="Variant 4" GridPane.columnIndex="3"/>
<MFXCheckbox markType="mfx-variant5-mark" text="Variant 5" GridPane.rowIndex="1"/>
<MFXCheckbox markType="mfx-variant6-mark" text="Variant 6" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
<MFXCheckbox markType="mfx-variant7-mark" text="Variant 7" GridPane.columnIndex="2" GridPane.rowIndex="1"/>
<MFXCheckbox markSize="13.0" markType="mfx-variant8-mark" text="Variant 8" GridPane.columnIndex="3"
GridPane.rowIndex="1"/>
<MFXCheckbox markType="mfx-variant9-mark" text="Variant 9" GridPane.rowIndex="2"/>
<MFXCheckbox markType="mfx-variant10-mark" text="Variant 10" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
<MFXCheckbox markType="mfx-variant11-mark" text="Variant 11" GridPane.columnIndex="2" GridPane.rowIndex="2"/>
<MFXCheckbox markSize="9.0" markType="mfx-variant12-mark" text="Variant 12" GridPane.columnIndex="3"
GridPane.rowIndex="2"/>
<MFXCheckbox markType="mfx-caspian-mark" text="Caspian" />
<MFXCheckbox markType="mfx-modena-mark" text="Modena" GridPane.columnIndex="1" />
<MFXCheckbox markType="mfx-variant3-mark" text="Variant 3" GridPane.columnIndex="2" />
<MFXCheckbox markType="mfx-variant4-mark" text="Variant 4" GridPane.columnIndex="3" />
<MFXCheckbox markType="mfx-variant5-mark" text="Variant 5" GridPane.rowIndex="1" />
<MFXCheckbox markType="mfx-variant6-mark" text="Variant 6" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<MFXCheckbox markType="mfx-variant7-mark" text="Variant 7" GridPane.columnIndex="2" GridPane.rowIndex="1" />
<MFXCheckbox markSize="13.0" markType="mfx-variant8-mark" text="Variant 8" GridPane.columnIndex="3" GridPane.rowIndex="1" />
<MFXCheckbox markType="mfx-variant9-mark" text="Variant 9" GridPane.rowIndex="2" />
<MFXCheckbox markType="mfx-variant10-mark" text="Variant 10" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<MFXCheckbox markType="mfx-variant11-mark" text="Variant 11" GridPane.columnIndex="2" GridPane.rowIndex="2" />
<MFXCheckbox markSize="9.0" markType="mfx-variant12-mark" text="Variant 12" GridPane.columnIndex="3" GridPane.rowIndex="2" />
</GridPane>
</StackPane>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<?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/DatePickersDemo.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.github.palexdev.materialfx.demo.controllers.DatePickersDemoController">
<StackPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" stylesheets="@css/DatePickersDemo.css" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.github.palexdev.materialfx.demo.controllers.DatePickersDemoController">
<Label id="customLabel" alignment="CENTER" prefHeight="26.0" prefWidth="266.0" text="Date Pickers" StackPane.alignment="TOP_CENTER">
<StackPane.margin>
<Insets top="20.0" />
Expand All @@ -15,7 +15,7 @@
<Insets right="300.0" top="70.0" />
</StackPane.margin>
</MFXDatePicker>
<MFXDatePicker closeOnDaySelected="false" colorText="true" StackPane.alignment="TOP_CENTER">
<MFXDatePicker closeOnDaySelected="false" closeOnEnter="true" colorText="true" StackPane.alignment="TOP_CENTER">
<StackPane.margin>
<Insets top="70.0" />
</StackPane.margin>
Expand Down
Loading

0 comments on commit c7bff88

Please sign in to comment.