forked from palexdev/MaterialFX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💥 New controls: MFXCircleToggleNode, MFXRectangleToggleNode, MFXPasswordField Demo: ♻️ Updated toggles demo to reflect changes made to MFXToggleNode ♻️ Refactored the table views demo. Now the table are shown in a bigger resizable window ✨ Added a new section to show all the icons included in this project, see FontResources MaterialFX: MFXCircleToggleNode and MFXRectangleToggleNode: 💥 I decided to split MFXToggleNode into two specialized controls, each with its own skin and features 🔥 MFXToggleNode has been removed MFXTextField: ✨ Introduced the possibility to add an icon to the field and to adjust its position manually ✨ Added a MFXContextMenu to the field by default MFXTextFieldSkin: ♻️ Made little adjustments to the layout ♻️ Made little changes to add the new features listed above MFXPasswordField: 💥 The long awaited MFXPasswordField. Extends MFXTextField and introduces specific features such as: show/hide password, change mask character MFXTableView: 💥 Even if the codebase is almost the same as before the control has received a huge refactor, new features have been implemented, the layout is now more stable and reliable. It's now possible to change columns at runtime, sort columns manually by using the table's sort model, it's possible to change the observable items list, the table now has a header which is fully customizable even at runtime, the selection model has been completely reviewed from scratch, it's now easier to manually update the table MFXTableRow: ♻️ Now the rows keep a reference to the represented item. They also include a ripple generator MFXTableRowCell: 💥 Does not extend Label anymore. Extends Control and defines its own skin. This makes easier to design custom row cells. Now it also offers the possibility of adding up to two icons/nodes to the cell (read the documentation please) MFXTableColumn (renamed from MFXTableColumnCell): 💥 Does not extend Label anymore. Extends Control and defines its own skin. This makes easier to design custom table columns. The tooltip feature has been reworked, now the columns tooltip is specified by a Supplier and can be changed anytime. Introduced the possibility to disable the DragResizer making the column not resizable, this can be switched anytime as well, this feature also introduces a new pseudo class ":resizable" MFXFilterDialog, MFXEvaluationBox: 💥 The MFXTableView dialog used for filtering the table has been redesigned to be more appealing. It is also a bit bigger than before 💥 Added two new functions, "Start With Ignore Case" and "Ends With Ignore Case" MFXComboBoxSkin, MFXFilterComboBoxSkin, ComboSelectionModelMock: 🐛 Fixed selection inconsistencies MFXContextMenu: ♻️ Set a min width of 100 ♻️ Made dispose() method public to allow removing/changing context menus 🐛 Fixed install() method if the node scene is not null MFXContextMenuItem: 🐛 Fixed constructor oversight MFXDatePickerContent: 🐛 Fixed MFXDatePicker showing incorrect days (Issue palexdev#33) MFXFontIcon: :sparkles: Added a method to get a random icon :memo: Added/Updated documentation MFXStepperToggle: :recycle: Renamed property MFXStepperToggleSkin: :recycle: Request layout if the labelTextGap property changes BindingUtils: :recycle: Added a new toProperty method for object properties DragResizer: :recycle: Added the possibility of enabling/disabling it anytime by adding /removing the needed mouse event filters FontResources: :recycle: Whoops, I lost the latest JSON of the icons and I had to redo the whole thing again 🙂 MFXCircleRippleGenerator: :recycle: Throw NullPointerException if the clip supplier is null or returns null and animateBackground is set to true RippleClipTypeFactory: :sparkles: Added methods to specify both arcs if they are the same, and to adjust the clip width/height StringUtils :sparkles: Added two new methods Documentation: :recycle: Updated :recycle: Fixed some compiler warnings Signed-off-by: palexdev <[email protected]>
- Loading branch information
Showing
72 changed files
with
4,494 additions
and
2,238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
...main/java/io/github/palexdev/materialfx/demo/controllers/FontResourcesDemoController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* | ||
* 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.MFXFlowlessListView; | ||
import io.github.palexdev.materialfx.controls.MFXIconWrapper; | ||
import io.github.palexdev.materialfx.controls.MFXLabel; | ||
import io.github.palexdev.materialfx.controls.cell.MFXFlowlessListCell; | ||
import io.github.palexdev.materialfx.font.FontResources; | ||
import io.github.palexdev.materialfx.font.MFXFontIcon; | ||
import javafx.fxml.FXML; | ||
import javafx.fxml.Initializable; | ||
import javafx.geometry.Insets; | ||
import javafx.geometry.Orientation; | ||
import javafx.geometry.Pos; | ||
import javafx.scene.control.Separator; | ||
import javafx.scene.layout.HBox; | ||
import javafx.scene.paint.Color; | ||
|
||
import java.net.URL; | ||
import java.util.Arrays; | ||
import java.util.Comparator; | ||
import java.util.List; | ||
import java.util.ResourceBundle; | ||
import java.util.stream.Collectors; | ||
|
||
public class FontResourcesDemoController implements Initializable { | ||
|
||
@FXML | ||
private MFXFlowlessListView<HBox> list; | ||
|
||
|
||
@Override | ||
public void initialize(URL location, ResourceBundle resources) { | ||
list.setCellFactory(hBox -> { | ||
MFXFlowlessListCell<HBox> cell = new MFXFlowlessListCell<>(list, hBox); | ||
cell.setFixedCellHeight(48); | ||
return cell; | ||
}); | ||
MFXFlowlessListView.setSmoothScrolling(list); | ||
populateList(); | ||
} | ||
|
||
private void populateList() { | ||
List<FontResources> fontResources = Arrays.asList(FontResources.values()); | ||
fontResources.sort(Comparator.comparing(FontResources::name)); | ||
|
||
|
||
List<HBox> resBoxes = fontResources.stream().map(this::buildNode).collect(Collectors.toList()); | ||
list.setItems(resBoxes); | ||
} | ||
|
||
private HBox buildNode(FontResources fontResource) { | ||
MFXFontIcon icon = new MFXFontIcon(fontResource.getDescription(), 20); | ||
MFXLabel l1 = new MFXLabel(); | ||
l1.setLineColor(Color.TRANSPARENT); | ||
l1.setUnfocusedLineColor(Color.TRANSPARENT); | ||
l1.setStyle("-fx-background-color: transparent"); | ||
l1.setText("Description: " + fontResource.getDescription()); | ||
l1.setMinWidth(300); | ||
|
||
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); | ||
|
||
Separator s1 = new Separator(Orientation.VERTICAL); | ||
s1.setStyle("-fx-fill: white"); | ||
Separator s2 = new Separator(Orientation.VERTICAL); | ||
s2.setStyle("-fx-fill: white"); | ||
|
||
|
||
HBox box = new HBox(10, new MFXIconWrapper(icon, 24), s1, l1, s2, l2); | ||
box.setPadding(new Insets(5)); | ||
box.setAlignment(Pos.CENTER_LEFT); | ||
return box; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 21 additions & 1 deletion
22
demo/src/main/java/io/github/palexdev/materialfx/demo/controllers/TogglesController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.