sshahine / JFoenix

JavaFX Material Design Library
MIT License
6.27k stars 1.05k forks source link

Request export com.jfoenix.controls.base #1224

Open JonDoeBerlin opened 2 years ago

JonDoeBerlin commented 2 years ago

Hi,

please add the package com.jfoenix.controls.base to the exports. This way the IFXValidatableControl interface could be used. Simple example for usage:

public List<IFXValidatableControl> getAllValidatableControls(Node pNode) {
    List<IFXValidatableControl> controls = new ArrayList<>();
    if (pNode instanceof IFXValidatableControl) {
        controls.add((IFXValidatableControl) pNode);
    }
    if (pNode instanceof Parent) {
        for (Node node : ((Parent) pNode).getChildrenUnmodifiable()) {
            controls.addAll(getAllValidatableControls(node));
        }
    }
    if (pNode instanceof ScrollPane) {
        controls.addAll(getAllValidatableControls(((ScrollPane) pNode).getContent()));
    }
    return controls;
}

I used this for Binding so I could check if any "errors" exists on the given node to toggle a Buttons enabledProperty.