Compare commits
No commits in common. "main" and "rewrite" have entirely different histories.
34
.gitattributes
vendored
34
.gitattributes
vendored
@ -1,34 +0,0 @@
|
||||
# Java sources
|
||||
*.java text diff=java
|
||||
*.kt text diff=java
|
||||
*.groovy text diff=java
|
||||
*.scala text diff=java
|
||||
*.gradle text diff=java
|
||||
*.gradle.kts text diff=java
|
||||
|
||||
# These files are text and should be normalized (Convert crlf => lf)
|
||||
*.css text diff=css
|
||||
*.scss text diff=css
|
||||
*.sass text
|
||||
*.df text
|
||||
*.htm text diff=html
|
||||
*.html text diff=html
|
||||
*.js text
|
||||
*.jsp text
|
||||
*.jspf text
|
||||
*.jspx text
|
||||
*.properties text
|
||||
*.tld text
|
||||
*.tag text
|
||||
*.tagx text
|
||||
*.xml text
|
||||
|
||||
# These files are binary and should be left untouched
|
||||
# (binary is a macro for -text -diff)
|
||||
*.class binary
|
||||
*.dll binary
|
||||
*.ear binary
|
||||
*.jar binary
|
||||
*.so binary
|
||||
*.war binary
|
||||
*.jks binary
|
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@ -3,7 +3,7 @@
|
||||
github: palexdev
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
ko_fi: palexdev
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
|
21
.github/ISSUE_TEMPLATE/bug_report.md
vendored
21
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -8,22 +8,33 @@ assignees: ''
|
||||
---
|
||||
|
||||
**DISCLAIMER**
|
||||
- Please, before reporting a bug make sure you have read the javadocs. If, by reading the issue, I realize you skipped this step it is very likely I will close the issue without even answering, marking it as 'invalid'! MaterialFX documentation is gold, make use of it!
|
||||
- Some people seem to not realize that MaterialFX has a demo, basically a workbech for MaterialFX controls, and that it is a very valuable resource since there are a LOT of examples on how to use them.
|
||||
If your issue is about "not knowing how to do this and that" please before asking check the demo maybe the answer is already there.
|
||||
- Often the issues are about controls customization. Please before reporting the issue make sure to check the CSS files (both in [materialfx](https://github.com/palexdev/MaterialFX/tree/main/materialfx/src/main/resources/io/github/palexdev/materialfx/css) and [demo](https://github.com/palexdev/MaterialFX/tree/main/demo/src/main/resources/io/github/palexdev/materialfx/demo/css) modules) as the answer may already be there.
|
||||
**Now that you have read the disclaimer you can remove it and proceed with the issue report**
|
||||
|
||||
- Please, before reporting a bug make sure you have read the javadocs. If, by reading the issue, I realize you skipped
|
||||
this step it is very likely I will close the issue without even answering, marking it as 'invalid'! MaterialFX
|
||||
documentation is gold, make use of it!
|
||||
- Some people seem to not realize that MaterialFX has a demo, basically a workbech for MaterialFX controls, and that it
|
||||
is a very valuable resource since there are a LOT of examples on how to use them.
|
||||
If your issue is about "not knowing how to do this and that" please before asking check the demo maybe the answer is
|
||||
already there.
|
||||
- Often the issues are about controls customization. Please before reporting the issue make sure to check the CSS
|
||||
files (both
|
||||
in [materialfx](https://github.com/palexdev/MaterialFX/tree/main/materialfx/src/main/resources/io/github/palexdev/materialfx/css)
|
||||
and [demo](https://github.com/palexdev/MaterialFX/tree/main/demo/src/main/resources/io/github/palexdev/materialfx/demo/css)
|
||||
modules) as the answer may already be there.
|
||||
**Now that you have read the disclaimer you can remove it and proceed with the issue report**
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**[MRE](https://bit.ly/3k5gTJf)(Minimal Reproducible Example)**
|
||||
|
||||
- This is almost mandatory, if I can't reproduce the issue then it doesn't exist
|
||||
- The preferred way to submit a MRE would be to zip it and attach it here
|
||||
- If possible the MRE should make use of Gradle(preferred) or Maven to quickly setup the project
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
|
19
.github/ISSUE_TEMPLATE/general.md
vendored
19
.github/ISSUE_TEMPLATE/general.md
vendored
@ -8,8 +8,17 @@ assignees: ''
|
||||
---
|
||||
|
||||
**DISCLAIMER**
|
||||
- Please, before reporting this issue make sure you have read the javadocs. If, by reading the issue, I realize you skipped this step it is very likely I will close the issue without even answering, marking it as 'invalid'! MaterialFX documentation is gold, make use of it!
|
||||
- Some people seem to not realize that MaterialFX has a demo, basically a workbech for MaterialFX controls, and that it is a very valuable resource since there are a LOT of examples on how to use them.
|
||||
If your issue is about "not knowing how to do this and that" please before asking check the demo maybe the answer is already there.
|
||||
- Often the issues are about controls customization. Please before reporting the issue make sure to check the CSS files (both in [materialfx](https://github.com/palexdev/MaterialFX/tree/main/materialfx/src/main/resources/io/github/palexdev/materialfx/css) and [demo](https://github.com/palexdev/MaterialFX/tree/main/demo/src/main/resources/io/github/palexdev/materialfx/demo/css) modules) as the answer may already be there.
|
||||
**Now that you have read the disclaimer you can remove it and proceed with the issue report**
|
||||
|
||||
- Please, before reporting this issue make sure you have read the javadocs. If, by reading the issue, I realize you
|
||||
skipped this step it is very likely I will close the issue without even answering, marking it as 'invalid'! MaterialFX
|
||||
documentation is gold, make use of it!
|
||||
- Some people seem to not realize that MaterialFX has a demo, basically a workbech for MaterialFX controls, and that it
|
||||
is a very valuable resource since there are a LOT of examples on how to use them.
|
||||
If your issue is about "not knowing how to do this and that" please before asking check the demo maybe the answer is
|
||||
already there.
|
||||
- Often the issues are about controls customization. Please before reporting the issue make sure to check the CSS
|
||||
files (both
|
||||
in [materialfx](https://github.com/palexdev/MaterialFX/tree/main/materialfx/src/main/resources/io/github/palexdev/materialfx/css)
|
||||
and [demo](https://github.com/palexdev/MaterialFX/tree/main/demo/src/main/resources/io/github/palexdev/materialfx/demo/css)
|
||||
modules) as the answer may already be there.
|
||||
**Now that you have read the disclaimer you can remove it and proceed with the issue report**
|
||||
|
58
.github/workflows/gradle.yml
vendored
Executable file → Normal file
58
.github/workflows/gradle.yml
vendored
Executable file → Normal file
@ -1,26 +1,58 @@
|
||||
# This workflow will build a Java project with Gradle
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Build main
|
||||
name: 'Build rewrite'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
branches: [ rewrite ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
branches: [ rewrite ]
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
# Only if last commit does not contain [RELEASE]
|
||||
check:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get Last Commit
|
||||
run: |
|
||||
$tmp = git show --pretty=format:"%s" -s HEAD
|
||||
Write-Output "::set-env name=CommitMessage::$tmp"
|
||||
shell: pwsh
|
||||
|
||||
- name: Check Last Commit
|
||||
id: check_commit
|
||||
run: |
|
||||
if ($env:CommitMessage -match '\[RELEASE\]') {
|
||||
echo "::set-output name=executable::true"
|
||||
} else {
|
||||
echo "::set-output name=executable::false"
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
outputs:
|
||||
executable: ${{ steps.check_commit.outputs.executable }}
|
||||
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
needs: check
|
||||
if: ${{ needs.check.outputs.executable == 'false' }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v1
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 17.0.2
|
||||
distribution: 'zulu'
|
||||
java-version: '21'
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build -x test
|
||||
run: ./gradlew build -x test -x processCSS
|
||||
|
104
.github/workflows/release.yml
vendored
Normal file
104
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
name: 'Release'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ rewrite ]
|
||||
pull_request:
|
||||
branches: [ rewrite ]
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
||||
|
||||
jobs:
|
||||
# Only if last commit contains [RELEASE]
|
||||
check:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get Last Commit
|
||||
run: |
|
||||
$tmp = git show --pretty=format:"%s" -s HEAD
|
||||
Write-Output "::set-env name=CommitMessage::$tmp"
|
||||
shell: pwsh
|
||||
|
||||
- name: Check Last Commit
|
||||
id: check_commit
|
||||
run: |
|
||||
if ($env:CommitMessage -match '\[RELEASE\]') {
|
||||
echo "::set-output name=executable::true"
|
||||
} else {
|
||||
echo "::set-output name=executable::false"
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
- name: Extract Modules from Commit Message
|
||||
id: extract_modules
|
||||
run: |
|
||||
if ($env:CommitMessage -match '\[RELEASE\] Modules: (.*)') {
|
||||
$modules = $matches[1] -split ', '
|
||||
echo "::set-output name=modules::$($modules -join ',')"
|
||||
} else {
|
||||
echo "::set-output name=modules::"
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
outputs:
|
||||
executable: ${{ steps.check_commit.outputs.executable }}
|
||||
modules: ${{ steps.extract_modules.outputs.modules }}
|
||||
|
||||
release:
|
||||
environment: MavenEnv
|
||||
runs-on: windows-latest
|
||||
needs: check
|
||||
if: ${{ needs.check.outputs.executable == 'true' }}
|
||||
env:
|
||||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
|
||||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
|
||||
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_ID }}
|
||||
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSWORD }}
|
||||
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '21'
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build -x test -x processCSS
|
||||
|
||||
- name: Release modules
|
||||
run: |
|
||||
# Iterate over modules
|
||||
$modules = "${{ needs.check.outputs.modules }}" -split ','
|
||||
foreach ($module in $modules) {
|
||||
echo "Releasing module: $module"
|
||||
switch ($module) {
|
||||
"core" { ./gradlew core:publish core:releaseRepository }
|
||||
"resources" { ./gradlew resources:publish resources:releaseRepository }
|
||||
"effects" { ./gradlew effects:publish effects:releaseRepository }
|
||||
"localization" { ./gradlew localization:publish localization:releaseRepository }
|
||||
"components" { ./gradlew components:publish components:releaseRepository }
|
||||
"release" { ./gradlew release:publish release:releaseRepository }
|
||||
default { Write-Host "Unrecognized module" }
|
||||
}
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
52
.gitignore
vendored
Executable file → Normal file
52
.gitignore
vendored
Executable file → Normal file
@ -1,14 +1,44 @@
|
||||
# IntelliJ Idea
|
||||
.idea/
|
||||
build/
|
||||
out/
|
||||
|
||||
# Gradle
|
||||
.gradle
|
||||
build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
out/
|
||||
!**/src/main/**/out/
|
||||
!**/src/test/**/out/
|
||||
|
||||
# Others
|
||||
demo/scenicView.properties
|
||||
scenicView.properties
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
bin/
|
||||
!**/src/main/**/bin/
|
||||
!**/src/test/**/bin/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
||||
|
||||
scenicView.properties
|
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||
</state>
|
||||
</component>
|
6
.idea/copyright/Default.xml
generated
Normal file
6
.idea/copyright/Default.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="notice" value="Copyright (C) &#36;today.year Parisi Alessandro - alessandro.parisi406@gmail.com This file is part of &#36;project.name (https://github.com/palexdev/MaterialFX) &#36;project.name is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. &#36;project.name 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with &#36;project.name. If not, see <http://www.gnu.org/licenses/>." />
|
||||
<option name="myName" value="Default" />
|
||||
</copyright>
|
||||
</component>
|
7
.idea/copyright/profiles_settings.xml
generated
Normal file
7
.idea/copyright/profiles_settings.xml
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="Default">
|
||||
<module2copyright>
|
||||
<element module="CopyrightScope" copyright="Default" />
|
||||
</module2copyright>
|
||||
</settings>
|
||||
</component>
|
6
.idea/cssdialects.xml
generated
Normal file
6
.idea/cssdialects.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CssDialectMappings">
|
||||
<file url="PROJECT" dialect="JavaFX" />
|
||||
</component>
|
||||
</project>
|
7
.idea/discord.xml
generated
Normal file
7
.idea/discord.xml
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
</project>
|
23
.idea/gradle.xml
generated
Normal file
23
.idea/gradle.xml
generated
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="downloadSources" value="true" />
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/modules/components" />
|
||||
<option value="$PROJECT_DIR$/modules/core" />
|
||||
<option value="$PROJECT_DIR$/modules/effects" />
|
||||
<option value="$PROJECT_DIR$/modules/localization" />
|
||||
<option value="$PROJECT_DIR$/modules/release" />
|
||||
<option value="$PROJECT_DIR$/modules/resources" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
3510
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
3510
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
File diff suppressed because it is too large
Load Diff
9
.idea/misc.xml
generated
Normal file
9
.idea/misc.xml
generated
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_23" default="true" project-jdk-name="jdk-23" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
21
.idea/runConfigurations/ComponentsLauncher_NVIDIA.xml
generated
Normal file
21
.idea/runConfigurations/ComponentsLauncher_NVIDIA.xml
generated
Normal file
@ -0,0 +1,21 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="ComponentsLauncher_NVIDIA" type="Application" factoryName="Application">
|
||||
<envs>
|
||||
<env name="__GLX_VENDOR_LIBRARY_NAME" value="nvidia" />
|
||||
<env name="__NV_PRIME_RENDER_OFFLOAD" value="1" />
|
||||
<env name="DRI_PRIME" value="1" />
|
||||
</envs>
|
||||
<option name="MAIN_CLASS_NAME" value="app.ComponentsLauncher" />
|
||||
<module name="MaterialFX.components.test" />
|
||||
<option name="VM_PARAMETERS" value="-Dglass.disableGrab=true;" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="app.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
21
.idea/runConfigurations/ResourcesLauncher.xml
generated
Normal file
21
.idea/runConfigurations/ResourcesLauncher.xml
generated
Normal file
@ -0,0 +1,21 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="ResourcesLauncher" type="Application" factoryName="Application">
|
||||
<envs>
|
||||
<env name="__GLX_VENDOR_LIBRARY_NAME" value="nvidia" />
|
||||
<env name="__NV_PRIME_RENDER_OFFLOAD" value="1" />
|
||||
<env name="DRI_PRIME" value="1" />
|
||||
</envs>
|
||||
<option name="MAIN_CLASS_NAME" value="app.ResourcesLauncher" />
|
||||
<module name="MaterialFX.resources.test" />
|
||||
<option name="VM_PARAMETERS" value="-Dglass.disableGrab=true;" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="app.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
9
.idea/sasslintPlugin.xml
generated
Normal file
9
.idea/sasslintPlugin.xml
generated
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SassLintProjectComponent">
|
||||
<option name="configFile" value="$PROJECT_DIR$/modules/resources/src/main/resources/io/github/palexdev/mfxresources/sass/.sass-lint.yml" />
|
||||
<option name="lintExecutable" value="/usr/bin/sass-lint" />
|
||||
<option name="nodeInterpreter" value="/usr/bin/node" />
|
||||
<option name="pluginEnabled" value="true" />
|
||||
</component>
|
||||
</project>
|
3
.idea/scopes/CopyrightScope.xml
generated
Normal file
3
.idea/scopes/CopyrightScope.xml
generated
Normal file
@ -0,0 +1,3 @@
|
||||
<component name="DependencyValidationManager">
|
||||
<scope name="CopyrightScope" pattern="!file[MaterialFX.resources.main]:resources//*" />
|
||||
</component>
|
18
.idea/session-manager.json
generated
Normal file
18
.idea/session-manager.json
generated
Normal file
@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"name": "Default",
|
||||
"desc": "I was finishing the tests on the new LayoutStrategy API",
|
||||
"fFile": "/modules/components/src/test/java/interactive/TestLayoutStrategies.java",
|
||||
"files": [
|
||||
"/modules/components/src/main/java/io/github/palexdev/mfxcomponents/layout/MFXResizable.java",
|
||||
"/modules/components/src/test/java/interactive/TestLayoutStrategies.java",
|
||||
"/modules/components/src/test/java/interactive/TestInitSize.java",
|
||||
"/modules/core/src/main/java/io/github/palexdev/mfxcore/utils/fx/LayoutUtils.java",
|
||||
"/modules/components/src/main/java/io/github/palexdev/mfxcomponents/behaviors/MFXFabBehavior.java",
|
||||
"/modules/components/src/main/java/io/github/palexdev/mfxcomponents/controls/base/MFXControl.java",
|
||||
"/modules/components/src/main/java/io/github/palexdev/mfxcomponents/controls/base/MFXLabeled.java",
|
||||
"/modules/components/src/main/java/io/github/palexdev/mfxcomponents/controls/fab/MFXFabBase.java",
|
||||
"/modules/components/src/main/java/io/github/palexdev/mfxcomponents/layout/LayoutStrategy.java"
|
||||
]
|
||||
}
|
||||
]
|
7
.idea/stylesheetLinters/stylelint.xml
generated
Normal file
7
.idea/stylesheetLinters/stylelint.xml
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="StylelintConfiguration">
|
||||
<config-file value="$USER_HOME$/node_modules/stylelint-config-recommended-scss/index.js" />
|
||||
<file-patterns value="{**/*,*}.{sass,scss,css}" />
|
||||
</component>
|
||||
</project>
|
124
.idea/uiDesigner.xml
generated
Normal file
124
.idea/uiDesigner.xml
generated
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
12
.idea/vcs.xml
generated
Normal file
12
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CommitMessageInspectionProfile">
|
||||
<profile version="1.0">
|
||||
<inspection_tool class="CommitFormat" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="CommitNamingConvention" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -1,23 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="MaterialFX [build]" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName"/>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
|
||||
<option name="externalSystemIdString" value="GRADLE"/>
|
||||
<option name="scriptParameters" value="-x test"/>
|
||||
<option name="taskDescriptions">
|
||||
<list/>
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="build"/>
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value=""/>
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2"/>
|
||||
</configuration>
|
||||
</component>
|
@ -1,24 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="MaterialFX [clean build]" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName"/>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
|
||||
<option name="externalSystemIdString" value="GRADLE"/>
|
||||
<option name="scriptParameters" value="-x test"/>
|
||||
<option name="taskDescriptions">
|
||||
<list/>
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="clean"/>
|
||||
<option value="build"/>
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value=""/>
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2"/>
|
||||
</configuration>
|
||||
</component>
|
@ -1,23 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="MaterialFX [clean]" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName"/>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
|
||||
<option name="externalSystemIdString" value="GRADLE"/>
|
||||
<option name="scriptParameters" value=""/>
|
||||
<option name="taskDescriptions">
|
||||
<list/>
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="clean"/>
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value=""/>
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2"/>
|
||||
</configuration>
|
||||
</component>
|
@ -1,23 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="MaterialFX [jlinkZip]" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="-PchooseMain=io.github.palexdev.materialfx.demo.Demo --stacktrace" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="jlinkZip" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value="" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@ -1,24 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="MaterialFX [materialfx:uploadArchives]" type="GradleRunConfiguration"
|
||||
factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName"/>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
|
||||
<option name="externalSystemIdString" value="GRADLE"/>
|
||||
<option name="scriptParameters" value=""/>
|
||||
<option name="taskDescriptions">
|
||||
<list/>
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="materialfx:uploadArchives"/>
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value=""/>
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2"/>
|
||||
</configuration>
|
||||
</component>
|
@ -1,23 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="MaterialFX [run]" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName"/>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
|
||||
<option name="externalSystemIdString" value="GRADLE"/>
|
||||
<option name="scriptParameters" value="-PchooseMain=io.github.palexdev.materialfx.demo.Demo"/>
|
||||
<option name="taskDescriptions">
|
||||
<list/>
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="run"/>
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value="-Dglass.disableGrab=true"/>
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2"/>
|
||||
</configuration>
|
||||
</component>
|
@ -1,23 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="MaterialFX [testrun]" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName"/>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
|
||||
<option name="externalSystemIdString" value="GRADLE"/>
|
||||
<option name="scriptParameters" value="-PchooseMain=io.github.palexdev.materialfx.demo.TestDemo"/>
|
||||
<option name="taskDescriptions">
|
||||
<list/>
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="run"/>
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value=""/>
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<method v="2"/>
|
||||
</configuration>
|
||||
</component>
|
275
CHANGELOG.md
275
CHANGELOG.md
@ -1,270 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
|
||||
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
(Date format is dd-MM-yyyy)
|
||||
|
||||
## Type of Changes
|
||||
|
||||
- **Added** for new features.
|
||||
- **Changed** for changes in existing functionality.
|
||||
- **Deprecated** for soon-to-be removed features.
|
||||
- **Removed** for now removed features.
|
||||
- **Fixed** for any bug fixes.
|
||||
|
||||
[//]: ##[Unreleased]
|
||||
|
||||
# [11.17.0] - 13-11-2023
|
||||
|
||||
## Changed
|
||||
|
||||
- Update Gradle and some dependencies
|
||||
- Import build scripts from the `rewrite` branch
|
||||
- Improved notification systems thanks to @infinite-dev22 (PR#325)
|
||||
- Backport and replace the Theming API from the `rewrite` branch, performance now should be vastly better
|
||||
- Explicitly add MFXCore and MFXResources as dependencies to always use their latest version
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed MFXSimpleTreeCell still using old MFXResources for the arrow icon. It is now set in CSS
|
||||
- Fixed how FilterBeans produce Predicates, leading to the wrong filter being built
|
||||
- Fixed exceptions being thrown when changing the MFXFilterPane's skin, due to a listener not being disposed
|
||||
- Fixed MFXScrollPane not changing the track and thumb colors because the respective color tokens in CSS were changed
|
||||
|
||||
# [11.16.1] - 08-04-2023
|
||||
|
||||
## Changed
|
||||
|
||||
- Make some dependencies transitive
|
||||
|
||||
# [11.16.0] - 08-04-2023
|
||||
|
||||
## Changed
|
||||
|
||||
- Migrate to the newest version of VirtualizedFX that also brings the latest versions
|
||||
of MFXCore and MFXResources. This fixes issues at compile time caused by the MFXCore being renamed
|
||||
in the module-info to "mfx.core" and at runtime caused by conflicts between the old resources
|
||||
and the new ones. Note though that even if VirtualizedFX has been updated it still uses the
|
||||
old VirtualFlow implementation, switching to the new would be way too much work, and
|
||||
it would not be worth it, better wait for the rewrite to be over
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed in owner centering for stage dialogs, fixes kindly provided by
|
||||
Stefano Fornari (Thanks!)
|
||||
|
||||
## [11.15.0] - 17-03-2023
|
||||
|
||||
## Changed
|
||||
|
||||
- SizeBean: override toString() methods
|
||||
- Improved When, OnChanged and OnInvalidated constructs by importing them from the latest version of MFXCore
|
||||
|
||||
## Added
|
||||
|
||||
- Implemented API for MaterialFX styleable controls and SceneBuilder support
|
||||
- Added utility to detect SceneBuilder at runtime
|
||||
|
||||
## [11.14.0] - 16-03-2023
|
||||
|
||||
## Changed
|
||||
|
||||
- Ditch the user agent stylesheet system in favor of a new theming API
|
||||
- MFXIconWrapper: improve layout algorithm for automatic size detection. Do not set size until the Scene is inside a
|
||||
Window as this could lead to wrong icon sizes. Also use snapped sizes
|
||||
- MFXComboBox, MFXComboBoxSkin, MFXFilterComboBoxSkin: improvement for issue #243, allow to easily dimension the combo
|
||||
popup by setting the number of rows to show in the list
|
||||
- MFXFilterComboBoxSkin: do not create a new instance of SimpleVirtualFlow, use the one in the superclass instead
|
||||
- Renamed GenericAddRemoveChange to NonIterableChange as it was causing compilation issues from time to time
|
||||
|
||||
## [11.13.10] - 15-03-2023
|
||||
|
||||
## Added
|
||||
|
||||
- Imported CSSFragment from MaterialFX rewrite branch
|
||||
|
||||
## Changed
|
||||
|
||||
- Upgraded JavaFX to version 19.0.2
|
||||
- Upgraded Ikonli to version 12.3.1
|
||||
- Upgraded JUnit to version 5.9.1
|
||||
- Improvement for issue #235
|
||||
- MFXPopup is not set to fix its position automatically, this fixes issue #188
|
||||
- Improvement for issue #245, allow dialogs to wrap a user given node in a scroll pane
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fix exception due to incorrect Font resource description in info dialogs
|
||||
- Fix for issue #292, the stage dialog was being created the wrong way
|
||||
|
||||
## [11.13.8] - 04-01-2023
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed some I18N issues
|
||||
|
||||
## [11.13.7] - 04-01-2023
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed some issues for MFXTextField based controls
|
||||
|
||||
## [11.13.6] - 02-01-2023
|
||||
|
||||
This minor version includes a bunch of kindly submitted PRs and some minor refactor.
|
||||
Also, Gradle has been updated to version 7.6
|
||||
PRs such as:
|
||||
|
||||
- Fix for memory leak caused by When construct, #210
|
||||
- Fix for combobox list view not using combo's cell factory
|
||||
- Fix for FilterPaneSkin's combo boxes not having correct styles
|
||||
- Add BigDecimal filter
|
||||
- Add czech and spanish languages
|
||||
|
||||
Many thanks to @stefanofornari for its donation and contributions to the project!
|
||||
|
||||
## [11.13.5] - 11-04-2022
|
||||
|
||||
## Changed
|
||||
|
||||
- MFXCSSBridge: do not take into account the Region's user agent stylesheet. If it's needed to specify the user agent
|
||||
the popup's getUserAgentStylesheet() method should be overridden inline, as well as for any other component that mey
|
||||
require it (see MFXComboBoxSkin as an example) (Fix for #173)
|
||||
- Adds a method to retrieve the selection values as a List (rather than getSelection().values() which returns a generic
|
||||
Collection). Also make MultipleSelectionManager use LinkedHashSet and LinkedHashMap (TreeMap was used, oversight
|
||||
sorry) to keep insertion order for selection, this also ensures that building the values List returns the selected
|
||||
values in the same exact order as in the selection Map (Enhancement for #161)
|
||||
|
||||
## Fixed
|
||||
|
||||
- MFXTextField: fixed TextFormatter not working. It must be added on the BoundTextField, for this reason, added a
|
||||
delegate property (Fix for #174)
|
||||
- MFXComboBoxSkin, MFXFilterComboBoxSkin: fixed an issue that prevented the combo box's popup from being fully
|
||||
customizable with CSS (Fix for #173)
|
||||
- MFXDatePickerSkin: initialize the picker's text if the initial date is not null (Fix for #172)
|
||||
|
||||
## [11.13.4] - 31-03-2022
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed Maven POM
|
||||
- Fixed MFXTextField bug which was causing improper text fill in specific occasions
|
||||
|
||||
## [11.13.3] - 10-03-2022
|
||||
|
||||
### Added
|
||||
|
||||
- MFXTextField: added a label to specify the unit of measure (optional, leave blank string to remove)
|
||||
|
||||
### Changed
|
||||
|
||||
- Update Gradle plugins
|
||||
- Update VirtualizedFX to 11.2.5
|
||||
- Improve ROADMAP
|
||||
|
||||
## [11.13.2] - 09-02-2022
|
||||
|
||||
### Added
|
||||
|
||||
- New control MFXMagnifierPane
|
||||
- ColorUtils: added some new methods to convert Colors to Strings
|
||||
- FunctionalStringConverter: added two new convenience methods
|
||||
- New utils class SwingFXUtils (copied from javafx.embed.swing)
|
||||
- Added fluent API builders for MaterialFX components and JavaFX Panes, as requested by #78
|
||||
- Added resource bundles and API for internationalization
|
||||
- Added new control, MFXSpinner
|
||||
|
||||
### Changed
|
||||
|
||||
- ColorUtils: changed some method to be null-safe
|
||||
- MFXFilterPaneSkin: properly compute the minimum width
|
||||
- MFXTableViewSkin: allow to drag the filter dialog
|
||||
- MFXIconWrapper: added handler to acquire focus
|
||||
|
||||
### Fixed
|
||||
|
||||
- MFXComboBoxSkin: ensure the caret position is at 0 if the combo box is not selectable
|
||||
- MFXTableViewSkin: ensure the dialog is on foreground
|
||||
- MFXTextField and all subclasses: fixed an issue with CSS and :focused PseudoClass. It was being ignored in some cases,
|
||||
probably because the inner TextField was stealing the focus to the actual control. To fix this we use a new
|
||||
PseudoClass ":focus-within" to specify that the inner field is focused, so the control should be considered focused as
|
||||
well
|
||||
- I18N: do not use URLClassLoader to load the ResourceBundles as using MaterialFX is other projects would lead to a
|
||||
MissingResourceException, instead change the bundle base name returned by getBundleBaseName() with the complete path
|
||||
to the bundles
|
||||
- BoundTextField: remove text formatter binding as it was causing an exception, also it works anyway, so it was
|
||||
unnecessary
|
||||
- MFXIconWrapper: fix NullPointerException when creating an empty wrapper
|
||||
- ListChangeProcessor: fix computeRemoval() method returning negative indexes
|
||||
- ListChangeProcessor: fix findShift() method by including the given index in the count too
|
||||
|
||||
## [11.13.0] - 22-01-2022
|
||||
|
||||
_This version won't follow the above scheme as the amount of changes and commits is simply too huge and there would be
|
||||
no way to correctly show all the changes without making mistakes (duplicates, "overlapping" changes...), for this reason
|
||||
I'll try to sum up only the major changes below._
|
||||
|
||||
- The demo has been completely remade
|
||||
- Added new beans and properties
|
||||
- Added new mechanisms for bindings
|
||||
- Added new collections, in particular an ObservableList that combines the capabilities of JavaFX's FilteredList and
|
||||
SortedList. Also those two are read-only, but MaterialFX also offers a version that allows to directly make changes to
|
||||
the source list
|
||||
- ReactFX, Flowless removed in favor of my own Virtual Flow implementation, VirtualizedFX. As a result all controls
|
||||
having lists have been reworked.
|
||||
- The table view has been reworked as well to use a Virtual Flow (scrollable) so it's efficiency is now on a whole new
|
||||
level. There's also a paginated version of the table (like before) but it still uses a Virtual Flow, which of course
|
||||
makes it efficient
|
||||
- MFXLabels have been deprecated and removed as now MaterialFX follows Material Design's text fields. The new
|
||||
MFXTextFields are the best thing you're gonna see on JavaFX. They have all the features defined by Material Design
|
||||
principles and also more. They now offer a floating label that can have 4 states: disabled, above, border, inline. Oh,
|
||||
they can also be set to behave like Labels, no need to have duplicate controls (Label and TextFields), since they
|
||||
offer the same functionalities duh.
|
||||
- Many controls (such as combo boxes, date pickers) now extends MFXTextField, so they inherit all its features.
|
||||
- Almost all controls have been reviewed/remade to make them fully functional (there were a lot of issues with CSS not
|
||||
working properly).
|
||||
- The Filter API has been reviewed and now it's more powerful than ever with the new MFXFilterPane.
|
||||
- The Validation API has been reviewed as well, it is as powerful as before thanks to JavaFX properties and observables,
|
||||
but it's much more flexible. It's up to the user now to decide when and how to validate a control. Also an important
|
||||
design choice has been made here. Many validation frameworks for JavaFX also offer a way to decorate a control, but I
|
||||
decided to not to that as it would violate the Single Responsibility Principle! Validation has nothing to do with UI,
|
||||
plus depending on the fanciness of your App it's up to you to decide how the validation controls will look like!
|
||||
- Dialogs and Notifications have been reviewed as well. The dialogs have been simplified, and for notifications there
|
||||
are now two separate systems.
|
||||
- The date picker is now on a whole new level, it's been remade from scratch and it's simply beautiful, powerful and
|
||||
versatile.
|
||||
- There are also new components! MFXPopup is a PopupControl that actually works. Ever tried to style a PopupControl but
|
||||
no matter what the CSS would not work? Do not worry about that never again, just use MFXPopup it's super easy thanks
|
||||
to my custom MFXCSSBridge (check documentation would be too much to write here haha). MFXPagination has been made for
|
||||
MFXPaginatedTableViews, remade from scratch (meaning that doesn't extend Pagination) with a stunning modern look.
|
||||
MFXTooltip, an alternative to JavaFX's tooltip, much more versatile!
|
||||
- MFXRippleGenerator has been deprecated. The ripple generation is organized to be a new API, meaning that there are now
|
||||
interfaces and a base abstract class from which you can implement new ripple generators. The new default
|
||||
implementation is MFXCircleRippleGenerator. The new API also allows you to create new Ripples by implementing the
|
||||
IRipple interface. It's a rather advanced API tbh, but hey, it's there, who knows maybe someday I'll need it to be
|
||||
like this.
|
||||
- MFXHLoader and MFXVLoader are no more. The loading API has been "extracted" to be independent from UI. MFXLoader has
|
||||
the same capabilities as the aforementioned controls but it's not a Node. It's up to the user to decide how to manage
|
||||
the loaded views, and how to translate the loaded beans to a Node. (see the documentation and the DemoController for
|
||||
an example on how to easily create a nav-bar even with the new API)
|
||||
- The Selection API has been reviewed as well. It also supports the "extend selection" behavior when "Shift" is pressed,
|
||||
like you would expect from a file manager.
|
||||
- There is an insane amount of new utilities, for JavaFX as well as for Java
|
||||
|
||||
Again, let me **apologize** for this messy changelist, but I promise from next version changes will be tracked properly!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## A redirector to:
|
||||
|
||||
- [MFXComponents Module Changelog](https://github.com/palexdev/MaterialFX/blob/rewrite/modules/components/CHANGELOG.md)
|
||||
- [MFXCore Module Changelog](https://github.com/palexdev/MaterialFX/blob/rewrite/modules/core/CHANGELOG.md)
|
||||
- [MFXEffects Module Changelog](https://github.com/palexdev/MaterialFX/blob/rewrite/modules/effects/CHANGELOG.md)
|
||||
- [MFXLocalization Module Changelog](https://github.com/palexdev/MaterialFX/blob/rewrite/modules/localization/CHANGELOG.md)
|
||||
- [MFXResources Module Changelog](https://github.com/palexdev/MaterialFX/blob/rewrite/modules/resources/CHANGELOG.md)
|
524
README.md
524
README.md
@ -1,524 +0,0 @@
|
||||
<!--@formatter:off-->
|
||||
[](http://hits.dwyl.com/PAlex404/MaterialFX)
|
||||

|
||||

|
||||
[](https://javadoc.io/doc/io.github.palexdev/materialfx)
|
||||

|
||||

|
||||

|
||||
[](https://www.jfx-central.com/libraries/materialfx)
|
||||
---
|
||||
|
||||
<!-- PROJECT LOGO -->
|
||||
<br />
|
||||
<p align="center">
|
||||
<a href="https://github.com/palexdev/MaterialFX">
|
||||
<img src=https://imgur.com/7NdnoFl.png" alt="Logo">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
<h3 align="center">MaterialFX</h3>
|
||||
|
||||
<p align="center">
|
||||
MaterialFX is an open source Java library which provides material design components for JavaFX
|
||||
<br />
|
||||
<a href="https://github.com/palexdev/MaterialFX/wiki"><strong>Explore the wiki »</strong></a>
|
||||
<br />
|
||||
<br />
|
||||
<a href="https://github.com/palexdev/MaterialFX/releases">Download Latest Demo</a>
|
||||
·
|
||||
<a href="https://github.com/palexdev/MaterialFX/issues">Report Bug</a>
|
||||
·
|
||||
<a href="https://github.com/palexdev/MaterialFX/issues">Request Feature</a>
|
||||
</p>
|
||||
|
||||
<!-- TABLE OF CONTENTS -->
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Important Notes!](#important-notes)
|
||||
* [About the Project and History of JavaFX](#about-the-project-and-history-of-javafx)
|
||||
* [About the Logo](#about-the-logo)
|
||||
* [Some GIFs](#preview-gifs)
|
||||
* [Getting Started](#getting-started)
|
||||
* [Build](#build)
|
||||
* [Usage](#usage)
|
||||
* [Gradle](#gradle)
|
||||
* [Maven](#maven)
|
||||
* [Documentation](#documentation)
|
||||
* [Changelog](#changelog)
|
||||
* [Roadmap](#roadmap)
|
||||
* [Theming System](#theming-system)
|
||||
* [Contributing](#contributing)
|
||||
* [License](#license)
|
||||
* [Contact](#contact)
|
||||
* [Donation](#donation)
|
||||
* [Supporters](#supporters)
|
||||
|
||||
<!-- IMPORTANT NOTES -->
|
||||
|
||||
## Important notes
|
||||
|
||||
Please, **before** using this library and submitting an issue complaining that controls are **not styled and bugged**
|
||||
check how the **styling system has changed** since
|
||||
version 11.14.0
|
||||
|
||||
<!-- ABOUT THE PROJECT -->
|
||||
|
||||
## About The Project and History of JavaFX
|
||||
|
||||
JavaFX is a software platform intended to replace Swing in creating and delivering rich client applications that operate
|
||||
consistently across diverse platforms. With the release of JDK 11 in 2018, Oracle has made JavaFX part of the OpenJDK
|
||||
under the OpenJFX project in order to increase the pace of its development.
|
||||
|
||||
Key features:
|
||||
|
||||
- FXML and SceneBuilder, A designer can code in FXML or use JavaFX Scene Builder to interactively design the graphical
|
||||
user interface (GUI). Scene Builder generates FXML markup that can be ported to an IDE where a developer can add the
|
||||
business logic.
|
||||
- Built-in UI controls and CSS, JavaFX provides all the major UI controls required to develop a full-featured
|
||||
application. Components can be skinned with standard Web technologies such as CSS.
|
||||
- Self-contained application deployment model. Self-contained application packages have all the application resources
|
||||
and a private copy of the Java and JavaFX runtimes. They are distributed as native installable packages and provide
|
||||
the same installation and launch experience as native applications for that operating system. JavaFX is a software
|
||||
platform for creating and delivering desktop applications, as well as rich Internet applications (RIAs) that can run
|
||||
across a wide variety of devices.
|
||||
|
||||
Over the years the way of creating GUIs has often changed and JavaFX default appearance is still pretty much the same.
|
||||
That's where this project comes in. The aim of my project is to bring components which follow as much as possible the
|
||||
Google's material design guidelines to JavaFX. The second purpose is to provide a successor to the already
|
||||
available [JFoenix](https://github.com/jfoenixadmin/JFoenix) library, which is a bit old and has a lot of issues.
|
||||
|
||||
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 ...).
|
||||
|
||||
<!-- ABOUT THE PROJECT -->
|
||||
|
||||
## About The Logo
|
||||
|
||||
MaterialFX v11.13.0 brought a lot of fixes and new features, but it also brought a new logo, something that is more
|
||||
meaningful for me and that somewhat represents the new version.
|
||||
The new logo is a Phoenix, the immortal bird from Greek mythology, associated to regeneration/rebirth.
|
||||
When a Phoenix dies it obtains new life by raising from its ashes.
|
||||
MaterialFX v11.13.0 fixed many critical bugs and broken features, I like to think that it is reborn from
|
||||
the previous version, so I thought a new logo would have been a good idea.
|
||||
|
||||
<!-- PREVIEW GIFS -->
|
||||
|
||||
## Preview GIFs
|
||||
|
||||
#### Imgur Link: [Gallery](https://imgur.com/a/IrDirnI)
|
||||
|
||||
<i>
|
||||
<details>
|
||||
<summary>Buttons</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/jATdGFL.gif" alt="Buttons" border="0">
|
||||
</details>
|
||||
<p></p>
|
||||
|
||||
<details>
|
||||
<summary>Check Boxes, Radio Buttons and Toggles</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/ArUhH58.gif" alt="Checkboxes" border="0">
|
||||
</details>
|
||||
<p></p>
|
||||
|
||||
<details>
|
||||
<summary>Combo Boxes</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/BO0twpA.gif" alt="Comboboxes" border="0">
|
||||
</details>
|
||||
<p></p>
|
||||
|
||||
<details>
|
||||
<summary>Dialogs</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/LsxGeJh.gif" alt="Dialogs" border="0">
|
||||
</details>
|
||||
|
||||
<p></p>
|
||||
<details>
|
||||
<summary>Fields</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/XT2iVU7.gif" alt="Fields" border="0">
|
||||
</details>
|
||||
<p></p>
|
||||
|
||||
<details>
|
||||
<summary>Lists</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/4Ckdn5z.gif" alt="Listviews" border="0">
|
||||
</details>
|
||||
<p></p>
|
||||
|
||||
<details>
|
||||
<summary>Notifications</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/lgex2yO.gif" alt="Notifications" border="0">
|
||||
</details>
|
||||
<p></p>
|
||||
|
||||
<details>
|
||||
<summary>Pickers</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/J3v3i9w.gif" alt="Pickers" border="0">
|
||||
</details>
|
||||
<p></p>
|
||||
|
||||
<details>
|
||||
<summary>Progress</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/2E6X3uJ.gif" alt="Progress" border="0">
|
||||
</details>
|
||||
<p></p>
|
||||
|
||||
<details>
|
||||
<summary>Scroll Panes</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/8Jxu3TM.gif" alt="Scrollpanes" border="0">
|
||||
</details>
|
||||
<p></p>
|
||||
|
||||
<details>
|
||||
<summary>Sliders</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/nOrsa1n.gif" alt="Sliders" border="0">
|
||||
</details>
|
||||
<p></p>
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Stepper</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/nEgV9F1.gif" alt="Stepper" border="0">
|
||||
</details>
|
||||
<p></p>
|
||||
|
||||
<details>
|
||||
<summary>Tables</summary>
|
||||
<br>
|
||||
<img src="https://imgur.com/nj6xhUT.gif" alt="Tableviews" border="0">
|
||||
</details>
|
||||
<p></p>
|
||||
</i>
|
||||
|
||||
<!-- GETTING STARTED -->
|
||||
|
||||
## Getting Started
|
||||
|
||||
In this section you can learn what do you need to use my library in your project or see a preview/demo which I'm
|
||||
planning to release as runtime images here on github.
|
||||
|
||||
### Build
|
||||
|
||||
To build MaterialFX, execute the following command:
|
||||
|
||||
gradlew build
|
||||
|
||||
To run the main demo, execute the following command:
|
||||
|
||||
gradlew run
|
||||
|
||||
**NOTE**: MaterialFX requires **Java 11** and above.
|
||||
|
||||
### Usage
|
||||
|
||||
###### Gradle
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'io.github.palexdev:materialfx:11.17.0'
|
||||
}
|
||||
```
|
||||
|
||||
###### Maven
|
||||
|
||||
```xml
|
||||
|
||||
<dependency>
|
||||
<groupId>io.github.palexdev</groupId>
|
||||
<artifactId>materialfx</artifactId>
|
||||
<version>11.17.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
<!-- DOCUMENTATION -->
|
||||
|
||||
## Documentation
|
||||
|
||||
You can read MaterialFX's documentation at [javadoc.io](https://javadoc.io/doc/io.github.palexdev/materialfx)
|
||||
|
||||
<!-- CHANGELOG -->
|
||||
|
||||
## Changelog
|
||||
|
||||
See the [CHANGELOG](https://github.com/palexdev/MaterialFX/blob/main/CHANGELOG.md) file for a list of changes per
|
||||
version.
|
||||
|
||||
<!-- ROADMAP -->
|
||||
|
||||
## Roadmap
|
||||
|
||||
See the [Open Issues](https://github.com/palexdev/MaterialFX/issues) for a list of proposed features (and known issues)
|
||||
.
|
||||
See the [ROADMAP](https://github.com/palexdev/MaterialFX/blob/main/ROADMAP.md) for a list of implemented and upcoming
|
||||
features.
|
||||
|
||||
<!-- THEMING SYSTEM -->
|
||||
|
||||
## Theming System
|
||||
|
||||
Since MaterialFX 11.14.0 the way controls are styles through CSS has drastically changed. Before telling you about the
|
||||
new Theming System, and about its pros and cons, let's talk a bit on the history of this project, the causes that
|
||||
brought to this drastic change.
|
||||
|
||||
When I started developing MaterialFX I was a complete noob, I knew nothing about JavaFX. But I really wanted to use it
|
||||
and to make it look good. Competitors had broken libraries that made usage difficult for the end user, I didn't like
|
||||
them at all.
|
||||
And so the journey begun, MaterialFX is born. Like any newbies, what do you do when you know nothing but want to
|
||||
learn?
|
||||
You check others work and try to copy them but still make the changes you want to implement.
|
||||
This lead me to create controls that made use of the infamous `getUserAgentStylesheet()` method. For those of you that
|
||||
do not know about it, a developer of custom controls is supposed to override that method to provide a CSS stylesheet to
|
||||
define the author's intended style for the custom control.
|
||||
Sounds great right, just the thing I need... Well, I'd say that if only it worked properly. This system has been the
|
||||
root cause of CSS issues right from the start of the project, with little I could do to fix it **properly**.
|
||||
_(Little secret that almost no one know: I actually sent a PR on the JavaFX repo to improve the system and make it
|
||||
dynamic, guess what, it's still there lol)_
|
||||
|
||||
The two most annoying issues caused by this system are:
|
||||
|
||||
1) The little buggers didn't think of nested custom controls. For example, if a custom control(parent) has a skin that
|
||||
uses other custom controls(children), the user agent of the parent will be **completely ignored** by the children,
|
||||
the result is a bunch of children that **cannot** be styled in any way unless you create a custom skin yourself.
|
||||
A fix I implemented for this in the past, was to override inline the `getUserAgentStylesheet()` method of each
|
||||
children node to use the one of the parent, and even this drastic solution was working half the time (didn't work in
|
||||
some user cases)
|
||||
2) For some reason, sometimes stylesheets provided by the user were half or completely **ignored** leading to half/not
|
||||
styled(as intended) custom controls. This was the most annoying issue, as the causes would vary from case to case,
|
||||
not always there was an easy/feasible solution, a nightmare, really
|
||||
|
||||
**End of the rant**
|
||||
How can I fix it? I asked myself many many times.
|
||||
Recently I've been working on a rewrite of [MaterialFX](https://github.com/palexdec/MaterialFX/tree/rewrite), this new
|
||||
version will have controls based on the new Material Design 3 Guidelines, will implement modular themes thanks to the
|
||||
usage of [SASS](https://sass-lang.com/) and a Theming API that will let user change themes, implement new ones, very easily.
|
||||
So the idea is to backport at least the concept on the main branch at least until the rewrite is done.
|
||||
|
||||
**The Theme API**
|
||||
|
||||
<details>
|
||||
<summary>Previous System (changed because of performance issues)</summary>
|
||||
An interface called `Theme` allows users to define custom themes entries. It defines the bare minimum for a theme,
|
||||
its path and a way to load it.
|
||||
There are two implementations of this interface:
|
||||
|
||||
1) `Themes`: this enumerator defines the default themes of MaterialFX, there is the `DEFAULT` theme that includes the
|
||||
stylesheets
|
||||
of all MaterialFX controls, as well as dialogs, popups, menus, etc...
|
||||
2) `Stylesheets`: this enumerator defines all the stylesheets of every single control, allowing the user to not use a
|
||||
theme
|
||||
(for whatever reason) and instead choose which component he wants to style
|
||||
|
||||
`MFXThemeManager` is a utility class that will help the user add/set themes and stylesheets (which implement `Theme`) on
|
||||
nodes or scenes.
|
||||
|
||||
**Pros**
|
||||
|
||||
- The biggest pro is to have a more reliable styling system. With this users shouldn't hava any issue anymore while
|
||||
styling
|
||||
MaterialFX controls with their custom stylesheets. Of course, I consider the system _experimental_, I don't expect to
|
||||
not have even a single report about CSS bugs, but they should be way less and much easier to fix
|
||||
- Another pro is to have less code duplication as now I don't need to override the infamous `getUserAgentStylesheet()`
|
||||
anymore anywhere
|
||||
- This change should have also impacted on memory usage in a good way as now controls do not store the "url" to their
|
||||
stylesheet anymore
|
||||
|
||||
**Cons**
|
||||
|
||||
- One con is that now themes must be managed by the user. Since controls are not styled by default, the user must
|
||||
use the aforementioned manager or enumerators to load/add the themes on the App.
|
||||
The preferred way to do so would be to add the themes/stylesheets on the root scene, like this:
|
||||
```java
|
||||
public class App extends Application {
|
||||
|
||||
@Override
|
||||
public void start(Stage stage) {
|
||||
...
|
||||
Scene scene = ...;
|
||||
MFXThemeManager.addOn(scene, Themes.DEFAULT, Themes.LEGACY);
|
||||
}
|
||||
}
|
||||
```
|
||||
- Another con that derives from the above example are dialogs/popups or any separate stage/scene.
|
||||
Since you are applying the themes on the primary stage's scene, it means that all other scenes will be un-styled.
|
||||
**You have to add the Themes on every separate scene**.
|
||||
To simplify things, MaterialFX automatically applies the Themes on its dialogs and popups, but since now they
|
||||
are added to the `getStylesheets()` list it's easy to remove them and define your own
|
||||
- ~~The last con I can think of is SceneBuilder. As of now there is no support for it, I have some ideas on how to style
|
||||
controls inside of it though. The issue is that even if I figure out a way,~~ I doubt the system will be flexible
|
||||
enough.
|
||||
~~What I mean is, I can probably set the default themes on the SceneBuilder' scene,~~ but it's very unlikely there
|
||||
will
|
||||
be a way to choose which themes/stylesheets will be applied.
|
||||
Since version 11.15.0, MaterialFX controls are capable of detecting if they are being used in SceneBuilder and can
|
||||
automatically
|
||||
style themselves. From my little testings, it seems that this doesn't break the styling system in any way, I was able
|
||||
to style a button
|
||||
by adding a custom stylesheet on itself or on its parent. There's also an emergency system to completely shut down the
|
||||
SceneBuilder integration, more info
|
||||
here: [Themable](https://github.com/palexdev/MaterialFX/blob/main/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/Themable.java)
|
||||
</details>
|
||||
<br></br>
|
||||
<details>
|
||||
<summary>New system</summary>
|
||||
The best way to style a JavaFX app is to set its User-Agent Stylesheet by calling `Application.setUserAgentStylesheet(...)`.
|
||||
The issue with this is that JavaFX's default theme is overridden, and so, any other non-custom control will not be styled.
|
||||
This is good if you are going to use only custom controls, but obviously bad if you are going to use JavaFX's controls or
|
||||
any other control from other libraries that rely on the JavaFX's default theme.
|
||||
There is no easy way around this. There is a proposal to enhance the system on the JavaFX page, but it won't come anytime
|
||||
soon. So, I came up with a pretty decent workaround. If I can't set multiple User-Agents then I will build a single one.
|
||||
So, let's see how the API works.
|
||||
|
||||
An interface called `Theme`, allows users to define custom theme entries. It specifies the bare minimum properties a
|
||||
theme must have: its path and a way to load it. There are two implementations of this interface:
|
||||
|
||||
1) `JavaFXThemes`: this enumerator defines the JavaFX's default themes. Since JavaFX 8 the default one is `MODENA`.
|
||||
The funny thing about all this crap is that, JavaFX's User-Agents are actually split in multiple CSS files, there is a
|
||||
main file and then others that are added according to certain system's properties the app is running on. So, they are allowed
|
||||
to use multiple files, but we are not....thanks for nothing I guess.
|
||||
2) `MaterialFXStylesheets`: this enumerator defines all the stylesheets for each MaterialFX control.
|
||||
However, to make things work as intended, all of them have been merged into a single CSS file called `DefaultTheme.css`.
|
||||
The same thing has been done for legacy controls too, the aio CSS file is called `LegacyControls.css`
|
||||
|
||||
Now, the missing core part. The class responsible for building a single User-Agent stylesheet is: `UserAgentBuilder`.
|
||||
There are three main aspects of the system you should know, and I'm going to explain them after giving you a short code
|
||||
example:
|
||||
|
||||
```java
|
||||
UserAgentBuilder.builder()
|
||||
.themes(JavaFXThemes.MODENA) // Optional if you don't need JavaFX's default theme, still recommended though
|
||||
.themes(MaterialFXStylesheets.forAssemble(true)) // Adds the MaterialFX's default theme. The boolean argument is to include legacy controls
|
||||
.setDeploy(true) // Whether to deploy each theme's assets on a temporary dir on the disk
|
||||
.setResolveAssets(true) // Whether to try resolving @import statements and resources urls
|
||||
.build() // Assembles all the added themes into a single CSSFragment (very powerful class check its documentation)
|
||||
.setGlobal(); // Finally, sets the produced stylesheet as the global User-Agent stylesheet
|
||||
```
|
||||
|
||||
1) First and foremost, the build has to know which themes/stylesheets you want to combine, add them through the
|
||||
`themes(...)` method.
|
||||
2) Themes are allowed to have assets. You see, when they are combined into one single stylesheets, resources are likely
|
||||
to fail loading. So, fonts, images and such will not be available anymore. To overcome this issue, there's only one way,
|
||||
deploying all the needed resources on the disk. Assets should be packed in a `.zip` file, and you should be **very careful**
|
||||
at the structure inside it. When extracting the files the structure will be honored.
|
||||
3) Deploying the assets in most cases is not enough. Let's say a CSS file has this statement `@import ../fonts/Font.css`.
|
||||
You know how the API works and packed the font into a zip file, the structure is as follows `fonts/Font.css`.
|
||||
The file is going to be extracted in a directory on the disk, let's say `osTempDir/myassets/fonts/Font.css`.
|
||||
(You can change the root dir's name by overriding the Theme's `deployName()` method)
|
||||
Now, as you may guess, that import statement needs to be changed so that it points to the resource on the disk.
|
||||
This is exactly what `setResolveAssets(true)` attempts to do. The result will be something like this:
|
||||
`@import osTempDir/myassets/fonts/Font.css`
|
||||
|
||||
**Pros**
|
||||
- The biggest pro is to have a more reliable styling system. With this, users shouldn't have any issue anymore
|
||||
while styling MaterialFX controls with their custom stylesheets.
|
||||
Of course, I consider the system experimental, I don't expect to not have even a single report about CSS bugs,
|
||||
but they should be way less and much easier to fix. Since the theme is set as the app's global User-Agent, it will be applied
|
||||
on all the Stages/Scenes of the app, which is great
|
||||
- Another pro is to have less code duplication as now I don't need to override the infamous getUserAgentStylesheet() anymore anywhere
|
||||
- This change should have also impacted on memory usage in a good way as now controls do not store the "url" to their stylesheet anymore
|
||||
- Potentially, you could now create a single theme, that is applied consistently everywhere in your apps, with as much
|
||||
stylesheets as you want
|
||||
|
||||
**Cons**
|
||||
- The main con is that now theming must be managed by the user. Since controls are not styled by default anymore, the user
|
||||
must use the `UserAgentBuilder` to create the theme and set it as the application User-Agent (you can check the code snippet
|
||||
above to see how to do it).
|
||||
- The system is fragile and naive. CSS files need to be well written and formatted, and even in that case,
|
||||
there may still be issues while parsing or once the aio User-Agent is set.
|
||||
- The generated theme won't be able to access "local" resources anymore. For this reason, themes now have to deploy assets
|
||||
if needed, which surely introduces some overhead. Not only that, for the previous point, resolving "local" assets to
|
||||
"absolute" assets may fail and can be hard to set up.
|
||||
- SceneBuilder integration is tricky and error/bug prone.
|
||||
MaterialFX controls are capable of detecting if they are being used in SceneBuilder and can automatically style themselves.
|
||||
From my little testings, it seems that this doesn't break the styling system in any way.
|
||||
I was able to style a button by adding a custom stylesheet on itself or on its parent.
|
||||
There's also an emergency system to completely shut down the SceneBuilder integration, more info here: [Themable](https://github.com/palexdev/MaterialFX/blob/main/materialfx/src/main/java/io/github/palexdev/materialfx/controls/base/Themable.java)
|
||||
|
||||
</details>
|
||||
|
||||
<!-- CONTRIBUTING -->
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any
|
||||
contributions you make are **greatly appreciated**.
|
||||
|
||||
1. Fork the Project
|
||||
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
|
||||
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
|
||||
4. Push to the Branch (`git push origin feature/AmazingFeature`)
|
||||
5. Open a Pull Request
|
||||
|
||||
<!-- LICENSE -->
|
||||
|
||||
## License
|
||||
|
||||
Distributed under the GNU LGPLv3 License. See `LICENSE` for more information.
|
||||
|
||||
<!-- CONTACT -->
|
||||
|
||||
## Contact
|
||||
|
||||
Alex - alessandro.parisi406@gmail.com
|
||||
<br></br>
|
||||
[Discussions](https://github.com/palexdev/MaterialFX/discussions)
|
||||
<br></br>
|
||||
Project Link: [https://github.com/palexdev/MaterialFX](https://github.com/palexdev/MaterialFX)
|
||||
|
||||
<!-- DONATION -->
|
||||
|
||||
#### Donation
|
||||
|
||||
It's been more than a year since I started developing MaterialFX. Implementing cool looking, fully functional controls,
|
||||
introducing new components and features as well as providing many utilities for JavaFX and Java is really hard,
|
||||
especially considering that developing for JavaFX also means to deal with its closeness, its bugs, its annoying
|
||||
design decisions. Many times I've honestly been on the verge of giving up because sometimes it's really too much
|
||||
stress to handle.
|
||||
**But**, today MaterialFX is a great library, supported by many people and I'm proud of it.
|
||||
If you are using MaterialFX in your projects and feel like it, I recently
|
||||
activated [GitHub Sponsors](https://github.com/sponsors/palexdev) so
|
||||
you can easily donate/sponsor.
|
||||
|
||||
<!-- SUPPORTERS -->
|
||||
|
||||
# Supporters:
|
||||
|
||||
(If you want your github page to be linked here and you didn't specify your username in the donation, feel free to
|
||||
contact me by email and tell me. Also contact me if for some some reason you don't want to be listed here)
|
||||
|
||||
- Alaa Abu Zidan
|
||||
- Alex Hawk
|
||||
- Aloento
|
||||
- brr53
|
||||
- Eugen Gubin
|
||||
- Mauro de Wit
|
||||
- Mohammad Chaudhry (thank you very much for the huge donation, YOU are the legend)
|
||||
- Jtpatato21
|
||||
- Sourabh Bhat
|
||||
- stefanofornari (thank you very much for the big donation!)
|
||||
- Ultraviolet-Ninja
|
||||
- Yahia Rehab
|
||||
- Yiding He
|
||||
- *Your name can be here by supporting me at this link, [GitHub Sponsors](https://github.com/sponsors/palexdev)*
|
||||
|
||||
Thank you very very much to all supporters, to all people who contribute to the project, to all people that thanked me,
|
||||
you really made my day
|
52
ROADMAP.md
52
ROADMAP.md
@ -1,52 +0,0 @@
|
||||
# TODOs and Future Plans
|
||||
|
||||
# IMPORTANT!
|
||||
|
||||
A more complete roadmap is now available at [Trello](https://trello.com/b/RqRwBIRh/materialfx-roadmap)
|
||||
|
||||
## Priority Legend
|
||||
|
||||
- **HIGH**: you can expect the feature in the next major version
|
||||
- **LOW**: the feature will be implemented when I feel like it, or if the request is so high that it escalates to **
|
||||
HIGH** priority
|
||||
- **TBD**: the idea is there, the feature will be implemented at some point in the future
|
||||
|
||||
Note that you can influence the ROADMAP priority in two ways:
|
||||
|
||||
1) There's a high request for the feature
|
||||
2) You can sponsor the project with the $50 one time tier
|
||||
|
||||
### New Features
|
||||
|
||||
| Priority | Feature | Notes |
|
||||
| -------------- | ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **[HIGH]** | MFXColorPicker | |
|
||||
| **[HIGH]** | MFXToasts | |
|
||||
| **[HIGH]** | Screenshot Tool | |
|
||||
| **[HIGH]** | MFXTextArea | |
|
||||
| **[HIGH/TBD]** | NavBar/Drawer/TabPane/SideMenu | The idea is definitely there. But I still have to figure out the exact differences between those controls, which to implement and how to do it |
|
||||
| **[HIGH/TBD]** | Theme API and Dark Theme for MaterialFX controls | The idea is definitely there. But I still have to figure out the best way to implement it |
|
||||
| **[LOW]** | MFXCard | |
|
||||
| **[LOW]** | MFXCheckTableView | |
|
||||
| **[LOW]** | MFXChipView | |
|
||||
| **[LOW]** | MFXDateTimePicker | |
|
||||
| **[LOW]** | MFXRangeSlider | |
|
||||
| **[LOW]** | MFXTimePicker | |
|
||||
| **[LOW]** | MFXBadges | |
|
||||
| **[LOW]** | MFXAccordion | |
|
||||
| **[TBD]** | MFXCheckComboBox | |
|
||||
| **[TBD]** | MFXImageView | |
|
||||
| **[TBD]** | MFXHighlighter | |
|
||||
| **[TBD]** | MFXSplitButton | |
|
||||
| **[TBD]** | MFXProgressButton | |
|
||||
| **[TBD]** | MFXWaveProgressBar | |
|
||||
| **[TBD]** | MFXRate | |
|
||||
| **[TDB]** | Compare Slider | |
|
||||
|
||||
### Improvements
|
||||
|
||||
| Priority | Feature |
|
||||
| --------- | ------------------------------------- |
|
||||
| **[LOW]** | Further improve the NotifcationSystem |
|
||||
| **[LOW]** | Improve MFXSlider |
|
||||
| **[TBD]** | Auto completion for text fields |
|
15
SceneBuilder.md
Normal file
15
SceneBuilder.md
Normal file
@ -0,0 +1,15 @@
|
||||
#### This is a list of features that have/have not been integrated in SceneBuilder
|
||||
|
||||
As I said in the past, my dream on the subject is one day to make a super better alternative to SceneBuilder.
|
||||
Unfortunately, until that day comes, I'll have to stick to what we have.
|
||||
|
||||
#### Integrated
|
||||
|
||||
- [x] SceneBuilder detection system
|
||||
- [x] Theme Support. **Partial** at the moment since the theme API is in development
|
||||
|
||||
#### Not Integrated
|
||||
|
||||
- [ ] Ability to customize ripple generators (can still be done via CSS)
|
||||
- [ ] Ability to set icons in controls that support it (e.g. FABs, can be done programmatically in the FXML)
|
||||
- [ ] Ability to set variants (it can be done by adding the variant' style class in the properties inspector)
|
65
TODO.md
Normal file
65
TODO.md
Normal file
@ -0,0 +1,65 @@
|
||||
## This is a temporary roadmap just to get things started
|
||||
|
||||
### Components (from material-web)
|
||||
|
||||
- [x] Button
|
||||
- [x] Checkbox
|
||||
- [ ] Field
|
||||
- [ ] Radio button
|
||||
- [ ] Switch
|
||||
- [ ] Text field
|
||||
- [x] FAB
|
||||
- [x] Icon Button
|
||||
- [ ] Chips
|
||||
- [ ] Dialog
|
||||
- [ ] Divider
|
||||
- [x] Elevation
|
||||
- [ ] Focus Ring/Focus Indicator
|
||||
- [ ] Dragged state layer (only surface needs to be changed)
|
||||
- [x] Icon
|
||||
- [ ] List
|
||||
- [ ] Menu
|
||||
- [x] Popups/Tooltips
|
||||
- [x] Progress indicator (circular)
|
||||
- [x] Progress indicator (linear)
|
||||
- [x] Ripple
|
||||
- [ ] Select
|
||||
- [ ] Slider
|
||||
- [ ] Tabs
|
||||
|
||||
### Module: MaterialFX
|
||||
|
||||
- [ ] Behavior API (Done, Experimental/WIP)
|
||||
- [x] Buttons
|
||||
- [x] Checkboxes
|
||||
- [ ] Radio Buttons
|
||||
- [ ] Toggles
|
||||
- [ ] Combo-boxes
|
||||
- [ ] Dialogs
|
||||
- [ ] Fields
|
||||
- [ ] Lists
|
||||
- [ ] Notifications
|
||||
- [ ] DatePicker
|
||||
- [ ] ProgressBars & ProgressSpinners
|
||||
- [ ] ScrollPanes
|
||||
- [ ] Sliders
|
||||
- [ ] Stepper
|
||||
- [ ] Tables
|
||||
|
||||
#### Roadmap
|
||||
|
||||
- [ ] Time to make a Demo app
|
||||
- [ ] Theme API and Dark theme (Done, Experimental/WIP)
|
||||
- [ ] ColorPicker
|
||||
- [ ] TextArea
|
||||
- [ ] Cards
|
||||
- [ ] TimePicker (and combined with date)
|
||||
- [ ] Check Combo-boxes
|
||||
- [ ] Split Button
|
||||
- [ ] Progress Button
|
||||
|
||||
#### Misc/Remainders
|
||||
|
||||
- Rename scss files
|
||||
- Allow generating themes at runtime
|
||||
- StyleableProperties should be split. The ones dependent on the skin from the ones dependent on the control
|
59
build.gradle
Executable file → Normal file
59
build.gradle
Executable file → Normal file
@ -1,24 +1,63 @@
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'org.openjfx.javafxplugin' version "$jfxPlugin" apply false
|
||||
id 'org.beryx.jlink' version "$jlink" apply false
|
||||
id 'com.vanniktech.maven.publish' version "$mavenPublishPlugin" apply false
|
||||
}
|
||||
|
||||
group 'io.github.palexdev'
|
||||
version "$materialfx"
|
||||
|
||||
ext {
|
||||
scriptsDir = "$rootDir/scripts"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'org.openjfx.javafxplugin'
|
||||
apply plugin: "java-library"
|
||||
apply plugin: "org.openjfx.javafxplugin"
|
||||
apply plugin: "com.vanniktech.maven.publish"
|
||||
|
||||
// Remove vanniktech nonsense
|
||||
gradle.taskGraph.whenReady { graph ->
|
||||
if (graph.hasTask(plainJavadocJar)) {
|
||||
plainJavadocJar.enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
group 'io.github.palexdev'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation platform("org.junit:junit-bom:$junit")
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter'
|
||||
|
||||
testImplementation "org.testfx:testfx-junit5:$testfx"
|
||||
testImplementation("io.github.palexdev:scenicview:$scenicView") {
|
||||
exclude group: "org.openjfx"
|
||||
}
|
||||
}
|
||||
|
||||
javafx {
|
||||
version = "$jfx"
|
||||
modules = ['javafx.controls', 'javafx.fxml', 'javafx.media', 'javafx.swing', 'javafx.web']
|
||||
modules = ["javafx.controls", "javafx.fxml"]
|
||||
configurations = ['compileOnly', 'testImplementation']
|
||||
}
|
||||
}
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = "$jdk"
|
||||
targetCompatibility = "$jdk"
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
sourceCompatibility = "$testJdk"
|
||||
targetCompatibility = "$testJdk"
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,105 +0,0 @@
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
plugins {
|
||||
id 'application'
|
||||
id 'org.beryx.jlink' version "$jlink"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
flatDir {
|
||||
dirs "${project(':demo').projectDir}/libs"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation "org.testfx:testfx-core:$testfx"
|
||||
testImplementation "org.testfx:testfx-junit5:$testfx"
|
||||
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit"
|
||||
testImplementation "org.junit.platform:junit-platform-suite-api:$junitSuite"
|
||||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit"
|
||||
|
||||
implementation "io.github.palexdev:scenicview:$scenicView"
|
||||
implementation("fr.brouillard.oss:cssfx:$cssfx") { exclude group: 'org.openjfx' }
|
||||
implementation "org.kordamp.ikonli:ikonli-core:$ikonli"
|
||||
implementation "org.kordamp.ikonli:ikonli-javafx:$ikonli"
|
||||
implementation "org.kordamp.ikonli:ikonli-fontawesome5-pack:$ikonli"
|
||||
implementation "io.github.palexdev:virtualizedfx:$vfx"
|
||||
implementation project(':materialfx')
|
||||
}
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = "$testJdk"
|
||||
targetCompatibility = "$testJdk"
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
moduleOptions {
|
||||
compileOnClasspath = true
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
|
||||
moduleOptions {
|
||||
runOnClasspath = true
|
||||
}
|
||||
}
|
||||
|
||||
application {
|
||||
setMainModule("MaterialFX.Demo")
|
||||
String main = project.findProperty("chooseMain").toString()
|
||||
if (main != "null" && !main.trim().isEmpty()) {
|
||||
setMainClassName(main)
|
||||
} else {
|
||||
setMainClassName("io.github.palexdev.materialfx.demo.Demo")
|
||||
}
|
||||
applicationDefaultJvmArgs = ["-Dglass.disableGrab=true"]
|
||||
}
|
||||
|
||||
jlink {
|
||||
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
|
||||
launcher {
|
||||
mainClass = "io.github.palexdev.materialfx.demo.Demo"
|
||||
name = 'MaterialFX Demo'
|
||||
}
|
||||
jpackage {
|
||||
imageOptions = ['--icon', 'src/main/resources/logo.ico']
|
||||
}
|
||||
|
||||
targetPlatform("linux-x64") {
|
||||
jdkHome = jdkDownload("https://cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-linux_x64.tar.gz")
|
||||
addExtraModulePath("/home/palexdev/Documents/JavaFX_jmods/linux_x64")
|
||||
}
|
||||
|
||||
targetPlatform("win") {
|
||||
jdkHome = jdkDownload("https://cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-win_x64.zip")
|
||||
addExtraModulePath("/home/palexdev/Documents/JavaFX_jmods/win_x64")
|
||||
}
|
||||
|
||||
targetPlatform("mac") {
|
||||
jdkHome = jdkDownload("https://cdn.azul.com/zulu/bin/zulu19.32.13-ca-jdk19.0.2-macosx_x64.tar.gz")
|
||||
addExtraModulePath("/home/palexdev/Documents/JavaFX_jmods/mac_x64")
|
||||
}
|
||||
|
||||
addExtraDependencies('javafx')
|
||||
}
|
||||
|
||||
tasks.register('doPackageAll') {
|
||||
doLast {
|
||||
if (Os.isFamily(Os.FAMILY_UNIX)) {
|
||||
exec {
|
||||
mkdir("$layout.buildDirectory/distributions")
|
||||
executable "$rootDir/scripts/JLinkPackage.sh"
|
||||
args = ["$layout.buildDirectory"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jlinkZip.doLast {
|
||||
doPackageAll
|
||||
}
|
Binary file not shown.
@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package io.github.palexdev.materialfx.demo;
|
||||
|
||||
import fr.brouillard.oss.cssfx.CSSFX;
|
||||
import io.github.palexdev.materialfx.demo.controllers.DemoController;
|
||||
import io.github.palexdev.materialfx.theming.JavaFXThemes;
|
||||
import io.github.palexdev.materialfx.theming.MaterialFXStylesheets;
|
||||
import io.github.palexdev.materialfx.theming.UserAgentBuilder;
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
|
||||
public class Demo extends Application {
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
CSSFX.start();
|
||||
|
||||
UserAgentBuilder.builder()
|
||||
.themes(JavaFXThemes.MODENA)
|
||||
.themes(MaterialFXStylesheets.forAssemble(true))
|
||||
.setDeploy(true)
|
||||
.setResolveAssets(true)
|
||||
.build()
|
||||
.setGlobal();
|
||||
|
||||
|
||||
FXMLLoader loader = new FXMLLoader(MFXDemoResourcesLoader.loadURL("fxml/Demo.fxml"));
|
||||
loader.setControllerFactory(c -> new DemoController(primaryStage));
|
||||
Parent root = loader.load();
|
||||
|
||||
Scene scene = new Scene(root);
|
||||
scene.setFill(Color.TRANSPARENT);
|
||||
primaryStage.initStyle(StageStyle.TRANSPARENT);
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.setTitle("MaterialFX Demo");
|
||||
primaryStage.show();
|
||||
|
||||
//ScenicView.show(scene);
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package io.github.palexdev.materialfx.demo;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
* Utility class which manages the access to this project's assets.
|
||||
* Helps keeping the assets files structure organized.
|
||||
*/
|
||||
public class MFXDemoResourcesLoader {
|
||||
|
||||
private MFXDemoResourcesLoader() {
|
||||
}
|
||||
|
||||
public static URL loadURL(String path) {
|
||||
return MFXDemoResourcesLoader.class.getResource(path);
|
||||
}
|
||||
|
||||
public static String load(String path) {
|
||||
return loadURL(path).toString();
|
||||
}
|
||||
|
||||
public static InputStream loadStream(String name) {
|
||||
return MFXDemoResourcesLoader.class.getResourceAsStream(name);
|
||||
}
|
||||
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.MFXRectangleToggleNode;
|
||||
import io.github.palexdev.materialfx.controls.MFXToggleButton;
|
||||
import io.github.palexdev.materialfx.utils.ColorUtils;
|
||||
import io.github.palexdev.mfxresources.fonts.fontawesome.FontAwesomeSolid;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class ChecksRadiosToggleController implements Initializable {
|
||||
|
||||
@FXML
|
||||
private MFXToggleButton customToggle;
|
||||
|
||||
@FXML
|
||||
private MFXRectangleToggleNode r1;
|
||||
|
||||
@FXML
|
||||
private MFXRectangleToggleNode r2;
|
||||
|
||||
@FXML
|
||||
private MFXRectangleToggleNode r3;
|
||||
|
||||
@FXML
|
||||
private void changeColors(ActionEvent event) {
|
||||
customToggle.setColors(ColorUtils.getRandomColor(), ColorUtils.getRandomColor());
|
||||
customToggle.setSelected(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
r1.setLabelLeadingIcon(FontAwesomeSolid.random(Color.BLACK, 16));
|
||||
r1.setLabelTrailingIcon(FontAwesomeSolid.random(Color.BLACK, 16));
|
||||
|
||||
r2.setLabelLeadingIcon(FontAwesomeSolid.random(Color.BLACK, 16));
|
||||
r2.setLabelTrailingIcon(FontAwesomeSolid.random(Color.BLACK, 16));
|
||||
|
||||
r3.setLabelLeadingIcon(FontAwesomeSolid.random(Color.BLACK, 16));
|
||||
r3.setLabelTrailingIcon(FontAwesomeSolid.random(Color.BLACK, 16));
|
||||
}
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.MFXComboBox;
|
||||
import io.github.palexdev.materialfx.controls.MFXFilterComboBox;
|
||||
import io.github.palexdev.materialfx.controls.MFXTooltip;
|
||||
import io.github.palexdev.materialfx.controls.legacy.MFXLegacyComboBox;
|
||||
import io.github.palexdev.materialfx.demo.model.Model;
|
||||
import io.github.palexdev.materialfx.demo.model.Person;
|
||||
import io.github.palexdev.materialfx.utils.StringUtils;
|
||||
import io.github.palexdev.materialfx.utils.others.FunctionalStringConverter;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.util.StringConverter;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class ComboBoxesController implements Initializable {
|
||||
|
||||
@FXML
|
||||
private MFXLegacyComboBox<String> lCombo;
|
||||
|
||||
@FXML
|
||||
private MFXLegacyComboBox<String> lCustCombo;
|
||||
|
||||
@FXML
|
||||
private MFXComboBox<String> nBFCombo;
|
||||
|
||||
@FXML
|
||||
private MFXComboBox<String> nCombo;
|
||||
|
||||
@FXML
|
||||
private MFXComboBox<String> nCustCombo;
|
||||
|
||||
@FXML
|
||||
private MFXComboBox<String> nEditCombo;
|
||||
|
||||
@FXML
|
||||
private MFXComboBox<String> nNFCombo;
|
||||
|
||||
@FXML
|
||||
private MFXFilterComboBox<Person> filterCombo;
|
||||
|
||||
@FXML
|
||||
private MFXFilterComboBox<Person> custFilterCombo;
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
ObservableList<String> strings = Model.strings;
|
||||
ObservableList<Person> people = Model.people;
|
||||
|
||||
lCombo.setItems(strings);
|
||||
lCustCombo.setItems(strings);
|
||||
|
||||
nCombo.setItems(strings);
|
||||
nCustCombo.setItems(strings);
|
||||
nEditCombo.setItems(strings);
|
||||
nBFCombo.setItems(strings);
|
||||
nNFCombo.setItems(strings);
|
||||
|
||||
nEditCombo.setOnCancel(s -> nEditCombo.setText(nEditCombo.getSelectedItem()));
|
||||
nEditCombo.setOnCommit(s -> {
|
||||
if (!strings.contains(s)) {
|
||||
strings.add(s);
|
||||
}
|
||||
nEditCombo.selectItem(s);
|
||||
});
|
||||
|
||||
MFXTooltip.of(
|
||||
nEditCombo,
|
||||
"""
|
||||
This combo box allows you to add new items to the list (no duplicates allowed) when pressing Enter.
|
||||
It also allows to restore the previous selected item by pressing Ctrl+Shift+Z.
|
||||
Both key strokes are default for all MFXComboBoxes but the action to perform must be configured by the user.
|
||||
This combo box is also set to scroll to the selected item when opening the popup.
|
||||
"""
|
||||
).install();
|
||||
|
||||
StringConverter<Person> converter = FunctionalStringConverter.to(person -> (person == null) ? "" : person.getName() + " " + person.getSurname());
|
||||
Function<String, Predicate<Person>> filterFunction = s -> person -> StringUtils.containsIgnoreCase(converter.toString(person), s);
|
||||
filterCombo.setItems(people);
|
||||
filterCombo.setConverter(converter);
|
||||
filterCombo.setFilterFunction(filterFunction);
|
||||
custFilterCombo.setItems(people);
|
||||
custFilterCombo.setConverter(converter);
|
||||
custFilterCombo.setFilterFunction(filterFunction);
|
||||
custFilterCombo.setResetOnPopupHidden(false);
|
||||
}
|
||||
}
|
@ -1,172 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.MFXRectangleToggleNode;
|
||||
import io.github.palexdev.materialfx.controls.MFXScrollPane;
|
||||
import io.github.palexdev.materialfx.demo.MFXDemoResourcesLoader;
|
||||
import io.github.palexdev.materialfx.utils.ScrollUtils;
|
||||
import io.github.palexdev.materialfx.utils.ToggleButtonsUtil;
|
||||
import io.github.palexdev.materialfx.utils.others.loader.MFXLoader;
|
||||
import io.github.palexdev.materialfx.utils.others.loader.MFXLoaderBean;
|
||||
import io.github.palexdev.mfxresources.fonts.MFXFontIcon;
|
||||
import javafx.application.Platform;
|
||||
import javafx.css.PseudoClass;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.geometry.Bounds;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.control.ToggleButton;
|
||||
import javafx.scene.control.ToggleGroup;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.shape.Circle;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import static io.github.palexdev.materialfx.demo.MFXDemoResourcesLoader.loadURL;
|
||||
|
||||
public class DemoController implements Initializable {
|
||||
private final Stage stage;
|
||||
private double xOffset;
|
||||
private double yOffset;
|
||||
private final ToggleGroup toggleGroup;
|
||||
|
||||
@FXML
|
||||
private HBox windowHeader;
|
||||
|
||||
@FXML
|
||||
private MFXFontIcon closeIcon;
|
||||
|
||||
@FXML
|
||||
private MFXFontIcon minimizeIcon;
|
||||
|
||||
@FXML
|
||||
private MFXFontIcon alwaysOnTopIcon;
|
||||
|
||||
@FXML
|
||||
private AnchorPane rootPane;
|
||||
|
||||
@FXML
|
||||
private MFXScrollPane scrollPane;
|
||||
|
||||
@FXML
|
||||
private VBox navBar;
|
||||
|
||||
@FXML
|
||||
private StackPane contentPane;
|
||||
|
||||
@FXML
|
||||
private StackPane logoContainer;
|
||||
|
||||
public DemoController(Stage stage) {
|
||||
this.stage = stage;
|
||||
this.toggleGroup = new ToggleGroup();
|
||||
ToggleButtonsUtil.addAlwaysOneSelectedSupport(toggleGroup);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
closeIcon.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> Platform.exit());
|
||||
minimizeIcon.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> ((Stage) rootPane.getScene().getWindow()).setIconified(true));
|
||||
alwaysOnTopIcon.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> {
|
||||
boolean newVal = !stage.isAlwaysOnTop();
|
||||
alwaysOnTopIcon.pseudoClassStateChanged(PseudoClass.getPseudoClass("always-on-top"), newVal);
|
||||
stage.setAlwaysOnTop(newVal);
|
||||
});
|
||||
|
||||
windowHeader.setOnMousePressed(event -> {
|
||||
xOffset = stage.getX() - event.getScreenX();
|
||||
yOffset = stage.getY() - event.getScreenY();
|
||||
});
|
||||
windowHeader.setOnMouseDragged(event -> {
|
||||
stage.setX(event.getScreenX() + xOffset);
|
||||
stage.setY(event.getScreenY() + yOffset);
|
||||
});
|
||||
|
||||
initializeLoader();
|
||||
|
||||
ScrollUtils.addSmoothScrolling(scrollPane);
|
||||
|
||||
// The only way to get a fucking smooth image in this shitty framework
|
||||
Image image = new Image(MFXDemoResourcesLoader.load("logo_alt.png"), 64, 64, true, true);
|
||||
ImageView logo = new ImageView(image);
|
||||
Circle clip = new Circle(30);
|
||||
clip.centerXProperty().bind(logo.layoutBoundsProperty().map(Bounds::getCenterX));
|
||||
clip.centerYProperty().bind(logo.layoutBoundsProperty().map(Bounds::getCenterY));
|
||||
logo.setClip(clip);
|
||||
logoContainer.getChildren().add(logo);
|
||||
}
|
||||
|
||||
private void initializeLoader() {
|
||||
MFXLoader loader = new MFXLoader();
|
||||
loader.addView(MFXLoaderBean.of("BUTTONS", loadURL("fxml/Buttons.fxml")).setBeanToNodeMapper(() -> createToggle("fas-circle-dot", "Buttons")).setDefaultRoot(true).get());
|
||||
loader.addView(MFXLoaderBean.of("CHECKS_RADIOS_TOGGLES", loadURL("fxml/ChecksRadiosToggles.fxml")).setBeanToNodeMapper(() -> createToggle("fas-toggle-on", "Checks, Radios, Toggles")).get());
|
||||
loader.addView(MFXLoaderBean.of("COMBOS", loadURL("fxml/ComboBoxes.fxml")).setBeanToNodeMapper(() -> createToggle("fas-square-caret-down", "ComboBoxes")).get());
|
||||
loader.addView(MFXLoaderBean.of("DIALOGS", loadURL("fxml/Dialogs.fxml")).setBeanToNodeMapper(() -> createToggle("fas-comments", "Dialogs")).setControllerFactory(c -> new DialogsController(stage)).get());
|
||||
loader.addView(MFXLoaderBean.of("TEXT-FIELDS", loadURL("fxml/TextFields.fxml")).setBeanToNodeMapper(() -> createToggle("fas-italic", "Fields")).get());
|
||||
loader.addView(MFXLoaderBean.of("LISTS", loadURL("fxml/ListViews.fxml")).setBeanToNodeMapper(() -> createToggle("fas-rectangle-list", "Lists")).get());
|
||||
loader.addView(MFXLoaderBean.of("NOTIFICATIONS", loadURL("fxml/Notifications.fxml")).setBeanToNodeMapper(() -> createToggle("fas-bell", "Notifications")).setControllerFactory(c -> new NotificationsController(stage)).get());
|
||||
loader.addView(MFXLoaderBean.of("PICKERS", loadURL("fxml/Pickers.fxml")).setBeanToNodeMapper(() -> createToggle("fas-calendar", "Pickers")).get());
|
||||
loader.addView(MFXLoaderBean.of("PROGRESS", loadURL("fxml/Progress.fxml")).setBeanToNodeMapper(() -> createToggle("fas-bars-progress", "Progress")).get());
|
||||
loader.addView(MFXLoaderBean.of("SCROLL-PANES", loadURL("fxml/ScrollPanes.fxml")).setBeanToNodeMapper(() -> createToggle("fas-bars-progress", "Scroll Panes", 90)).get());
|
||||
loader.addView(MFXLoaderBean.of("SLIDERS", loadURL("fxml/Sliders.fxml")).setBeanToNodeMapper(() -> createToggle("fas-sliders", "Sliders")).get());
|
||||
loader.addView(MFXLoaderBean.of("STEPPER", loadURL("fxml/Stepper.fxml")).setBeanToNodeMapper(() -> createToggle("fas-stairs", "Stepper")).get());
|
||||
loader.addView(MFXLoaderBean.of("TABLES", loadURL("fxml/TableViews.fxml")).setBeanToNodeMapper(() -> createToggle("fas-table", "Tables")).get());
|
||||
loader.addView(MFXLoaderBean.of("FONT-RESOURCES", loadURL("fxml/FontResources.fxml")).setBeanToNodeMapper(() -> createToggle("fas-icons", "Font Resources")).get());
|
||||
loader.setOnLoadedAction(beans -> {
|
||||
List<ToggleButton> nodes = beans.stream()
|
||||
.map(bean -> {
|
||||
ToggleButton toggle = (ToggleButton) bean.getBeanToNodeMapper().get();
|
||||
toggle.setOnAction(event -> contentPane.getChildren().setAll(bean.getRoot()));
|
||||
if (bean.isDefaultView()) {
|
||||
contentPane.getChildren().setAll(bean.getRoot());
|
||||
toggle.setSelected(true);
|
||||
}
|
||||
return toggle;
|
||||
})
|
||||
.toList();
|
||||
navBar.getChildren().setAll(nodes);
|
||||
});
|
||||
loader.start();
|
||||
}
|
||||
|
||||
private ToggleButton createToggle(String icon, String text) {
|
||||
return createToggle(icon, text, 0);
|
||||
}
|
||||
|
||||
private ToggleButton createToggle(String icon, String text, double rotate) {
|
||||
MFXIconWrapper wrapper = new MFXIconWrapper(icon, 24, 32);
|
||||
MFXRectangleToggleNode toggleNode = new MFXRectangleToggleNode(text, wrapper);
|
||||
toggleNode.setAlignment(Pos.CENTER_LEFT);
|
||||
toggleNode.setMaxWidth(Double.MAX_VALUE);
|
||||
toggleNode.setToggleGroup(toggleGroup);
|
||||
if (rotate != 0) wrapper.getIcon().setRotate(rotate);
|
||||
return toggleNode;
|
||||
}
|
||||
}
|
@ -1,115 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.demo.model.Model;
|
||||
import io.github.palexdev.materialfx.dialogs.MFXGenericDialog;
|
||||
import io.github.palexdev.materialfx.dialogs.MFXGenericDialogBuilder;
|
||||
import io.github.palexdev.materialfx.dialogs.MFXStageDialog;
|
||||
import io.github.palexdev.materialfx.enums.ScrimPriority;
|
||||
import io.github.palexdev.mfxresources.fonts.MFXFontIcon;
|
||||
import javafx.application.Platform;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class DialogsController {
|
||||
private MFXGenericDialog dialogContent;
|
||||
private MFXStageDialog dialog;
|
||||
|
||||
@FXML
|
||||
private GridPane grid;
|
||||
|
||||
public DialogsController(Stage stage) {
|
||||
|
||||
Platform.runLater(() -> {
|
||||
this.dialogContent = MFXGenericDialogBuilder.build()
|
||||
.setContentText(Model.ipsum)
|
||||
.makeScrollable(true)
|
||||
.get();
|
||||
this.dialog = MFXGenericDialogBuilder.build(dialogContent)
|
||||
.toStageDialogBuilder()
|
||||
.initOwner(stage)
|
||||
.initModality(Modality.APPLICATION_MODAL)
|
||||
.setDraggable(true)
|
||||
.setTitle("Dialogs Preview")
|
||||
.setOwnerNode(grid)
|
||||
.setScrimPriority(ScrimPriority.WINDOW)
|
||||
.setScrimOwner(true)
|
||||
.get();
|
||||
|
||||
dialogContent.addActions(
|
||||
Map.entry(new MFXButton("Confirm"), event -> {
|
||||
}),
|
||||
Map.entry(new MFXButton("Cancel"), event -> dialog.close())
|
||||
);
|
||||
|
||||
dialogContent.setMaxSize(400, 200);
|
||||
});
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void openInfo(ActionEvent event) {
|
||||
MFXFontIcon infoIcon = new MFXFontIcon("fas-circle-info", 18);
|
||||
dialogContent.setHeaderIcon(infoIcon);
|
||||
dialogContent.setHeaderText("This is a generic info dialog");
|
||||
convertDialogTo("mfx-info-dialog");
|
||||
dialog.showDialog();
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void openWarning(ActionEvent event) {
|
||||
MFXFontIcon warnIcon = new MFXFontIcon("fas-circle-exclamation", 18);
|
||||
dialogContent.setHeaderIcon(warnIcon);
|
||||
dialogContent.setHeaderText("This is a warning info dialog");
|
||||
convertDialogTo("mfx-warn-dialog");
|
||||
dialog.showDialog();
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void openError(ActionEvent event) {
|
||||
MFXFontIcon errorIcon = new MFXFontIcon("fas-circle-xmark", 18);
|
||||
dialogContent.setHeaderIcon(errorIcon);
|
||||
dialogContent.setHeaderText("This is a error info dialog");
|
||||
convertDialogTo("mfx-error-dialog");
|
||||
dialog.showDialog();
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void openGeneric(ActionEvent event) {
|
||||
dialogContent.setHeaderIcon(null);
|
||||
dialogContent.setHeaderText("This is a generic dialog");
|
||||
convertDialogTo(null);
|
||||
dialog.showDialog();
|
||||
}
|
||||
|
||||
private void convertDialogTo(String styleClass) {
|
||||
dialogContent.getStyleClass().removeIf(
|
||||
s -> s.equals("mfx-info-dialog") || s.equals("mfx-warn-dialog") || s.equals("mfx-error-dialog")
|
||||
);
|
||||
|
||||
if (styleClass != null)
|
||||
dialogContent.getStyleClass().add(styleClass);
|
||||
}
|
||||
}
|
@ -1,107 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.MFXTableColumn;
|
||||
import io.github.palexdev.materialfx.controls.MFXTableRow;
|
||||
import io.github.palexdev.materialfx.controls.MFXTableView;
|
||||
import io.github.palexdev.materialfx.controls.cell.MFXTableRowCell;
|
||||
import io.github.palexdev.materialfx.filter.StringFilter;
|
||||
import io.github.palexdev.mfxresources.fonts.IconDescriptor;
|
||||
import io.github.palexdev.mfxresources.fonts.IconsProviders;
|
||||
import io.github.palexdev.mfxresources.fonts.MFXFontIcon;
|
||||
import io.github.palexdev.mfxresources.fonts.fontawesome.FontAwesomeBrands;
|
||||
import io.github.palexdev.mfxresources.fonts.fontawesome.FontAwesomeRegular;
|
||||
import io.github.palexdev.mfxresources.fonts.fontawesome.FontAwesomeSolid;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.Label;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
|
||||
public class FontResourcesController implements Initializable {
|
||||
private final ObservableList<IconDescriptor> fontResources;
|
||||
|
||||
@FXML
|
||||
private Label header;
|
||||
|
||||
@FXML
|
||||
private MFXTableView<IconDescriptor> tableView;
|
||||
|
||||
public FontResourcesController() {
|
||||
List<IconDescriptor> icons = new ArrayList<>();
|
||||
Collections.addAll(icons, FontAwesomeSolid.values());
|
||||
Collections.addAll(icons, FontAwesomeRegular.values());
|
||||
Collections.addAll(icons, FontAwesomeBrands.values());
|
||||
fontResources = FXCollections.observableArrayList(icons);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
MFXTableColumn<IconDescriptor> iconColumn = new MFXTableColumn<>("Icon", false, Comparator.comparing(IconDescriptor::getDescription));
|
||||
MFXTableColumn<IconDescriptor> descriptionColumn = new MFXTableColumn<>("Description", false, Comparator.comparing(IconDescriptor::getDescription));
|
||||
MFXTableColumn<IconDescriptor> codeColumn = new MFXTableColumn<>("Code", false, Comparator.comparing(IconDescriptor::getCode));
|
||||
|
||||
iconColumn.setRowCellFactory(resource -> new MFXTableRowCell<>(IconDescriptor::getDescription) {
|
||||
final MFXFontIcon icon = new MFXFontIcon("", 32);
|
||||
Class<? extends IconDescriptor> current;
|
||||
|
||||
private void handleProvider(IconDescriptor desc) {
|
||||
if (desc.getClass() == current) return;
|
||||
if (desc instanceof FontAwesomeSolid) {
|
||||
icon.setIconsProvider(IconsProviders.FONTAWESOME_SOLID);
|
||||
} else if (desc instanceof FontAwesomeRegular) {
|
||||
icon.setIconsProvider(IconsProviders.FONTAWESOME_REGULAR);
|
||||
} else if (desc instanceof FontAwesomeBrands) {
|
||||
icon.setIconsProvider(IconsProviders.FONTAWESOME_BRANDS);
|
||||
}
|
||||
current = desc.getClass();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(IconDescriptor item) {
|
||||
handleProvider(item);
|
||||
icon.setDescription(item.getDescription());
|
||||
setGraphic(icon);
|
||||
}
|
||||
});
|
||||
descriptionColumn.setRowCellFactory(resource -> new MFXTableRowCell<>(IconDescriptor::getDescription) {
|
||||
@Override
|
||||
public double computePrefWidth(double height) {
|
||||
return 300;
|
||||
}
|
||||
});
|
||||
codeColumn.setRowCellFactory(resource -> new MFXTableRowCell<>(IconDescriptor::getCode, character -> Integer.toHexString(character | 0x10000).substring(1).toUpperCase()));
|
||||
|
||||
tableView.setTableRowFactory(resource -> new MFXTableRow<>(tableView, resource) {{
|
||||
setPrefHeight(48);
|
||||
}});
|
||||
tableView.getTableColumns().addAll(iconColumn, descriptionColumn, codeColumn);
|
||||
tableView.getFilters().add(new StringFilter<>("Description", IconDescriptor::getDescription));
|
||||
tableView.setItems(fontResources);
|
||||
tableView.features().enableBounceEffect();
|
||||
tableView.features().enableSmoothScrolling(0.7);
|
||||
tableView.autosizeColumnsOnInitialization();
|
||||
|
||||
header.setText("MaterialFX Font Resources (" + fontResources.size() + " in total)");
|
||||
}
|
||||
}
|
@ -1,101 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.MFXCheckListView;
|
||||
import io.github.palexdev.materialfx.controls.MFXListView;
|
||||
import io.github.palexdev.materialfx.controls.cell.MFXListCell;
|
||||
import io.github.palexdev.materialfx.demo.model.Model;
|
||||
import io.github.palexdev.materialfx.demo.model.Person;
|
||||
import io.github.palexdev.materialfx.effects.DepthLevel;
|
||||
import io.github.palexdev.mfxresources.fonts.MFXFontIcon;
|
||||
import io.github.palexdev.materialfx.utils.ColorUtils;
|
||||
import io.github.palexdev.materialfx.utils.others.FunctionalStringConverter;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.util.StringConverter;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class ListViewsController implements Initializable {
|
||||
|
||||
@FXML
|
||||
private MFXListView<String> list;
|
||||
|
||||
@FXML
|
||||
private MFXListView<Person> custList;
|
||||
|
||||
@FXML
|
||||
private MFXCheckListView<String> checkList;
|
||||
|
||||
@FXML
|
||||
private MFXListView<Person> legacyList;
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
ObservableList<String> strings = Model.strings;
|
||||
ObservableList<Person> people = Model.people;
|
||||
StringConverter<Person> converter = FunctionalStringConverter.to(person -> (person == null) ? "" : person.getName() + " " + person.getSurname());
|
||||
|
||||
list.setItems(strings);
|
||||
custList.setItems(people);
|
||||
checkList.setItems(strings);
|
||||
custList.setConverter(converter);
|
||||
custList.setCellFactory(person -> new PersonCellFactory(custList, person));
|
||||
custList.features().enableBounceEffect();
|
||||
custList.features().enableSmoothScrolling(0.5);
|
||||
|
||||
legacyList.setItems(people);
|
||||
legacyList.setConverter(converter);
|
||||
}
|
||||
|
||||
@FXML
|
||||
void changeColors(ActionEvent event) {
|
||||
custList.setTrackColor(ColorUtils.getRandomColor());
|
||||
custList.setThumbColor(ColorUtils.getRandomColor());
|
||||
custList.setThumbHoverColor(ColorUtils.getRandomColor());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void changeDepth(ActionEvent event) {
|
||||
DepthLevel newLevel = (custList.getDepthLevel() == DepthLevel.LEVEL0) ? DepthLevel.LEVEL2 : DepthLevel.LEVEL0;
|
||||
custList.setDepthLevel(newLevel);
|
||||
}
|
||||
|
||||
private static class PersonCellFactory extends MFXListCell<Person> {
|
||||
private final MFXFontIcon userIcon;
|
||||
|
||||
public PersonCellFactory(MFXListView<Person> listView, Person data) {
|
||||
super(listView, data);
|
||||
|
||||
userIcon = new MFXFontIcon("fas-user", 18);
|
||||
userIcon.getStyleClass().add("user-icon");
|
||||
render(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void render(Person data) {
|
||||
super.render(data);
|
||||
if (userIcon != null) getChildren().add(0, userIcon);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,243 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.MFXIconWrapper;
|
||||
import io.github.palexdev.materialfx.controls.MFXNotificationCenter;
|
||||
import io.github.palexdev.materialfx.controls.MFXSimpleNotification;
|
||||
import io.github.palexdev.materialfx.controls.cell.MFXNotificationCell;
|
||||
import io.github.palexdev.materialfx.demo.MFXDemoResourcesLoader;
|
||||
import io.github.palexdev.materialfx.demo.model.Model;
|
||||
import io.github.palexdev.materialfx.enums.NotificationPos;
|
||||
import io.github.palexdev.materialfx.enums.NotificationState;
|
||||
import io.github.palexdev.materialfx.factories.InsetsFactory;
|
||||
import io.github.palexdev.materialfx.notifications.MFXNotificationCenterSystem;
|
||||
import io.github.palexdev.materialfx.notifications.MFXNotificationSystem;
|
||||
import io.github.palexdev.materialfx.notifications.base.INotification;
|
||||
import io.github.palexdev.materialfx.utils.RandomUtils;
|
||||
import io.github.palexdev.mfxresources.fonts.IconDescriptor;
|
||||
import io.github.palexdev.mfxresources.fonts.IconsProviders;
|
||||
import io.github.palexdev.mfxresources.fonts.MFXFontIcon;
|
||||
import io.github.palexdev.mfxresources.fonts.fontawesome.FontAwesomeBrands;
|
||||
import io.github.palexdev.mfxresources.fonts.fontawesome.FontAwesomeRegular;
|
||||
import javafx.application.Platform;
|
||||
import javafx.beans.binding.Bindings;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.beans.property.StringProperty;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.Priority;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public class NotificationsController {
|
||||
|
||||
public NotificationsController(Stage stage) {
|
||||
Platform.runLater(() -> {
|
||||
MFXNotificationSystem.instance().initOwner(stage);
|
||||
MFXNotificationCenterSystem.instance().initOwner(stage);
|
||||
|
||||
MFXNotificationCenter center = MFXNotificationCenterSystem.instance().getCenter();
|
||||
center.setCellFactory(notification -> new MFXNotificationCell(center, notification) {
|
||||
{
|
||||
setPrefHeight(400);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@FXML
|
||||
void showTopLeft(ActionEvent event) {
|
||||
MFXNotificationSystem.instance()
|
||||
.setPosition(NotificationPos.TOP_LEFT)
|
||||
.publish(createNotification());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void showTopCenter(ActionEvent event) {
|
||||
MFXNotificationSystem.instance()
|
||||
.setPosition(NotificationPos.TOP_CENTER)
|
||||
.publish(createNotification());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void showTopRight(ActionEvent event) {
|
||||
MFXNotificationSystem.instance()
|
||||
.setPosition(NotificationPos.TOP_RIGHT)
|
||||
.publish(createNotification());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void showBottomLeft(ActionEvent event) {
|
||||
MFXNotificationSystem.instance()
|
||||
.setPosition(NotificationPos.BOTTOM_LEFT)
|
||||
.publish(createNotification());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void showBottomCenter(ActionEvent event) {
|
||||
MFXNotificationSystem.instance()
|
||||
.setPosition(NotificationPos.BOTTOM_LEFT)
|
||||
.publish(createNotification());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void showBottomRight(ActionEvent event) {
|
||||
MFXNotificationSystem.instance()
|
||||
.setPosition(NotificationPos.BOTTOM_RIGHT)
|
||||
.publish(createNotification());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void showTopLeftNC(ActionEvent event) {
|
||||
MFXNotificationCenterSystem.instance()
|
||||
.setPosition(NotificationPos.TOP_LEFT)
|
||||
.publish(createNotification());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void showTopCenterNC(ActionEvent event) {
|
||||
MFXNotificationCenterSystem.instance()
|
||||
.setPosition(NotificationPos.TOP_CENTER)
|
||||
.publish(createNotification());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void showTopRightNC(ActionEvent event) {
|
||||
MFXNotificationCenterSystem.instance()
|
||||
.setPosition(NotificationPos.TOP_RIGHT)
|
||||
.publish(createNotification());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void showBottomLeftNC(ActionEvent event) {
|
||||
MFXNotificationCenterSystem.instance()
|
||||
.setPosition(NotificationPos.BOTTOM_LEFT)
|
||||
.publish(createNotification());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void showBottomCenterNC(ActionEvent event) {
|
||||
MFXNotificationCenterSystem.instance()
|
||||
.setPosition(NotificationPos.BOTTOM_CENTER)
|
||||
.publish(createNotification());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void showBottomRightNC(ActionEvent event) {
|
||||
MFXNotificationCenterSystem.instance()
|
||||
.setPosition(NotificationPos.BOTTOM_RIGHT)
|
||||
.publish(createNotification());
|
||||
}
|
||||
|
||||
private INotification createNotification() {
|
||||
ExampleNotification notification = new ExampleNotification();
|
||||
notification.setContentText(RandomUtils.randFromArray(Model.randomText));
|
||||
return notification;
|
||||
}
|
||||
|
||||
private static class ExampleNotification extends MFXSimpleNotification {
|
||||
private final StringProperty headerText = new SimpleStringProperty("Notification Header");
|
||||
private final StringProperty contentText = new SimpleStringProperty();
|
||||
|
||||
public ExampleNotification() {
|
||||
|
||||
MFXFontIcon fi = new MFXFontIcon();
|
||||
IconDescriptor desc = RandomUtils.randFromArray(Model.notificationsIcons);
|
||||
if (desc instanceof FontAwesomeRegular) {
|
||||
fi.setIconsProvider(IconsProviders.FONTAWESOME_REGULAR);
|
||||
} else if (desc instanceof FontAwesomeBrands) {
|
||||
fi.setIconsProvider(IconsProviders.FONTAWESOME_BRANDS);
|
||||
}
|
||||
fi.setDescription(desc.getDescription());
|
||||
fi.setSize(16);
|
||||
MFXIconWrapper icon = new MFXIconWrapper(fi, 32);
|
||||
Label headerLabel = new Label();
|
||||
headerLabel.textProperty().bind(headerText);
|
||||
MFXIconWrapper readIcon = new MFXIconWrapper("fas-eye", 16, 32);
|
||||
((MFXFontIcon) readIcon.getIcon()).descriptionProperty().bind(Bindings.createStringBinding(
|
||||
() -> (getState() == NotificationState.READ) ? "fas-eye" : "fas-eye-slash",
|
||||
notificationStateProperty()
|
||||
));
|
||||
StackPane.setAlignment(readIcon, Pos.CENTER_RIGHT);
|
||||
StackPane placeHolder = new StackPane(readIcon);
|
||||
placeHolder.setMaxWidth(Double.MAX_VALUE);
|
||||
HBox.setHgrow(placeHolder, Priority.ALWAYS);
|
||||
HBox header = new HBox(10, icon, headerLabel, placeHolder);
|
||||
header.setAlignment(Pos.CENTER_LEFT);
|
||||
header.setPadding(InsetsFactory.of(5, 0, 5, 0));
|
||||
header.setMaxWidth(Double.MAX_VALUE);
|
||||
|
||||
|
||||
Label contentLabel = new Label();
|
||||
contentLabel.getStyleClass().add("content");
|
||||
contentLabel.textProperty().bind(contentText);
|
||||
contentLabel.setWrapText(true);
|
||||
contentLabel.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
|
||||
contentLabel.setAlignment(Pos.TOP_LEFT);
|
||||
|
||||
MFXButton action1 = new MFXButton("Action 1");
|
||||
MFXButton action2 = new MFXButton("Action 2");
|
||||
HBox actionsBar = new HBox(15, action1, action2);
|
||||
actionsBar.getStyleClass().add("actions-bar");
|
||||
actionsBar.setAlignment(Pos.CENTER_RIGHT);
|
||||
actionsBar.setPadding(InsetsFactory.all(5));
|
||||
|
||||
BorderPane container = new BorderPane();
|
||||
container.getStyleClass().add("notification");
|
||||
container.setTop(header);
|
||||
container.setCenter(contentLabel);
|
||||
container.setBottom(actionsBar);
|
||||
container.getStylesheets().add(MFXDemoResourcesLoader.load("css/ExampleNotification.css"));
|
||||
container.setMinHeight(200);
|
||||
container.setMaxWidth(400);
|
||||
|
||||
setContent(container);
|
||||
}
|
||||
|
||||
public String getHeaderText() {
|
||||
return headerText.get();
|
||||
}
|
||||
|
||||
public StringProperty headerTextProperty() {
|
||||
return headerText;
|
||||
}
|
||||
|
||||
public void setHeaderText(String headerText) {
|
||||
this.headerText.set(headerText);
|
||||
}
|
||||
|
||||
public String getContentText() {
|
||||
return contentText.get();
|
||||
}
|
||||
|
||||
public StringProperty contentTextProperty() {
|
||||
return contentText;
|
||||
}
|
||||
|
||||
public void setContentText(String contentText) {
|
||||
this.contentText.set(contentText);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.MFXDatePicker;
|
||||
import io.github.palexdev.materialfx.utils.DateTimeUtils;
|
||||
import io.github.palexdev.materialfx.utils.others.dates.DateStringConverter;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class PickersController implements Initializable {
|
||||
|
||||
@FXML
|
||||
private MFXDatePicker custDatePicker;
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
custDatePicker.setGridAlgorithm(DateTimeUtils::partialIntMonthMatrix);
|
||||
custDatePicker.setConverterSupplier(() -> new DateStringConverter("dd/MM/yyyy", custDatePicker.getLocale()));
|
||||
}
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.beans.NumberRange;
|
||||
import io.github.palexdev.materialfx.controls.MFXProgressBar;
|
||||
import io.github.palexdev.materialfx.controls.MFXProgressSpinner;
|
||||
import io.github.palexdev.materialfx.effects.Interpolators;
|
||||
import io.github.palexdev.materialfx.utils.AnimationUtils.KeyFrames;
|
||||
import io.github.palexdev.materialfx.utils.AnimationUtils.PauseBuilder;
|
||||
import io.github.palexdev.materialfx.utils.AnimationUtils.TimelineBuilder;
|
||||
import javafx.animation.Animation;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.ProgressIndicator;
|
||||
import javafx.util.Duration;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class ProgressController implements Initializable {
|
||||
|
||||
@FXML
|
||||
private MFXProgressBar determinateBar;
|
||||
|
||||
@FXML
|
||||
private MFXProgressSpinner determinateSpinner;
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
determinateBar.getRanges1().add(NumberRange.of(0.0, 0.30));
|
||||
determinateBar.getRanges2().add(NumberRange.of(0.31, 0.60));
|
||||
determinateBar.getRanges3().add(NumberRange.of(0.61, 1.0));
|
||||
|
||||
determinateSpinner.getRanges1().add(NumberRange.of(0.0, 0.30));
|
||||
determinateSpinner.getRanges2().add(NumberRange.of(0.31, 0.60));
|
||||
determinateSpinner.getRanges3().add(NumberRange.of(0.61, 1.0));
|
||||
|
||||
createAndPlayAnimation(determinateBar);
|
||||
createAndPlayAnimation(determinateSpinner);
|
||||
}
|
||||
|
||||
private void createAndPlayAnimation(ProgressIndicator indicator) {
|
||||
Animation a1 = TimelineBuilder.build()
|
||||
.add(
|
||||
KeyFrames.of(2000, indicator.progressProperty(), 0.3, Interpolators.INTERPOLATOR_V1),
|
||||
KeyFrames.of(4000, indicator.progressProperty(), 0.6, Interpolators.INTERPOLATOR_V1),
|
||||
KeyFrames.of(6000, indicator.progressProperty(), 1.0, Interpolators.INTERPOLATOR_V1)
|
||||
)
|
||||
.getAnimation();
|
||||
|
||||
Animation a2 = TimelineBuilder.build()
|
||||
.add(
|
||||
KeyFrames.of(1000, indicator.progressProperty(), 0, Interpolators.INTERPOLATOR_V2)
|
||||
)
|
||||
.getAnimation();
|
||||
|
||||
a1.setOnFinished(end -> PauseBuilder.build()
|
||||
.setDuration(Duration.seconds(1))
|
||||
.setOnFinished(event -> a2.playFromStart())
|
||||
.getAnimation()
|
||||
.play()
|
||||
);
|
||||
a2.setOnFinished(end -> PauseBuilder.build()
|
||||
.setDuration(Duration.seconds(1))
|
||||
.setOnFinished(event -> a1.playFromStart())
|
||||
.getAnimation()
|
||||
.play()
|
||||
);
|
||||
|
||||
a1.play();
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.MFXScrollPane;
|
||||
import io.github.palexdev.materialfx.demo.model.Model;
|
||||
import io.github.palexdev.materialfx.utils.ColorUtils;
|
||||
import io.github.palexdev.materialfx.utils.ScrollUtils;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.Label;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class ScrollPanesController implements Initializable {
|
||||
|
||||
@FXML
|
||||
private MFXScrollPane scroll1;
|
||||
|
||||
@FXML
|
||||
private MFXScrollPane scroll2;
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
Label l1 = new Label(Model.ipsum);
|
||||
l1.setWrapText(true);
|
||||
Label l2 = new Label(Model.ipsum);
|
||||
l2.setMaxSize(400, Double.MAX_VALUE);
|
||||
l2.setWrapText(true);
|
||||
|
||||
scroll1.setContent(l1);
|
||||
scroll2.setContent(l2);
|
||||
|
||||
ScrollUtils.addSmoothScrolling(scroll1);
|
||||
ScrollUtils.addSmoothScrolling(scroll2);
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void setRandomTrackColor() {
|
||||
scroll1.setTrackColor(ColorUtils.getRandomColor());
|
||||
scroll2.setTrackColor(ColorUtils.getRandomColor());
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void setRandomThumbColor() {
|
||||
scroll1.setThumbColor(ColorUtils.getRandomColor());
|
||||
scroll2.setThumbColor(ColorUtils.getRandomColor());
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void setRandomThumbHoverColor() {
|
||||
scroll1.setThumbHoverColor(ColorUtils.getRandomColor());
|
||||
scroll2.setThumbHoverColor(ColorUtils.getRandomColor());
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.beans.NumberRange;
|
||||
import io.github.palexdev.materialfx.controls.MFXSlider;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class SlidersController implements Initializable {
|
||||
|
||||
@FXML
|
||||
private MFXSlider customSlider;
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
customSlider.getRanges1().add(NumberRange.of(customSlider.getMin(), 33.0));
|
||||
customSlider.getRanges2().add(NumberRange.of(34.0, 66.0));
|
||||
customSlider.getRanges3().add(NumberRange.of(67.0, customSlider.getMax()));
|
||||
}
|
||||
}
|
@ -1,204 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.*;
|
||||
import io.github.palexdev.materialfx.controls.MFXStepper.MFXStepperEvent;
|
||||
import io.github.palexdev.mfxresources.fonts.MFXFontIcon;
|
||||
import io.github.palexdev.materialfx.validation.Constraint;
|
||||
import io.github.palexdev.materialfx.validation.MFXValidator;
|
||||
import io.github.palexdev.materialfx.validation.Validated;
|
||||
import javafx.beans.binding.Bindings;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.Region;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class StepperController implements Initializable {
|
||||
private final MFXTextField loginField;
|
||||
private final MFXPasswordField passwordField;
|
||||
private final MFXTextField firstNameField;
|
||||
private final MFXTextField lastNameField;
|
||||
private final MFXComboBox<String> genderCombo;
|
||||
private final MFXCheckbox checkbox;
|
||||
|
||||
@FXML
|
||||
private MFXButton unlock;
|
||||
|
||||
@FXML
|
||||
private MFXStepper stepper;
|
||||
|
||||
public StepperController() {
|
||||
loginField = new MFXTextField();
|
||||
passwordField = new MFXPasswordField();
|
||||
firstNameField = new MFXTextField();
|
||||
lastNameField = new MFXTextField();
|
||||
genderCombo = new MFXComboBox<>();
|
||||
checkbox = new MFXCheckbox("Confirm Data?");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
loginField.setPromptText("Username...");
|
||||
loginField.getValidator().constraint("The username must be at least 6 characters long", loginField.textProperty().length().greaterThanOrEqualTo(6));
|
||||
loginField.setLeadingIcon(new MFXIconWrapper("fas-user", 16, Color.web("#4D4D4D"), 24));
|
||||
passwordField.getValidator().constraint("The password must be at least 8 characters long", passwordField.textProperty().length().greaterThanOrEqualTo(8));
|
||||
passwordField.setPromptText("Password...");
|
||||
|
||||
firstNameField.setPromptText("First Name...");
|
||||
lastNameField.setPromptText("Last Name...");
|
||||
genderCombo.setItems(FXCollections.observableArrayList("Male", "Female", "Other"));
|
||||
|
||||
List<MFXStepperToggle> stepperToggles = createSteps();
|
||||
stepper.getStepperToggles().addAll(stepperToggles);
|
||||
|
||||
unlock.visibleProperty().bind(stepper.mouseTransparentProperty());
|
||||
unlock.setOnAction(event -> stepper.setMouseTransparent(false));
|
||||
}
|
||||
|
||||
private List<MFXStepperToggle> createSteps() {
|
||||
MFXStepperToggle step1 = new MFXStepperToggle("Step 1", new MFXFontIcon("fas-lock", 16, Color.web("#f1c40f")));
|
||||
VBox step1Box = new VBox(20, wrapNodeForValidation(loginField), wrapNodeForValidation(passwordField));
|
||||
step1Box.setAlignment(Pos.CENTER);
|
||||
step1.setContent(step1Box);
|
||||
step1.getValidator().dependsOn(loginField.getValidator()).dependsOn(passwordField.getValidator());
|
||||
|
||||
MFXStepperToggle step2 = new MFXStepperToggle("Step 2", new MFXFontIcon("fas-user", 16, Color.web("#49a6d7")));
|
||||
VBox step2Box = new VBox(20, firstNameField, lastNameField, genderCombo);
|
||||
step2Box.setAlignment(Pos.CENTER);
|
||||
step2.setContent(step2Box);
|
||||
|
||||
MFXStepperToggle step3 = new MFXStepperToggle("Step 3", new MFXFontIcon("fas-check", 16, Color.web("#85CB33")));
|
||||
Node step3Grid = createGrid();
|
||||
step3.setContent(step3Grid);
|
||||
step3.getValidator().constraint("Data must be confirmed", checkbox.selectedProperty());
|
||||
|
||||
return List.of(step1, step2, step3);
|
||||
}
|
||||
|
||||
private <T extends Node & Validated> Node wrapNodeForValidation(T node) {
|
||||
Label errorLabel = new Label();
|
||||
errorLabel.getStyleClass().add("error-label");
|
||||
errorLabel.setManaged(false);
|
||||
stepper.addEventHandler(MFXStepperEvent.VALIDATION_FAILED_EVENT, event -> {
|
||||
MFXValidator validator = node.getValidator();
|
||||
List<Constraint> validate = validator.validate();
|
||||
if (!validate.isEmpty()) {
|
||||
errorLabel.setText(validate.get(0).getMessage());
|
||||
}
|
||||
});
|
||||
stepper.addEventHandler(MFXStepperEvent.NEXT_EVENT, event -> errorLabel.setText(""));
|
||||
VBox wrap = new VBox(3, node, errorLabel) {
|
||||
@Override
|
||||
protected void layoutChildren() {
|
||||
super.layoutChildren();
|
||||
|
||||
double x = node.getBoundsInParent().getMinX();
|
||||
double y = node.getBoundsInParent().getMaxY() + getSpacing();
|
||||
double width = getWidth();
|
||||
double height = errorLabel.prefHeight(-1);
|
||||
errorLabel.resizeRelocate(x, y, width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected double computePrefHeight(double width) {
|
||||
return super.computePrefHeight(width) + errorLabel.getHeight() + getSpacing();
|
||||
}
|
||||
};
|
||||
wrap.setAlignment(Pos.CENTER);
|
||||
return wrap;
|
||||
}
|
||||
|
||||
private Node createGrid() {
|
||||
MFXTextField usernameLabel1 = createLabel("Username: ");
|
||||
MFXTextField usernameLabel2 = createLabel("");
|
||||
usernameLabel2.textProperty().bind(loginField.textProperty());
|
||||
|
||||
MFXTextField firstNameLabel1 = createLabel("First Name: ");
|
||||
MFXTextField firstNameLabel2 = createLabel("");
|
||||
firstNameLabel2.textProperty().bind(firstNameField.textProperty());
|
||||
|
||||
MFXTextField lastNameLabel1 = createLabel("Last Name: ");
|
||||
MFXTextField lastNameLabel2 = createLabel("");
|
||||
lastNameLabel2.textProperty().bind(lastNameField.textProperty());
|
||||
|
||||
MFXTextField genderLabel1 = createLabel("Gender: ");
|
||||
MFXTextField genderLabel2 = createLabel("");
|
||||
genderLabel2.textProperty().bind(Bindings.createStringBinding(
|
||||
() -> genderCombo.getValue() != null ? genderCombo.getValue() : "",
|
||||
genderCombo.valueProperty()
|
||||
));
|
||||
|
||||
usernameLabel1.getStyleClass().add("header-label");
|
||||
firstNameLabel1.getStyleClass().add("header-label");
|
||||
lastNameLabel1.getStyleClass().add("header-label");
|
||||
genderLabel1.getStyleClass().add("header-label");
|
||||
|
||||
MFXTextField completedLabel = MFXTextField.asLabel("Completed!");
|
||||
completedLabel.getStyleClass().add("completed-label");
|
||||
|
||||
HBox b1 = new HBox(usernameLabel1, usernameLabel2);
|
||||
HBox b2 = new HBox(firstNameLabel1, firstNameLabel2);
|
||||
HBox b3 = new HBox(lastNameLabel1, lastNameLabel2);
|
||||
HBox b4 = new HBox(genderLabel1, genderLabel2);
|
||||
|
||||
b1.setMaxWidth(Region.USE_PREF_SIZE);
|
||||
b2.setMaxWidth(Region.USE_PREF_SIZE);
|
||||
b3.setMaxWidth(Region.USE_PREF_SIZE);
|
||||
b4.setMaxWidth(Region.USE_PREF_SIZE);
|
||||
|
||||
VBox box = new VBox(10, b1, b2, b3, b4, checkbox);
|
||||
box.setAlignment(Pos.CENTER);
|
||||
StackPane.setAlignment(box, Pos.CENTER);
|
||||
|
||||
stepper.setOnLastNext(event -> {
|
||||
box.getChildren().setAll(completedLabel);
|
||||
stepper.setMouseTransparent(true);
|
||||
});
|
||||
stepper.setOnBeforePrevious(event -> {
|
||||
if (stepper.isLastToggle()) {
|
||||
checkbox.setSelected(false);
|
||||
box.getChildren().setAll(b1, b2, b3, b4, checkbox);
|
||||
}
|
||||
});
|
||||
|
||||
return box;
|
||||
}
|
||||
|
||||
private MFXTextField createLabel(String text) {
|
||||
MFXTextField label = MFXTextField.asLabel(text);
|
||||
label.setAlignment(Pos.CENTER_LEFT);
|
||||
label.setPrefWidth(200);
|
||||
label.setMinWidth(Region.USE_PREF_SIZE);
|
||||
label.setMaxWidth(Region.USE_PREF_SIZE);
|
||||
return label;
|
||||
}
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.MFXPaginatedTableView;
|
||||
import io.github.palexdev.materialfx.controls.MFXTableColumn;
|
||||
import io.github.palexdev.materialfx.controls.MFXTableView;
|
||||
import io.github.palexdev.materialfx.controls.cell.MFXTableRowCell;
|
||||
import io.github.palexdev.materialfx.demo.model.Device;
|
||||
import io.github.palexdev.materialfx.demo.model.Model;
|
||||
import io.github.palexdev.materialfx.demo.model.Person;
|
||||
import io.github.palexdev.materialfx.filter.EnumFilter;
|
||||
import io.github.palexdev.materialfx.filter.IntegerFilter;
|
||||
import io.github.palexdev.materialfx.filter.StringFilter;
|
||||
import io.github.palexdev.materialfx.utils.others.observables.When;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.geometry.Pos;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.Comparator;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class TableViewsController implements Initializable {
|
||||
|
||||
@FXML
|
||||
private MFXTableView<Person> table;
|
||||
|
||||
@FXML
|
||||
private MFXPaginatedTableView<Device> paginated;
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
setupTable();
|
||||
setupPaginated();
|
||||
|
||||
table.autosizeColumnsOnInitialization();
|
||||
paginated.autosizeColumnsOnInitialization();
|
||||
|
||||
When.onChanged(paginated.currentPageProperty())
|
||||
.then((oldValue, newValue) -> paginated.autosizeColumns())
|
||||
.listen();
|
||||
}
|
||||
|
||||
private void setupTable() {
|
||||
MFXTableColumn<Person> nameColumn = new MFXTableColumn<>("Name", true, Comparator.comparing(Person::getName));
|
||||
MFXTableColumn<Person> surnameColumn = new MFXTableColumn<>("Surname", true, Comparator.comparing(Person::getSurname));
|
||||
MFXTableColumn<Person> ageColumn = new MFXTableColumn<>("Age", true, Comparator.comparing(Person::getAge));
|
||||
|
||||
nameColumn.setRowCellFactory(person -> new MFXTableRowCell<>(Person::getName));
|
||||
surnameColumn.setRowCellFactory(person -> new MFXTableRowCell<>(Person::getSurname));
|
||||
ageColumn.setRowCellFactory(person -> new MFXTableRowCell<>(Person::getAge) {{
|
||||
setAlignment(Pos.CENTER_RIGHT);
|
||||
}});
|
||||
ageColumn.setAlignment(Pos.CENTER_RIGHT);
|
||||
|
||||
table.getTableColumns().addAll(nameColumn, surnameColumn, ageColumn);
|
||||
table.getFilters().addAll(
|
||||
new StringFilter<>("Name", Person::getName),
|
||||
new StringFilter<>("Surname", Person::getSurname),
|
||||
new IntegerFilter<>("Age", Person::getAge)
|
||||
);
|
||||
table.setItems(Model.people);
|
||||
}
|
||||
|
||||
private void setupPaginated() {
|
||||
MFXTableColumn<Device> idColumn = new MFXTableColumn<>("ID", false, Comparator.comparing(Device::getID));
|
||||
MFXTableColumn<Device> nameColumn = new MFXTableColumn<>("Name", false, Comparator.comparing(Device::getName));
|
||||
MFXTableColumn<Device> ipColumn = new MFXTableColumn<>("IP", false, Comparator.comparing(Device::getIP));
|
||||
MFXTableColumn<Device> ownerColumn = new MFXTableColumn<>("Owner", false, Comparator.comparing(Device::getOwner));
|
||||
MFXTableColumn<Device> stateColumn = new MFXTableColumn<>("State", false, Comparator.comparing(Device::getState));
|
||||
|
||||
idColumn.setRowCellFactory(device -> new MFXTableRowCell<>(Device::getID));
|
||||
nameColumn.setRowCellFactory(device -> new MFXTableRowCell<>(Device::getName));
|
||||
ipColumn.setRowCellFactory(device -> new MFXTableRowCell<>(Device::getIP) {{
|
||||
setAlignment(Pos.CENTER_RIGHT);
|
||||
}});
|
||||
ownerColumn.setRowCellFactory(device -> new MFXTableRowCell<>(Device::getOwner));
|
||||
stateColumn.setRowCellFactory(device -> new MFXTableRowCell<>(Device::getState));
|
||||
ipColumn.setAlignment(Pos.CENTER_RIGHT);
|
||||
|
||||
paginated.getTableColumns().addAll(idColumn, nameColumn, ipColumn, ownerColumn, stateColumn);
|
||||
paginated.getFilters().addAll(
|
||||
new IntegerFilter<>("ID", Device::getID),
|
||||
new StringFilter<>("Name", Device::getName),
|
||||
new StringFilter<>("IP", Device::getIP),
|
||||
new StringFilter<>("Owner", Device::getOwner),
|
||||
new EnumFilter<>("State", Device::getState, Device.State.class)
|
||||
);
|
||||
paginated.setItems(Model.devices);
|
||||
}
|
||||
}
|
@ -1,115 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.MFXPasswordField;
|
||||
import io.github.palexdev.materialfx.controls.MFXTextField;
|
||||
import io.github.palexdev.materialfx.validation.Constraint;
|
||||
import io.github.palexdev.materialfx.validation.Severity;
|
||||
import javafx.beans.binding.Bindings;
|
||||
import javafx.css.PseudoClass;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.Label;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import static io.github.palexdev.materialfx.utils.StringUtils.containsAny;
|
||||
|
||||
public class TextFieldsController implements Initializable {
|
||||
private static final PseudoClass INVALID_PSEUDO_CLASS = PseudoClass.getPseudoClass("invalid");
|
||||
// Because fuck regex, stupid shit
|
||||
private static final String[] upperChar = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z".split(" ");
|
||||
private static final String[] lowerChar = "a b c d e f g h i j k l m n o p q r s t u v w x y z".split(" ");
|
||||
private static final String[] digits = "0 1 2 3 4 5 6 7 8 9".split(" ");
|
||||
private static final String[] specialCharacters = "! @ # & ( ) – [ { } ]: ; ' , ? / * ~ $ ^ + = < > -".split(" ");
|
||||
|
||||
@FXML
|
||||
private MFXTextField textField;
|
||||
|
||||
@FXML
|
||||
private MFXPasswordField passwordField;
|
||||
|
||||
@FXML
|
||||
private Label validationLabel;
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
textField.setTextLimit(10);
|
||||
|
||||
Constraint lengthConstraint = Constraint.Builder.build()
|
||||
.setSeverity(Severity.ERROR)
|
||||
.setMessage("Password must be at least 8 characters long")
|
||||
.setCondition(passwordField.textProperty().length().greaterThanOrEqualTo(8))
|
||||
.get();
|
||||
|
||||
Constraint digitConstraint = Constraint.Builder.build()
|
||||
.setSeverity(Severity.ERROR)
|
||||
.setMessage("Password must contain at least one digit")
|
||||
.setCondition(Bindings.createBooleanBinding(
|
||||
() -> containsAny(passwordField.getText(), "", digits),
|
||||
passwordField.textProperty()
|
||||
))
|
||||
.get();
|
||||
|
||||
Constraint charactersConstraint = Constraint.Builder.build()
|
||||
.setSeverity(Severity.ERROR)
|
||||
.setMessage("Password must contain at least one lowercase and one uppercase characters")
|
||||
.setCondition(Bindings.createBooleanBinding(
|
||||
() -> containsAny(passwordField.getText(), "", upperChar) && containsAny(passwordField.getText(), "", lowerChar),
|
||||
passwordField.textProperty()
|
||||
))
|
||||
.get();
|
||||
|
||||
Constraint specialCharactersConstraint = Constraint.Builder.build()
|
||||
.setSeverity(Severity.ERROR)
|
||||
.setMessage("Password must contain at least one special character")
|
||||
.setCondition(Bindings.createBooleanBinding(
|
||||
() -> containsAny(passwordField.getText(), "", specialCharacters),
|
||||
passwordField.textProperty()
|
||||
))
|
||||
.get();
|
||||
|
||||
passwordField.getValidator()
|
||||
.constraint(digitConstraint)
|
||||
.constraint(charactersConstraint)
|
||||
.constraint(specialCharactersConstraint)
|
||||
.constraint(lengthConstraint);
|
||||
|
||||
passwordField.getValidator().validProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if (newValue) {
|
||||
validationLabel.setVisible(false);
|
||||
passwordField.pseudoClassStateChanged(INVALID_PSEUDO_CLASS, false);
|
||||
}
|
||||
});
|
||||
|
||||
passwordField.delegateFocusedProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if (oldValue && !newValue) {
|
||||
List<Constraint> constraints = passwordField.validate();
|
||||
if (!constraints.isEmpty()) {
|
||||
passwordField.pseudoClassStateChanged(INVALID_PSEUDO_CLASS, true);
|
||||
validationLabel.setText(constraints.get(0).getMessage());
|
||||
validationLabel.setVisible(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -1,106 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.utils.RandomUtils;
|
||||
import javafx.beans.property.*;
|
||||
|
||||
public class Device {
|
||||
public enum State {
|
||||
ONLINE, OFFLINE
|
||||
}
|
||||
|
||||
private final IntegerProperty id = new SimpleIntegerProperty();
|
||||
private final StringProperty name = new SimpleStringProperty("");
|
||||
private final StringProperty ip = new SimpleStringProperty("");
|
||||
private final StringProperty owner = new SimpleStringProperty("");
|
||||
private final ObjectProperty<State> state = new SimpleObjectProperty<>();
|
||||
|
||||
public Device(int id, String name, String ip, String owner, State state) {
|
||||
setID(id);
|
||||
setName(name);
|
||||
setIP(ip);
|
||||
setOwner(owner);
|
||||
setState(state);
|
||||
}
|
||||
|
||||
public int getID() {
|
||||
return id.get();
|
||||
}
|
||||
|
||||
public IntegerProperty idProperty() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setID(int id) {
|
||||
this.id.set(id);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name.get();
|
||||
}
|
||||
|
||||
public StringProperty nameProperty() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name.set(name);
|
||||
}
|
||||
|
||||
public String getIP() {
|
||||
return ip.get();
|
||||
}
|
||||
|
||||
public StringProperty ipProperty() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIP(String ip) {
|
||||
this.ip.set(ip);
|
||||
}
|
||||
|
||||
public String getOwner() {
|
||||
return owner.get();
|
||||
}
|
||||
|
||||
public StringProperty ownerProperty() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
this.owner.set(owner);
|
||||
}
|
||||
|
||||
public State getState() {
|
||||
return state.get();
|
||||
}
|
||||
|
||||
public ObjectProperty<State> stateProperty() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(State state) {
|
||||
this.state.set(state);
|
||||
}
|
||||
|
||||
public static int randomID() {
|
||||
return RandomUtils.random.nextInt(100000, 1000000);
|
||||
}
|
||||
}
|
@ -1,171 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.utils.FXCollectors;
|
||||
import io.github.palexdev.mfxresources.fonts.IconDescriptor;
|
||||
import io.github.palexdev.mfxresources.fonts.fontawesome.FontAwesomeBrands;
|
||||
import io.github.palexdev.mfxresources.fonts.fontawesome.FontAwesomeRegular;
|
||||
import io.github.palexdev.mfxresources.fonts.fontawesome.FontAwesomeSolid;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import static io.github.palexdev.materialfx.demo.model.Device.State.OFFLINE;
|
||||
import static io.github.palexdev.materialfx.demo.model.Device.State.ONLINE;
|
||||
import static io.github.palexdev.materialfx.demo.model.Device.randomID;
|
||||
|
||||
public class Model {
|
||||
public static final String ipsum =
|
||||
"""
|
||||
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
|
||||
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
|
||||
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
|
||||
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
|
||||
""";
|
||||
public static final IconDescriptor[] notificationsIcons;
|
||||
public static final String[] randomText;
|
||||
public static final ObservableList<String> strings;
|
||||
public static final ObservableList<Person> people;
|
||||
public static final ObservableList<Device> devices;
|
||||
|
||||
static {
|
||||
notificationsIcons = new IconDescriptor[]{
|
||||
FontAwesomeSolid.BELL, FontAwesomeRegular.BELL,
|
||||
FontAwesomeSolid.CALENDAR, FontAwesomeSolid.CALENDAR_DAYS,
|
||||
FontAwesomeSolid.CHART_PIE, FontAwesomeSolid.CIRCLE, FontAwesomeRegular.CIRCLE,
|
||||
FontAwesomeSolid.CIRCLE_EXCLAMATION, FontAwesomeSolid.TRIANGLE_EXCLAMATION,
|
||||
FontAwesomeSolid.GEAR, FontAwesomeBrands.GOOGLE_DRIVE, FontAwesomeSolid.HOUSE,
|
||||
FontAwesomeSolid.CIRCLE_INFO, FontAwesomeSolid.MUSIC,
|
||||
FontAwesomeSolid.USER, FontAwesomeSolid.USERS, FontAwesomeSolid.VIDEO,
|
||||
FontAwesomeSolid.CIRCLE_XMARK
|
||||
};
|
||||
|
||||
randomText = new String[]{
|
||||
"""
|
||||
In the United States there are about 350 spoken languages. But coding has us beat with over 700 coding languages in use today! Only two countries speak more languages, Papua New Guinea (836) and Indonesia (710).
|
||||
Some programming languages, like Java, Python, and HTML, are more common, but others, like Rust and Kotlin, are used in very specific situations.
|
||||
The good news for coders? Once you learn the big ones, the more niche languages come easily.
|
||||
""",
|
||||
"""
|
||||
Have you ever encountered a computer bug? How about a real bug in your computer? In 1947 a technician at Harvard had an issue with the performance of their Mark II computer.
|
||||
Once they investigated, they discovered that a moth had gotten into a relay – an actual real live bug. In the logbook, it was noted as “First actual case of bug being found."
|
||||
While it is oft-repeated that this is where the term “bug" came to refer to errors that impacted the performance of programs, this is not the case.
|
||||
The term “bug" was already in fairly widespread use in technical circles in 1947. Thomas Edison used it in 1869 to describe problems in his own inventions.
|
||||
""",
|
||||
"""
|
||||
Coding and STEM fields may seem like it’s built for boys, but the first person to write our modern understanding of a program was Ada Lovelace.
|
||||
Being the only legitimate daughter of the poet, Lord Byron, Ada’s mother feared her daughter would suffer the same madness as her father.
|
||||
To stave off the madness as long as possible, she dedicated her daughter to studying math and science.
|
||||
While working with a peer on a mechanical general-purpose computer known as the Analytical Engine, she recognized that the machine could go way beyond simple and pure calculations, publishing then the first algorithm intended to be carried out by a machine like this one.
|
||||
""",
|
||||
"""
|
||||
The idea of a computer virus was published in the essay “Theory of self-reproducing automata" by John von Neumann in 1949, but the first replicating computer program was not written until 1971.
|
||||
The program was not actively malicious software as it caused no damage to data,
|
||||
the only effect being a message it output to the teletype reading “I’M THE CREEPER; CATCH ME IF YOU CAN".
|
||||
""",
|
||||
"""
|
||||
You may be fluent in Javascript or C++ but what NASA engineers really need to know is ADA and HAL/S.
|
||||
Up through 2005, NASA was still using a computer language from 1973 specifically designed for their needs called HAL/S (or High-order Assembly Language/Shuttle).
|
||||
Although HAL/S is designed primarily for programming on-board computers, it is general enough for almost any application and is used widely across NASA’s projects.
|
||||
Newer projects, such as the International Space Station, operate on a programming language called ADA, developed in 1980 and accepted as an international standard programming language in 1995.
|
||||
""",
|
||||
"""
|
||||
In 1972, Steve Wozniak and Steve Jobs collaborated on an arcade game, Breakout, for Atari.
|
||||
In 2018, Apple Inc became the first US Trillion dollar company. There’s no doubt, there is big money to be had in coding. And by big money, we mean billions.
|
||||
The average salary of a data scientist is up to $100,000. Enjoy computer games? Markus Persson, a Swedish programmer, created and launched the computer game Minecraft in 2009.
|
||||
By 2014, Microsoft bought it for $2.5 billion.
|
||||
""",
|
||||
"""
|
||||
Computers operate on what is called a “binary code." All of the software that runs them is written using only 0’s and 1’s,
|
||||
and there are infinite combinations of these two digits. That’s why new software can be written all the time.
|
||||
""",
|
||||
"""
|
||||
As of the end of 2020, 70% of coding jobs are in career fields not connected with technology.
|
||||
Those who learn to code early and well will have a choice of many careers in almost every industry imaginable.
|
||||
""",
|
||||
"""
|
||||
The first-ever computer game made zero profit for its team of creators.
|
||||
The game, titled Spacewar, was built from the ground up by Steve Russel, a young computer programmer, and his passionate team of fellow developers.
|
||||
Incredibly, Steve and his team chose not to charge people to play Spacewar, and instead, happily shared their creation with anyone who wanted to try it out.
|
||||
"""
|
||||
};
|
||||
|
||||
strings = IntStream.rangeClosed(1, 25)
|
||||
.mapToObj(i -> "String " + i)
|
||||
.collect(FXCollectors.toList());
|
||||
|
||||
people = FXCollections.observableArrayList(
|
||||
Person.ofSplit("Turner Romero", " ").randomAge(),
|
||||
Person.ofSplit("Harley Hays", " ").randomAge(),
|
||||
Person.ofSplit("Jeffrey Cannon", " ").randomAge(),
|
||||
Person.ofSplit("Simeon Huang", " ").randomAge(),
|
||||
Person.ofSplit("Jennifer Donovan", " ").randomAge(),
|
||||
Person.ofSplit("Hezekiah Stout", " ").randomAge(),
|
||||
Person.ofSplit("Roberto Evans", " ").randomAge(),
|
||||
Person.ofSplit("Braxton Watts", " ").randomAge(),
|
||||
Person.ofSplit("Jayvon Wilkinson", " ").randomAge(),
|
||||
Person.ofSplit("Anabelle Chang", " ").randomAge(),
|
||||
Person.ofSplit("Abigayle Christensen", " ").randomAge(),
|
||||
Person.ofSplit("Fletcher May", " ").randomAge(),
|
||||
Person.ofSplit("Marisol Morris", " ").randomAge(),
|
||||
Person.ofSplit("Grant Wilson", " ").randomAge(),
|
||||
Person.ofSplit("Hayden Baldwin", " ").randomAge(),
|
||||
Person.ofSplit("Markus Davidson", " ").randomAge(),
|
||||
Person.ofSplit("Madelyn Farmer", " ").randomAge(),
|
||||
Person.ofSplit("Deandre Crosby", " ").randomAge(),
|
||||
Person.ofSplit("Casey Hardy", " ").randomAge(),
|
||||
Person.ofSplit("Carmelo Velazquez", " ").randomAge(),
|
||||
Person.ofSplit("Phillip Hays", " ").randomAge(),
|
||||
Person.ofSplit("Damari Mcfarland", " ").randomAge(),
|
||||
Person.ofSplit("Selina Norton", " ").randomAge(),
|
||||
Person.ofSplit("Lukas Vaughan", " ").randomAge(),
|
||||
Person.ofSplit("Charlie Carney", " ").randomAge()
|
||||
);
|
||||
|
||||
devices = FXCollections.observableArrayList(
|
||||
new Device(randomID(), "HP Gaming Laptop", "144.156.1.1", "Me", ONLINE),
|
||||
new Device(randomID(), "Own Gaming Desktop", "", "Me", OFFLINE),
|
||||
new Device(randomID(), "Pear fPhone X", "144.156.1.98", "Me", ONLINE),
|
||||
new Device(randomID(), "Alexa Echo Dot", "144.156.1.71", "Me", ONLINE),
|
||||
new Device(randomID(), "Surface Pro", "", "Wife", OFFLINE),
|
||||
new Device(randomID(), "Pear sPhone S", "144.156.1.70", "Wife", ONLINE),
|
||||
new Device(randomID(), "Chromebook", "", "Wife", OFFLINE),
|
||||
new Device(randomID(), "Wife Gaming Desktop", "144.156.1.69", "Wife", ONLINE),
|
||||
new Device(randomID(), "Chromecast", "", "", OFFLINE),
|
||||
new Device(randomID(), "Smart Dishwasher", "144.156.1.7", "", ONLINE),
|
||||
new Device(randomID(), "Samsung Smart TV", "", "", OFFLINE),
|
||||
new Device(randomID(), "Google Home Mini", "144.156.1.58", "", ONLINE),
|
||||
new Device(randomID(), "Roomba Killer 2000", "144.156.1.42", "", ONLINE),
|
||||
new Device(randomID(), "Smart WC", "144.156.1.99", "", ONLINE),
|
||||
new Device(randomID(), "Kids Gaming Desktop", "144.156.1.127", "Kids", ONLINE),
|
||||
new Device(randomID(), "Kids Gaming Laptop", "144.156.1.153", "Kids", ONLINE),
|
||||
new Device(randomID(), "XBox 360 No Scope Edition", "", "Kids", OFFLINE),
|
||||
new Device(randomID(), "PS5", "", "Kids", OFFLINE),
|
||||
new Device(randomID(), "PS6", "", "My cousin", OFFLINE),
|
||||
new Device(randomID(), "Smart Watch", "144.156.1.155", "Kids", ONLINE),
|
||||
new Device(randomID(), "Smart Watch", "144.156.1.154", "Kids", ONLINE),
|
||||
new Device(randomID(), "Kids' Smartphone", "144.156.1.221", "Kids", ONLINE),
|
||||
new Device(randomID(), "Kids Smartphone", "", "Kids", OFFLINE),
|
||||
new Device(randomID(), "Home Lights Controller", "144.156.1.91", "", ONLINE),
|
||||
new Device(randomID(), "WiFi Extender", "144.156.1.10", "", ONLINE)
|
||||
);
|
||||
}
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser 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.utils.RandomUtils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class Person {
|
||||
private final String name;
|
||||
private final String surname;
|
||||
private int age;
|
||||
|
||||
public Person(String name) {
|
||||
this.name = name;
|
||||
this.surname = "";
|
||||
}
|
||||
|
||||
public Person(String name, String surname) {
|
||||
this.name = name;
|
||||
this.surname = surname;
|
||||
}
|
||||
|
||||
public Person(String name, String surname, int age) {
|
||||
this.name = name;
|
||||
this.surname = surname;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public static Person ofSplit(String fullName, String split) {
|
||||
String[] fNameArray = fullName.split(split);
|
||||
return new Person(fNameArray[0], fNameArray[1]);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getSurname() {
|
||||
return surname;
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public Person randomAge() {
|
||||
setAge(RandomUtils.random.nextInt(18, 81));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Person person = (Person) o;
|
||||
return getName().equals(person.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getName());
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
module MaterialFX.Demo {
|
||||
requires MaterialFX;
|
||||
requires VirtualizedFX;
|
||||
|
||||
requires jdk.localedata;
|
||||
|
||||
requires javafx.controls;
|
||||
requires javafx.fxml;
|
||||
requires javafx.graphics;
|
||||
requires javafx.media;
|
||||
|
||||
requires fr.brouillard.oss.cssfx;
|
||||
requires org.kordamp.ikonli.javafx;
|
||||
requires org.kordamp.ikonli.fontawesome5;
|
||||
requires org.scenicview.scenicview;
|
||||
|
||||
opens io.github.palexdev.materialfx.demo;
|
||||
opens io.github.palexdev.materialfx.demo.controllers;
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../fonts/Fonts.css';
|
||||
@import 'Common.css';
|
||||
@import 'MFXColors.css';
|
||||
|
||||
.mfx-button {
|
||||
-fx-text-fill: -mfx-text-he;
|
||||
}
|
||||
|
||||
.mfx-button .mfx-ripple-generator {
|
||||
-mfx-ripple-radius: 40;
|
||||
-mfx-auto-clip: true;
|
||||
}
|
||||
|
||||
.mfx-button .text {
|
||||
-fx-font-smoothing-type: gray;
|
||||
}
|
||||
|
||||
#custom {
|
||||
-fx-background-color: -mfx-purple;
|
||||
-fx-text-fill: white
|
||||
}
|
||||
|
||||
.outline-button {
|
||||
-fx-background-color: transparent;
|
||||
-fx-border-color: -mfx-purple;
|
||||
-fx-border-radius: 3;
|
||||
|
||||
-fx-text-fill: -mfx-purple;
|
||||
}
|
||||
|
||||
.outline-button:hover,
|
||||
.outline-button:focused {
|
||||
-fx-background-color: -mfx-purple;
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
|
||||
.link-button {
|
||||
-fx-background-color: transparent;
|
||||
-fx-border-radius: 3;
|
||||
-fx-text-fill: #0096FF;
|
||||
-fx-underline: true;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
|
||||
.link-button:armed,
|
||||
.link-button:focused {
|
||||
-fx-border-color: #006BFF;
|
||||
-fx-text-fill: #006BFF;
|
||||
}
|
||||
|
||||
.link-button .mfx-ripple-generator {
|
||||
-mfx-ripple-color: #D9E9FF;
|
||||
}
|
@ -1,141 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../fonts/Fonts.css';
|
||||
@import 'Common.css';
|
||||
@import 'MFXColors.css';
|
||||
|
||||
|
||||
/**************************************************
|
||||
* Checkboxes
|
||||
**************************************************/
|
||||
.mfx-checkbox {
|
||||
-fx-text-fill: -mfx-text-he;
|
||||
}
|
||||
|
||||
.mfx-checkbox .text {
|
||||
-fx-font-smoothing-type: lcd;
|
||||
}
|
||||
|
||||
#customCheck {
|
||||
-mfx-main: -common-gradient;
|
||||
-mfx-gray: #5E0BA8;
|
||||
-fx-text-fill: #5E0BA8;
|
||||
}
|
||||
|
||||
#customCheck .box .mark {
|
||||
-mfx-description: "fas-check";
|
||||
}
|
||||
|
||||
#customCheck:indeterminate .box .mark {
|
||||
-mfx-description: "fas-minus";
|
||||
}
|
||||
|
||||
#customCheck .mfx-ripple-generator {
|
||||
-mfx-ripple-color: -common-gradient;
|
||||
-fx-opacity: 0.4;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* Radios
|
||||
**************************************************/
|
||||
.mfx-radio-button {
|
||||
-fx-text-fill: -mfx-text-he;
|
||||
}
|
||||
|
||||
.mfx-radio-button .text {
|
||||
-fx-font-smoothing-type: lcd;
|
||||
}
|
||||
|
||||
#customRadio {
|
||||
-mfx-main: -common-gradient;
|
||||
-mfx-gray: #5E0BA8;
|
||||
-fx-text-fill: #5E0BA8;
|
||||
}
|
||||
|
||||
#customRadio .mfx-ripple-generator {
|
||||
-mfx-ripple-color: -common-gradient;
|
||||
-fx-opacity: 0.5;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* Toggle Buttons
|
||||
**************************************************/
|
||||
.mfx-toggle-button {
|
||||
-fx-text-fill: -mfx-text-he;
|
||||
}
|
||||
|
||||
.mfx-toggle-button .text {
|
||||
-fx-font-smoothing-type: lcd;
|
||||
}
|
||||
|
||||
#customToggleButton {
|
||||
-mfx-main: -common-gradient;
|
||||
-mfx-secondary: #5E0BA8;
|
||||
-fx-text-fill: #5E0BA8;
|
||||
}
|
||||
|
||||
#customToggleButton .mfx-ripple-generator {
|
||||
-mfx-ripple-color: -common-gradient;
|
||||
-fx-opacity: 0.5;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* Toggle Nodes
|
||||
**************************************************/
|
||||
.mfx-circle-toggle-node {
|
||||
-fx-text-fill: -mfx-text-he;
|
||||
|
||||
}
|
||||
|
||||
.mfx-rectangle-toggle-node {
|
||||
-fx-text-fill: -mfx-text-he;
|
||||
-fx-min-height: 40;
|
||||
}
|
||||
|
||||
#customCircle,
|
||||
#customRectangle {
|
||||
-mfx-selected-color: -common-gradient;
|
||||
-mfx-selected-border-color: transparent;
|
||||
-fx-text-fill: #5E0BA8;
|
||||
}
|
||||
|
||||
#customCircle:selected .mfx-font-icon,
|
||||
#customRectangle:selected .mfx-font-icon {
|
||||
-mfx-color: white;
|
||||
}
|
||||
|
||||
#customCircle:selected .mfx-ripple-generator,
|
||||
#customRectangle:selected .mfx-ripple-generator {
|
||||
-mfx-paused: true;
|
||||
}
|
||||
|
||||
#customRectangle:selected {
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* Others
|
||||
**************************************************/
|
||||
.mfx-button {
|
||||
-fx-text-fill: -mfx-text-he;
|
||||
}
|
||||
|
||||
.mfx-button .text {
|
||||
-fx-font-smoothing-type: lcd;
|
||||
}
|
@ -1,114 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../fonts/Fonts.css';
|
||||
@import 'Common.css';
|
||||
@import 'MFXColors.css';
|
||||
|
||||
/**************************************************
|
||||
* Legacy Combos
|
||||
**************************************************/
|
||||
.mfx-legacy-combo-box {
|
||||
-fx-min-width: 120;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* New Combos
|
||||
**************************************************/
|
||||
.mfx-combo-box {
|
||||
-fx-min-width: 150;
|
||||
}
|
||||
|
||||
#customNCombo {
|
||||
-fx-border-color: transparent;
|
||||
-fx-border-radius: 0;
|
||||
-fx-background-color: -mfx-purple;
|
||||
-fx-background-radius: 30;
|
||||
-fx-text-fill: white;
|
||||
|
||||
-fx-padding: 3 3 3 6;
|
||||
-fx-background-insets: 0 0 0 -3;
|
||||
}
|
||||
|
||||
#customNCombo .floating-text {
|
||||
-fx-background-color: transparent;
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
#customNCombo .caret .mfx-font-icon {
|
||||
-mfx-color: white;
|
||||
}
|
||||
|
||||
#customNCombo .caret .mfx-ripple-generator {
|
||||
-mfx-ripple-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
#customNCombo2 {
|
||||
-fx-border-color: transparent transparent gray transparent;
|
||||
-fx-border-radius: 0;
|
||||
-fx-padding: 3 -3 0 3;
|
||||
}
|
||||
|
||||
#customNCombo2:focus-within {
|
||||
-fx-border-color: transparent transparent -common-gradient transparent;
|
||||
}
|
||||
|
||||
#customNCombo2:focus-within .caret .mfx-font-icon {
|
||||
-mfx-color: #ff5d53;
|
||||
}
|
||||
|
||||
#customNCombo2 .virtual-flow {
|
||||
-track-color: derive(#ff5d53, 90%);
|
||||
-thumb-color: derive(#ff5d53, 50%);
|
||||
-thumb-hover-color: derive(#ff5d53, 25%);
|
||||
}
|
||||
|
||||
#customNCombo2 .virtual-flow .mfx-combo-box-cell:hover {
|
||||
-fx-background-color: derive(#ff5d53, 90%);
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* Filter Combos
|
||||
**************************************************/
|
||||
#customFilter {
|
||||
-fx-border-color: transparent;
|
||||
-fx-border-radius: 0;
|
||||
-fx-background-color: #007BF6;
|
||||
-fx-text-fill: white;
|
||||
|
||||
-fx-padding: 4;
|
||||
-fx-background-insets: 0;
|
||||
}
|
||||
|
||||
#customFilter .text-field {
|
||||
-fx-prompt-text-fill: white;
|
||||
}
|
||||
|
||||
#customFilter .combo-popup .text-field {
|
||||
-fx-prompt-text-fill: -mfx-text-me;
|
||||
}
|
||||
|
||||
#customFilter .caret .mfx-font-icon {
|
||||
-mfx-color: #FF794B;
|
||||
-mfx-description: "fas-angle-down";
|
||||
-mfx-size: 16;
|
||||
}
|
||||
|
||||
#customFilter .caret .mfx-ripple-generator {
|
||||
-mfx-ripple-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../fonts/Fonts.css';
|
||||
@import 'MFXColors.css';
|
||||
|
||||
.header-label {
|
||||
-fx-font-family: 'Open Sans Bold';
|
||||
-fx-font-size: 14;
|
||||
-fx-text-fill: -mfx-text-he;
|
||||
}
|
||||
|
||||
.header-label .text {
|
||||
-fx-font-smoothing-type: lcd;
|
||||
}
|
||||
|
||||
.sub-header-label {
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
-fx-text-fill: -mfx-text-he;
|
||||
}
|
||||
|
||||
.sub-header-label .text {
|
||||
-fx-font-smoothing-type: lcd;
|
||||
}
|
||||
|
||||
.grid-pane {
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
.grid-background {
|
||||
-fx-background-color: white;
|
||||
-fx-background-radius: 10;
|
||||
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.2), 10, 0.12, -1.0, 2.0);
|
||||
}
|
@ -1,132 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../fonts/Fonts.css';
|
||||
@import 'MFXColors.css';
|
||||
|
||||
/**************************************************
|
||||
* Root
|
||||
**************************************************/
|
||||
.rootPane {
|
||||
-fx-background-color: white;
|
||||
-fx-background-radius: 10;
|
||||
-fx-border-color: #ebebeb;
|
||||
-fx-border-radius: 10;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* Window Header
|
||||
**************************************************/
|
||||
.rootPane .close-icon {
|
||||
-mfx-color: -mfx-red;
|
||||
-fx-opacity: 0.5;
|
||||
}
|
||||
|
||||
.rootPane .close-icon:hover {
|
||||
-fx-opacity: 1.0;
|
||||
}
|
||||
|
||||
.rootPane .minimize-icon {
|
||||
-mfx-color: #ffbf37;
|
||||
-fx-opacity: 0.5;
|
||||
}
|
||||
|
||||
.rootPane .minimize-icon:hover {
|
||||
-fx-opacity: 1.0;
|
||||
}
|
||||
|
||||
.rootPane .always-on-top-icon {
|
||||
-mfx-color: -mfx-purple;
|
||||
-fx-opacity: 0.5;
|
||||
}
|
||||
|
||||
.rootPane .always-on-top-icon:hover {
|
||||
-fx-opacity: 1.0;
|
||||
}
|
||||
|
||||
.rootPane .always-on-top-icon:always-on-top {
|
||||
-fx-opacity: 1.0;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* Sidebar
|
||||
**************************************************/
|
||||
.rootPane .sidebar {
|
||||
-fx-background-color: -mfx-purple;
|
||||
-fx-background-insets: -1 -5 -1 -1;
|
||||
-fx-background-radius: 0 20 20 0;
|
||||
}
|
||||
|
||||
.rootPane .sidebar .header {
|
||||
-fx-font-family: 'Open Sans ExtraBold';
|
||||
-fx-font-size: 24;
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
.rootPane .sidebar .header .mfx-font-icon {
|
||||
-mfx-color: white;
|
||||
}
|
||||
|
||||
.rootPane .sidebar .mfx-scroll-pane {
|
||||
-fx-background-color: transparent;
|
||||
|
||||
-track-color: rgba(255, 255, 255, 0.3);
|
||||
-thumb-color: white;
|
||||
-thumb-hover-color: white;
|
||||
}
|
||||
|
||||
.rootPane .sidebar .menu-label {
|
||||
-fx-font-family: 'Open Sans Bold';
|
||||
-fx-font-size: 14;
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
.rootPane .sidebar .navbar .mfx-rectangle-toggle-node {
|
||||
-fx-background-color: transparent;
|
||||
-fx-background-radius: 0;
|
||||
-fx-border-color: transparent;
|
||||
-fx-border-radius: 0;
|
||||
-fx-pref-height: 40;
|
||||
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
-fx-font-size: 13;
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
.rootPane .sidebar .navbar .mfx-rectangle-toggle-node .mfx-ripple-generator {
|
||||
-mfx-paused: true;
|
||||
}
|
||||
|
||||
.rootPane .sidebar .navbar .mfx-rectangle-toggle-node .mfx-icon-wrapper .mfx-font-icon {
|
||||
-mfx-color: white;
|
||||
}
|
||||
|
||||
.rootPane .sidebar .navbar .mfx-rectangle-toggle-node:selected {
|
||||
-fx-background-color: white;
|
||||
-fx-background-radius: 5;
|
||||
-fx-text-fill: #601cbe;
|
||||
}
|
||||
|
||||
.rootPane .sidebar .navbar .mfx-rectangle-toggle-node:selected .selection-rectangle {
|
||||
-fx-stroke: transparent;
|
||||
-fx-fill: #601cbe;
|
||||
}
|
||||
|
||||
.rootPane .sidebar .navbar .mfx-rectangle-toggle-node:selected .mfx-icon-wrapper .mfx-font-icon {
|
||||
-mfx-color: #601cbe;
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import 'MFXColors.css';
|
||||
|
||||
.notification {
|
||||
-fx-background-color: white;
|
||||
-fx-background-radius: 5;
|
||||
-fx-border-color: #ebebeb;
|
||||
-fx-border-radius: 5;
|
||||
}
|
||||
|
||||
.notification .label {
|
||||
-fx-font-family: 'Open Sans Bold';
|
||||
-fx-text-fill: -mfx-text-he;
|
||||
}
|
||||
|
||||
.notification .content {
|
||||
-fx-padding: 10;
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
}
|
||||
|
||||
.notification .mfx-button {
|
||||
-fx-min-height: 27;
|
||||
-fx-border-color: -mfx-purple;
|
||||
-fx-border-radius: 3;
|
||||
-fx-text-fill: -mfx-purple;
|
||||
}
|
||||
|
||||
.notification .mfx-button .mfx-ripple-generator {
|
||||
-mfx-auto-clip: true;
|
||||
-mfx-ripple-color: derive(#7a0ed9, 125%);
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
.mfx-table-view .virtual-flow .mfx-table-row:hover,
|
||||
.mfx-table-view .virtual-flow .mfx-table-row:selected {
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
.mfx-table-view .virtual-flow .mfx-table-row .mfx-ripple-generator {
|
||||
-mfx-paused: true;
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../fonts/Fonts.css';
|
||||
@import 'Common.css';
|
||||
@import 'MFXColors.css';
|
||||
|
||||
.mfx-list-view .virtual-flow .mfx-list-cell .data-label {
|
||||
-fx-font-family: 'Open Sans Regular';
|
||||
}
|
||||
|
||||
.mfx-list-view .virtual-flow .mfx-list-cell:selected .data-label {
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
}
|
||||
|
||||
.mfx-check-list-view .virtual-flow .mfx-check-list-cell .data-label {
|
||||
-fx-font-family: 'Open Sans Regular';
|
||||
}
|
||||
|
||||
.mfx-check-list-view .virtual-flow .mfx-check-list-cell:selected .data-label {
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
}
|
||||
|
||||
#custList {
|
||||
-fx-background-color: -mfx-purple;
|
||||
-fx-background-radius: 10;
|
||||
-fx-border-color: -mfx-purple;
|
||||
-fx-border-radius: 10;
|
||||
-fx-padding: 4;
|
||||
}
|
||||
|
||||
#custList .virtual-flow {
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
#custList:focused {
|
||||
-fx-border-color: -mfx-purple;
|
||||
}
|
||||
|
||||
#custList .virtual-flow .mfx-list-cell {
|
||||
-fx-background-color: transparent;
|
||||
-fx-border-color: transparent;
|
||||
-fx-background-radius: 10;
|
||||
-fx-border-radius: 10;
|
||||
}
|
||||
|
||||
#custList .virtual-flow .mfx-list-cell .data-label {
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
#custList .virtual-flow .mfx-list-cell .user-icon {
|
||||
-mfx-color: white;
|
||||
}
|
||||
|
||||
#custList .virtual-flow .mfx-list-cell:hover,
|
||||
#custList .virtual-flow .mfx-list-cell:selected {
|
||||
-fx-background-color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
#custList .virtual-flow .mfx-list-cell .mfx-ripple-generator {
|
||||
-mfx-auto-clip: true;
|
||||
}
|
||||
|
||||
#custList .virtual-flow .mfx-list-cell:selected .mfx-ripple-generator {
|
||||
-mfx-paused: true;
|
||||
}
|
||||
|
||||
.mfx-button {
|
||||
-fx-background-color: -mfx-purple;
|
||||
-fx-border-color: -mfx-purple;
|
||||
-fx-border-radius: 3;
|
||||
-fx-text-fill: white;
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
-fx-font-size: 14;
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
* {
|
||||
-mfx-blue: #2196f3;
|
||||
-mfx-charcoal: #445055;
|
||||
-mfx-green: #4caf50;
|
||||
-mfx-onyx: #353935;
|
||||
-mfx-orange: #ff9800;
|
||||
-mfx-purple: #7a0ed9;
|
||||
-mfx-red: #EF6E6B;
|
||||
-mfx-yellow: #FFEA00;
|
||||
|
||||
|
||||
-mfx-text-he: rgba(0, 0, 0, 0.87); /* High Emphasis */
|
||||
-mfx-text-me: rgba(0, 0, 0, 0.60); /* Medium Emphasis*/
|
||||
-mfx-text-disabled: rgba(0, 0, 0, 0.38); /* Disabled */
|
||||
|
||||
-common-gradient: linear-gradient(to right bottom, #c4008b, #d00085, #dc007f, #e60b79, #ef1872, #f5276b, #fa3564, #fe415e, #ff5158, #ff5f52, #ff6c4e, #ff794b);
|
||||
-secondary-gradient: linear-gradient(to right bottom, #1ec400, #00bd3a, #00b654, #00ae67, #00a574, #00a280, #009e8a, #009a91, #009b9d, #009ba8, #009bb2, #009abb);
|
||||
}
|
@ -1,133 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../fonts/Fonts.css';
|
||||
@import 'Common.css';
|
||||
@import 'MFXColors.css';
|
||||
|
||||
/**************************************************
|
||||
* Date Pickers
|
||||
**************************************************/
|
||||
#custDatePicker {
|
||||
-fx-background-color: #007BF6;
|
||||
-fx-border-color: transparent;
|
||||
-fx-border-radius: 0;
|
||||
|
||||
-fx-font-family: "Open Sans SemiBold";
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
#custDatePicker .floating-text {
|
||||
-fx-background-color: transparent;
|
||||
|
||||
-fx-font-family: "Open Sans SemiBold";
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
#custDatePicker .icon {
|
||||
-mfx-color: white;
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .content {
|
||||
-fx-background-color: #007BF6;
|
||||
-fx-border-color: transparent;
|
||||
-fx-border-radius: 0;
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .left-arrow:disabled,
|
||||
#custDatePicker .date-picker-popup .right-arrow:disabled {
|
||||
-fx-opacity: 0.8;
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .left-arrow .mfx-font-icon,
|
||||
#custDatePicker .date-picker-popup .right-arrow .mfx-font-icon {
|
||||
-mfx-color: white;
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .months-combo,
|
||||
#custDatePicker .date-picker-popup .years-combo {
|
||||
-fx-border-color: transparent;
|
||||
-fx-border-radius: 0;
|
||||
-fx-background-color: white;
|
||||
-fx-text-fill: -mfx-text-he;
|
||||
|
||||
-fx-padding: 4;
|
||||
-fx-background-insets: 0;
|
||||
-fx-font-family: "Open Sans SemiBold";
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .months-combo:focus-within,
|
||||
#custDatePicker .date-picker-popup .years-combo:focus-within {
|
||||
-fx-text-fill: #007BF6;
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .months-combo:focus-within .caret .mfx-font-icon,
|
||||
#custDatePicker .date-picker-popup .years-combo:focus-within .caret .mfx-font-icon {
|
||||
-mfx-color: #007BF6;
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .months-combo .virtual-flow,
|
||||
#custDatePicker .date-picker-popup .years-combo .virtual-flow {
|
||||
-track-color: derive(#007BF6, 100%);
|
||||
-thumb-color: derive(#007BF6, 70%);
|
||||
-thumb-hover-color: derive(#007BF6, 45%);
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .months-combo .virtual-flow .mfx-combo-box-cell,
|
||||
#custDatePicker .date-picker-popup .years-combo .virtual-flow .mfx-combo-box-cell {
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .months-combo .virtual-flow .mfx-combo-box-cell:selected .label,
|
||||
#custDatePicker .date-picker-popup .years-combo .virtual-flow .mfx-combo-box-cell:selected .label {
|
||||
-fx-text-fill: #007BF6;
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .months-combo .virtual-flow .mfx-combo-box-cell:hover,
|
||||
#custDatePicker .date-picker-popup .years-combo .virtual-flow .mfx-combo-box-cell:hover,
|
||||
#custDatePicker .date-picker-popup .months-combo .virtual-flow .mfx-combo-box-cell:selected,
|
||||
#custDatePicker .date-picker-popup .years-combo .virtual-flow .mfx-combo-box-cell:selected {
|
||||
-fx-background-color: derive(#007BF6, 130%);
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .week-day {
|
||||
-fx-font-family: 'Open Sans Bold';
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .mfx-date-cell {
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .mfx-date-cell:extra {
|
||||
-fx-text-fill: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .mfx-date-cell:current {
|
||||
-fx-background-color: transparent;
|
||||
-fx-border-color: white;
|
||||
-fx-border-width: 2;
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
}
|
||||
|
||||
#custDatePicker .date-picker-popup .mfx-date-cell:selected {
|
||||
-fx-background-color: white;
|
||||
-fx-font-family: 'Open Sans Bold';
|
||||
-fx-text-fill: #007BF6;
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../fonts/Fonts.css';
|
||||
@import 'Common.css';
|
||||
@import 'MFXColors.css';
|
||||
|
||||
/**************************************************
|
||||
* Progress Bars
|
||||
**************************************************/
|
||||
#customBar1 .bar1 {
|
||||
-fx-fill: -common-gradient;
|
||||
}
|
||||
|
||||
#customBar1 .bar2 {
|
||||
-fx-fill: -secondary-gradient;
|
||||
}
|
||||
|
||||
#customBar2 .track {
|
||||
-fx-fill: -mfx-purple;
|
||||
-fx-stroke: -mfx-purple;
|
||||
-fx-stroke-width: 2;
|
||||
}
|
||||
|
||||
#customBar2 .bar1,
|
||||
#customBar2 .bar2 {
|
||||
-fx-stroke: -mfx-purple;
|
||||
-fx-stroke-width: 1;
|
||||
-fx-fill: white;
|
||||
}
|
||||
|
||||
#determinateBar:range1 .bar1 {
|
||||
-fx-fill: -mfx-red;
|
||||
}
|
||||
|
||||
#determinateBar:range1 .track {
|
||||
-fx-fill: derive(-mfx-red, 85%)
|
||||
}
|
||||
|
||||
#determinateBar:range2 .bar1 {
|
||||
-fx-fill: -mfx-blue;
|
||||
}
|
||||
|
||||
#determinateBar:range2 .track {
|
||||
-fx-fill: derive(-mfx-blue, 85%)
|
||||
}
|
||||
|
||||
#determinateBar:range3 .bar1 {
|
||||
-fx-fill: -mfx-green;
|
||||
}
|
||||
|
||||
#determinateBar:range3 .track {
|
||||
-fx-fill: derive(-mfx-green, 85%);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************
|
||||
* Progress Spinners
|
||||
**************************************************/
|
||||
#customSpinner1 {
|
||||
-mfx-color1: #7A0ED9;
|
||||
-mfx-color2: #EB00A6;
|
||||
-mfx-color3: #FF1471;
|
||||
-mfx-color4: #FF7C4A;
|
||||
}
|
||||
|
||||
#customSpinner1 .track {
|
||||
-fx-stroke: #ebebeb;
|
||||
}
|
||||
|
||||
#determinateSpinner .text {
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
-fx-font-size: 18;
|
||||
-fx-fill: black;
|
||||
}
|
||||
|
||||
#determinateSpinner:range1 .arc {
|
||||
-fx-fill: #FF6088;
|
||||
}
|
||||
|
||||
#determinateSpinner:range2 .arc {
|
||||
-fx-fill: #00BCFF;
|
||||
}
|
||||
|
||||
#determinateSpinner:range3 .arc {
|
||||
-fx-fill: #1EC400;
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../fonts/Fonts.css';
|
||||
@import 'Common.css';
|
||||
@import 'MFXColors.css';
|
||||
|
||||
#customSlider:range1 .thumb,
|
||||
#customSlider:range1 .track {
|
||||
-mfx-color: -mfx-red;
|
||||
-fx-fill: derive(-mfx-red, 85%)
|
||||
}
|
||||
|
||||
#customSlider:range1 .bar {
|
||||
-fx-fill: -mfx-red;
|
||||
}
|
||||
|
||||
#customSlider:range2 .thumb,
|
||||
#customSlider:range2 .track {
|
||||
-mfx-color: -mfx-blue;
|
||||
-fx-fill: derive(-mfx-blue, 85%)
|
||||
}
|
||||
|
||||
#customSlider:range2 .bar {
|
||||
-fx-fill: -mfx-blue;
|
||||
}
|
||||
|
||||
#customSlider:range3 .bar,
|
||||
#customSlider:range3 .thumb {
|
||||
-mfx-color: -mfx-green;
|
||||
-fx-fill: -mfx-green;
|
||||
}
|
||||
|
||||
#customSlider:range3 .track {
|
||||
-fx-fill: derive(-mfx-green, 85%);
|
||||
}
|
||||
|
||||
#customSlider:range1 .thumb-container:hover .thumb-radius,
|
||||
#customSlider:range1 .thumb-container:pressed .thumb-radius {
|
||||
-mfx-color: derive(-mfx-red, 85%);
|
||||
-fx-opacity: 0.5;
|
||||
}
|
||||
|
||||
#customSlider:range2 .thumb-container:hover .thumb-radius,
|
||||
#customSlider:range2 .thumb-container:pressed .thumb-radius {
|
||||
-mfx-color: derive(-mfx-blue, 85%);
|
||||
-fx-opacity: 0.5;
|
||||
}
|
||||
|
||||
#customSlider:range3 .thumb-container:hover .thumb-radius,
|
||||
#customSlider:range3 .thumb-container:pressed .thumb-radius {
|
||||
-mfx-color: derive(-mfx-green, 70%);
|
||||
-fx-opacity: 0.5;
|
||||
}
|
||||
|
||||
#customSlider:range1 .thumb-container .mfx-ripple-generator {
|
||||
-mfx-ripple-color: -mfx-red;
|
||||
}
|
||||
|
||||
#customSlider:range2 .thumb-container .mfx-ripple-generator {
|
||||
-mfx-ripple-color: -mfx-blue;
|
||||
}
|
||||
|
||||
#customSlider:range3 .thumb-container .mfx-ripple-generator {
|
||||
-mfx-ripple-color: -mfx-green;
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../fonts/Fonts.css';
|
||||
@import 'Common.css';
|
||||
@import 'MFXColors.css';
|
||||
|
||||
.mfx-stepper .mfx-text-field {
|
||||
-mfx-float-mode: disabled;
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
-fx-pref-width: 200;
|
||||
}
|
||||
|
||||
.mfx-stepper .mfx-stepper-toggle .mfx-text-field {
|
||||
-fx-border-color: transparent;
|
||||
-fx-font-family: 'Visby Round CF Bold';
|
||||
-fx-pref-width: 1;
|
||||
}
|
||||
|
||||
.mfx-stepper .error-label {
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
-fx-text-fill: -mfx-red;
|
||||
}
|
||||
|
||||
.mfx-stepper .header-label {
|
||||
-fx-border-color: transparent;
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
}
|
||||
|
||||
.mfx-stepper .completed-label {
|
||||
-fx-border-color: transparent;
|
||||
-fx-font-family: 'Open Sans Bold';
|
||||
-fx-font-size: 24;
|
||||
-fx-alignment: center;
|
||||
-fx-text-fill: -mfx-green;
|
||||
}
|
||||
|
||||
.outline-button {
|
||||
-fx-background-color: transparent;
|
||||
-fx-border-color: -mfx-purple;
|
||||
-fx-border-radius: 3;
|
||||
|
||||
-fx-text-fill: -mfx-purple;
|
||||
}
|
||||
|
||||
.outline-button:hover,
|
||||
.outline-button:focused {
|
||||
-fx-background-color: -mfx-purple;
|
||||
-fx-text-fill: white;
|
||||
}
|
@ -1,86 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../fonts/Fonts.css';
|
||||
@import 'Common.css';
|
||||
@import 'MFXColors.css';
|
||||
|
||||
/**************************************************
|
||||
* Text Fields
|
||||
**************************************************/
|
||||
.mfx-text-field {
|
||||
-fx-min-width: 130;
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
}
|
||||
|
||||
.mfx-text-field .floating-text {
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
}
|
||||
|
||||
|
||||
#customField {
|
||||
-fx-border-color: -common-gradient;
|
||||
}
|
||||
|
||||
#customField .floating-text {
|
||||
-fx-text-fill: -mfx-red;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* Password Fields
|
||||
**************************************************/
|
||||
#customPassword {
|
||||
-fx-border-color: -secondary-gradient;
|
||||
}
|
||||
|
||||
#customPassword:masked {
|
||||
-fx-text-fill: -mfx-blue;
|
||||
}
|
||||
|
||||
#customPassword .mfx-font-icon {
|
||||
-mfx-color: -mfx-blue;
|
||||
}
|
||||
|
||||
#customPassword .mfx-context-menu .mfx-menu-item:disabled .mfx-font-icon {
|
||||
-mfx-color: #bcbcbc;
|
||||
}
|
||||
|
||||
#customPassword .floating-text {
|
||||
-fx-text-fill: -mfx-blue;
|
||||
}
|
||||
|
||||
#validatedField {
|
||||
-mfx-hide-character: '?';
|
||||
}
|
||||
|
||||
#validatedField:invalid {
|
||||
-fx-border-color: -mfx-red;
|
||||
}
|
||||
|
||||
#validatedField:invalid .floating-text {
|
||||
-fx-text-fill: -mfx-red;
|
||||
}
|
||||
|
||||
#validatedField:invalid .mfx-font-icon {
|
||||
-mfx-color: -mfx-red;
|
||||
}
|
||||
|
||||
#validationLabel {
|
||||
-fx-font-family: 'Open Sans SemiBold';
|
||||
-fx-font-size: 11;
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,101 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane alignment="CENTER" hgap="20.0" styleClass="grid-pane" stylesheets="@../css/Buttons.css" vgap="20.0"
|
||||
xmlns="http://javafx.com/javafx/17">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0" prefWidth="20.0"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER" prefWidth="100.0"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="20.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0"/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="30.0" right="30.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="3"
|
||||
GridPane.rowSpan="2">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Flat Buttons"
|
||||
GridPane.columnSpan="3"/>
|
||||
<MFXButton minHeight="27.0" minWidth="70.0" GridPane.rowIndex="1"/>
|
||||
<MFXButton id="custom" minHeight="27.0" minWidth="70.0" text="Custom" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="1"/>
|
||||
<MFXButton disable="true" minHeight="27.0" minWidth="70.0" text="Disabled" GridPane.columnIndex="2"
|
||||
GridPane.rowIndex="1"/>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="3"
|
||||
GridPane.rowIndex="3" GridPane.rowSpan="2">
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
styleClass="header-label" text="Raised Buttons" GridPane.columnSpan="3" GridPane.rowIndex="3"/>
|
||||
<MFXButton buttonType="RAISED" minHeight="27.0" minWidth="70.0" GridPane.rowIndex="4"/>
|
||||
<MFXButton id="custom" buttonType="RAISED" minHeight="27.0" minWidth="70.0" text="Custom" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="4"/>
|
||||
<MFXButton buttonType="RAISED" disable="true" minHeight="27.0" minWidth="70.0" text="Disabled"
|
||||
GridPane.columnIndex="2" GridPane.rowIndex="4"/>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnIndex="4"
|
||||
GridPane.columnSpan="3" GridPane.rowSpan="2">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Outlined Buttons"
|
||||
GridPane.columnIndex="4" GridPane.columnSpan="3"/>
|
||||
<MFXButton minHeight="27.0" minWidth="70.0" styleClass="outline-button" GridPane.columnIndex="4"
|
||||
GridPane.rowIndex="1"/>
|
||||
<MFXButton buttonType="RAISED" minHeight="27.0" minWidth="70.0" styleClass="outline-button" text="Button"
|
||||
GridPane.columnIndex="5" GridPane.rowIndex="1"/>
|
||||
<MFXButton disable="true" minHeight="27.0" minWidth="70.0" styleClass="outline-button" text="Disabled"
|
||||
GridPane.columnIndex="6" GridPane.rowIndex="1"/>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnIndex="4"
|
||||
GridPane.columnSpan="3" GridPane.rowIndex="3" GridPane.rowSpan="2">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label styleClass="header-label" text="Other Buttons" GridPane.columnIndex="5" GridPane.rowIndex="3"/>
|
||||
<MFXButton minHeight="27.0" minWidth="70.0" styleClass="link-button" text="Link Button" GridPane.columnIndex="5"
|
||||
GridPane.rowIndex="4"/>
|
||||
</GridPane>
|
@ -1,131 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.*?>
|
||||
<?import io.github.palexdev.mfxresources.fonts.MFXFontIcon?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane alignment="CENTER" hgap="20.0" styleClass="grid-pane" stylesheets="@../css/ChecksRadiosToggles.css"
|
||||
vgap="20.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.ChecksRadiosToggleController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0" prefWidth="20.0"/>
|
||||
<ColumnConstraints halignment="CENTER" prefWidth="150.0"/>
|
||||
<ColumnConstraints halignment="CENTER" prefWidth="150.0"/>
|
||||
<ColumnConstraints halignment="CENTER" prefWidth="150.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="20.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="30.0" right="30.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="3"
|
||||
GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Checkboxes"
|
||||
GridPane.columnSpan="3"/>
|
||||
<MFXCheckbox allowIndeterminate="true" text="Checkbox" GridPane.rowIndex="1"/>
|
||||
<MFXCheckbox id="customCheck" allowIndeterminate="true" text="Custom" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="1"/>
|
||||
<MFXCheckbox id="customCheck" allowIndeterminate="true" contentDisposition="TOP" gap="5.0" text="Custom"
|
||||
GridPane.columnIndex="2" GridPane.rowIndex="1"/>
|
||||
<MFXCheckbox disable="true" text="Disabled" GridPane.rowIndex="2"/>
|
||||
<MFXCheckbox disable="true" selected="true" text="Disabled" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||
<MFXCheckbox allowIndeterminate="true" disable="true" indeterminate="true" text="Disabled" GridPane.columnIndex="2"
|
||||
GridPane.rowIndex="2"/>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="3"
|
||||
GridPane.rowIndex="4" GridPane.rowSpan="3">
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
styleClass="header-label" text="Radio Buttons" GridPane.columnSpan="3" GridPane.rowIndex="4"/>
|
||||
<MFXRadioButton text="Radio" GridPane.rowIndex="5"/>
|
||||
<MFXRadioButton id="customRadio" text="Custom" GridPane.columnIndex="1" GridPane.rowIndex="5"/>
|
||||
<MFXRadioButton id="customRadio" contentDisposition="TOP" gap="5.0" radioGap="5.0" radius="10.0" text="Custom"
|
||||
GridPane.columnIndex="2" GridPane.rowIndex="5"/>
|
||||
<MFXRadioButton disable="true" text="Disabled" GridPane.rowIndex="6"/>
|
||||
<MFXRadioButton disable="true" selected="true" text="Disabled" GridPane.columnIndex="1" GridPane.rowIndex="6"/>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnIndex="4"
|
||||
GridPane.columnSpan="3" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Toggle Buttons"
|
||||
GridPane.columnIndex="4" GridPane.columnSpan="3"/>
|
||||
<MFXToggleButton text="Switch" GridPane.columnIndex="4" GridPane.rowIndex="1"/>
|
||||
<MFXToggleButton id="customToggleButton" text="Custom" GridPane.columnIndex="5" GridPane.rowIndex="1"/>
|
||||
<MFXToggleButton id="customToggleButton" fx:id="customToggle" contentDisposition="TOP" gap="5.0" length="50.0"
|
||||
radius="12.0" text="Custom" GridPane.columnIndex="6" GridPane.rowIndex="1"/>
|
||||
<MFXToggleButton disable="true" text="Disabled" GridPane.columnIndex="4" GridPane.rowIndex="2"/>
|
||||
<MFXToggleButton disable="true" selected="true" text="Disabled" GridPane.columnIndex="5" GridPane.rowIndex="2"/>
|
||||
<MFXButton buttonType="RAISED" depthLevel="LEVEL1" minHeight="27.0" onAction="#changeColors" text="Random Colors"
|
||||
GridPane.columnIndex="6" GridPane.rowIndex="2"/>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnIndex="4"
|
||||
GridPane.columnSpan="3" GridPane.rowIndex="4" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label styleClass="header-label" text="Toggle Nodes" GridPane.columnIndex="5" GridPane.rowIndex="4"/>
|
||||
<MFXCircleToggleNode text="Circle Toggle" GridPane.columnIndex="4" GridPane.rowIndex="5">
|
||||
<graphic>
|
||||
<MFXFontIcon description="fas-bell" size="32.0"/>
|
||||
</graphic>
|
||||
</MFXCircleToggleNode>
|
||||
<MFXCircleToggleNode id="customCircle" text="Custom" textPosition="TOP" GridPane.columnIndex="5"
|
||||
GridPane.rowIndex="5">
|
||||
<graphic>
|
||||
<MFXFontIcon description="fas-gear" size="32.0"/>
|
||||
</graphic>
|
||||
</MFXCircleToggleNode>
|
||||
<MFXCircleToggleNode disable="true" selected="true" text="Disabled" GridPane.columnIndex="6" GridPane.rowIndex="5">
|
||||
<graphic>
|
||||
<MFXFontIcon description="fas-eye" size="32.0"/>
|
||||
</graphic>
|
||||
</MFXCircleToggleNode>
|
||||
<MFXRectangleToggleNode fx:id="r1" text="Rectangle Toggle" GridPane.columnIndex="4" GridPane.rowIndex="6"/>
|
||||
<MFXRectangleToggleNode id="customRectangle" fx:id="r2" text="Custom" GridPane.columnIndex="5"
|
||||
GridPane.rowIndex="6"/>
|
||||
<MFXRectangleToggleNode fx:id="r3" disable="true" selected="true" text="Disabled" GridPane.columnIndex="6"
|
||||
GridPane.rowIndex="6"/>
|
||||
</GridPane>
|
@ -1,98 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.legacy.MFXLegacyComboBox?>
|
||||
<?import io.github.palexdev.materialfx.controls.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane alignment="CENTER" hgap="20.0" styleClass="grid-pane" stylesheets="@../css/ComboBoxes.css" vgap="20.0"
|
||||
xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.ComboBoxesController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0" prefWidth="20.0"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="10.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="30.0" right="30.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="3"
|
||||
GridPane.rowSpan="3">
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
styleClass="header-label" text="New Combos" GridPane.columnSpan="3"/>
|
||||
<MFXComboBox fx:id="nCombo" floatingText="Combo" GridPane.rowIndex="1"/>
|
||||
<MFXComboBox id="customNCombo" fx:id="nCustCombo" floatingText="Custom" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="1"/>
|
||||
<MFXComboBox fx:id="nEditCombo" allowEdit="true" floatingText="Editable" scrollOnOpen="true" selectable="true"
|
||||
GridPane.columnIndex="2" GridPane.rowIndex="1"/>
|
||||
<MFXComboBox fx:id="nBFCombo" floatMode="BORDER" floatingText="Border Float" GridPane.rowIndex="2"/>
|
||||
<MFXComboBox id="customNCombo2" fx:id="nNFCombo" floatMode="DISABLED" promptText="No Float Custom"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||
<MFXComboBox disable="true" floatMode="DISABLED" promptText="Disabled" GridPane.columnIndex="2"
|
||||
GridPane.rowIndex="2"/>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="3"
|
||||
GridPane.rowIndex="4" GridPane.rowSpan="2">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Legacy Combos"
|
||||
GridPane.columnSpan="3" GridPane.rowIndex="4"/>
|
||||
<MFXLegacyComboBox fx:id="lCombo" promptText="Combo" GridPane.rowIndex="5"/>
|
||||
<MFXLegacyComboBox id="customLCombo" fx:id="lCustCombo" promptText="Custom" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="5"/>
|
||||
<MFXLegacyComboBox disable="true" promptText="Disabled" GridPane.columnIndex="2" GridPane.rowIndex="5"/>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnIndex="4"
|
||||
GridPane.columnSpan="2" GridPane.rowSpan="3">
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
styleClass="header-label" text="Filter Combos" GridPane.columnIndex="4" GridPane.columnSpan="2"/>
|
||||
<MFXFilterComboBox fx:id="filterCombo" floatingText="Filter" GridPane.columnIndex="4" GridPane.rowIndex="1"/>
|
||||
<MFXFilterComboBox id="customFilter" fx:id="custFilterCombo" floatMode="DISABLED" promptText="Custom"
|
||||
GridPane.columnIndex="5" GridPane.rowIndex="1"/>
|
||||
</GridPane>
|
@ -1,66 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
--><?import io.github.palexdev.materialfx.controls.MFXScrollPane?>
|
||||
<?import io.github.palexdev.mfxresources.fonts.MFXFontIcon?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<AnchorPane fx:id="rootPane" prefHeight="720.0" prefWidth="1280.0" styleClass="rootPane" stylesheets="@../css/Demo.css"
|
||||
xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.DemoController">
|
||||
<HBox fx:id="windowHeader" alignment="CENTER_RIGHT" layoutY="6.0" prefHeight="50.0" prefWidth="1281.0"
|
||||
spacing="10.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<padding>
|
||||
<Insets right="10.0"/>
|
||||
</padding>
|
||||
<MFXFontIcon fx:id="alwaysOnTopIcon" description="fas-circle" size="15.0" styleClass="always-on-top-icon"/>
|
||||
<MFXFontIcon fx:id="minimizeIcon" description="fas-circle" size="15.0" styleClass="minimize-icon"/>
|
||||
<MFXFontIcon fx:id="closeIcon" description="fas-circle" size="15.0" styleClass="close-icon"/>
|
||||
</HBox>
|
||||
<VBox layoutX="227.0" layoutY="51.0" prefWidth="250.0" styleClass="sidebar" AnchorPane.bottomAnchor="0.0"
|
||||
AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" top="60.0"/>
|
||||
</padding>
|
||||
<Label graphicTextGap="15.0" styleClass="header" text="MaterialFX">
|
||||
<graphic>
|
||||
<StackPane fx:id="logoContainer"/>
|
||||
</graphic>
|
||||
</Label>
|
||||
<Label styleClass="menu-label" text="Components">
|
||||
<VBox.margin>
|
||||
<Insets left="5.0" top="40.0"/>
|
||||
</VBox.margin>
|
||||
</Label>
|
||||
<MFXScrollPane fx:id="scrollPane" fitToWidth="true" hbarPolicy="NEVER" VBox.vgrow="ALWAYS">
|
||||
<VBox.margin>
|
||||
<Insets bottom="10.0" left="5.0" top="15.0"/>
|
||||
</VBox.margin>
|
||||
<padding>
|
||||
<Insets right="10.0"/>
|
||||
</padding>
|
||||
<VBox fx:id="navBar" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" spacing="5.0"
|
||||
styleClass="navbar"/>
|
||||
</MFXScrollPane>
|
||||
</VBox>
|
||||
<StackPane fx:id="contentPane" layoutX="252.0" layoutY="52.0" prefHeight="150.0" prefWidth="200.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="252.0" AnchorPane.rightAnchor="10.0"
|
||||
AnchorPane.topAnchor="51.0"/>
|
||||
</AnchorPane>
|
@ -1,58 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.MFXButton?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane fx:id="grid" hgap="20.0" maxHeight="-Infinity" maxWidth="-Infinity" styleClass="grid-pane"
|
||||
stylesheets="@../css/Buttons.css" vgap="20.0" xmlns="http://javafx.com/javafx/17"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.DialogsController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="30.0" right="30.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="3"
|
||||
GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Dialogs"
|
||||
GridPane.columnSpan="3"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#openInfo" styleClass="outline-button" text="Info"
|
||||
GridPane.rowIndex="1"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#openWarning" styleClass="outline-button" text="Warning"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#openError" styleClass="outline-button" text="Error"
|
||||
GridPane.columnIndex="2" GridPane.rowIndex="1"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#openGeneric" styleClass="outline-button" text="Generic"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||
</GridPane>
|
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.MFXTableView?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.effect.DropShadow?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.paint.Color?>
|
||||
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0"
|
||||
prefWidth="900.0" spacing="10.0" style="-fx-background-color: white; -fx-background-radius: 10;"
|
||||
stylesheets="@../css/Common.css" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.FontResourcesController">
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="10.0"/>
|
||||
</padding>
|
||||
<effect>
|
||||
<DropShadow blurType="GAUSSIAN" offsetX="-1.0" offsetY="2.0" spread="0.12">
|
||||
<color>
|
||||
<Color opacity="0.20000000298023224"/>
|
||||
</color>
|
||||
</DropShadow>
|
||||
</effect>
|
||||
<Label fx:id="header" alignment="CENTER" maxWidth="1.7976931348623157E308" minHeight="32.0"
|
||||
styleClass="header-label" text="MaterialFX Font Resources"/>
|
||||
<MFXTableView fx:id="tableView" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
stylesheets="@../css/FontResources.css" VBox.vgrow="ALWAYS"/>
|
||||
</VBox>
|
@ -1,100 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane hgap="20.0" maxHeight="-Infinity" maxWidth="-Infinity" styleClass="grid-pane"
|
||||
stylesheets="@../css/ListViews.css" vgap="20.0" xmlns="http://javafx.com/javafx/17"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.ListViewsController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0" prefWidth="20.0"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="40.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="40.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="30.0" right="30.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="3"
|
||||
GridPane.rowSpan="2147483647">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Lists"
|
||||
GridPane.columnSpan="3"/>
|
||||
<Label styleClass="sub-header-label" text="Default" GridPane.rowIndex="1"/>
|
||||
<MFXListView fx:id="list" prefWidth="170.0" GridPane.rowIndex="2" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0"/>
|
||||
</GridPane.margin>
|
||||
</MFXListView>
|
||||
<Label styleClass="sub-header-label" text="Custom" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
<MFXListView id="custList" fx:id="custList" prefWidth="170.0" GridPane.columnIndex="1" GridPane.rowIndex="2"
|
||||
GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0"/>
|
||||
</GridPane.margin>
|
||||
</MFXListView>
|
||||
<Label styleClass="sub-header-label" text="Check List" GridPane.columnIndex="2" GridPane.rowIndex="1"/>
|
||||
<MFXCheckListView fx:id="checkList" prefWidth="170.0" GridPane.columnIndex="2" GridPane.rowIndex="2"
|
||||
GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0"/>
|
||||
</GridPane.margin>
|
||||
</MFXCheckListView>
|
||||
<MFXButton minHeight="32.0" onAction="#changeColors" text="Change Scrollbar Colors" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="5">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="20.0"/>
|
||||
</GridPane.margin>
|
||||
</MFXButton>
|
||||
<StackPane prefHeight="150.0" prefWidth="200.0" styleClass="grid-background" GridPane.columnIndex="4"
|
||||
GridPane.rowSpan="2147483647">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label styleClass="header-label" text="Legacy" GridPane.columnIndex="4"/>
|
||||
<MFXListView fx:id="legacyList" prefWidth="170.0" GridPane.columnIndex="4" GridPane.rowIndex="2"
|
||||
GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="15.0"/>
|
||||
</GridPane.margin>
|
||||
</MFXListView>
|
||||
<MFXButton minHeight="32.0" onAction="#changeDepth" text="3D/2D" GridPane.columnIndex="1" GridPane.rowIndex="6">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="20.0"/>
|
||||
</GridPane.margin>
|
||||
</MFXButton>
|
||||
</GridPane>
|
@ -1,86 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane hgap="20.0" maxHeight="-Infinity" maxWidth="-Infinity" styleClass="grid-pane"
|
||||
stylesheets="@../css/Buttons.css" vgap="20.0" xmlns="http://javafx.com/javafx/17"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.NotificationsController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="30.0" right="30.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="3"
|
||||
GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Notifications"
|
||||
GridPane.columnSpan="3"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#showTopLeft" styleClass="outline-button" text="Show Top Left"
|
||||
GridPane.rowIndex="1"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#showTopCenter" styleClass="outline-button"
|
||||
text="Show Top Center" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#showTopRight" styleClass="outline-button"
|
||||
text="Show Top Right" GridPane.columnIndex="2" GridPane.rowIndex="1"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#showBottomLeft" styleClass="outline-button"
|
||||
text="Show Bottom Left" GridPane.rowIndex="2"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#showBottomCenter" styleClass="outline-button"
|
||||
text="Show Bottom Center" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#showBottomRight" styleClass="outline-button"
|
||||
text="Show Bottom Right" GridPane.columnIndex="2" GridPane.rowIndex="2"/>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="3"
|
||||
GridPane.rowIndex="4" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Notification Center"
|
||||
GridPane.columnSpan="3" GridPane.rowIndex="4"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#showTopLeftNC" styleClass="outline-button"
|
||||
text="Show Top Left" GridPane.rowIndex="5"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#showTopCenterNC" styleClass="outline-button"
|
||||
text="Show Top Center" GridPane.columnIndex="1" GridPane.rowIndex="5"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#showTopRightNC" styleClass="outline-button"
|
||||
text="Show Top Right" GridPane.columnIndex="2" GridPane.rowIndex="5"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#showBottomLeftNC" styleClass="outline-button"
|
||||
text="Show Bottom Left" GridPane.rowIndex="6"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#showBottomCenterNC" styleClass="outline-button"
|
||||
text="Show Bottom Center" GridPane.columnIndex="1" GridPane.rowIndex="6"/>
|
||||
<MFXButton minHeight="28.0" minWidth="90.0" onAction="#showBottomRightNC" styleClass="outline-button"
|
||||
text="Show Bottom Right" GridPane.columnIndex="2" GridPane.rowIndex="6"/>
|
||||
</GridPane>
|
@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.MFXDatePicker?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane alignment="CENTER" hgap="20.0" styleClass="grid-pane" stylesheets="@../css/Pickers.css" vgap="20.0"
|
||||
xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.PickersController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
<RowConstraints/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="30.0" right="30.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="3"
|
||||
GridPane.rowSpan="3">
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
styleClass="header-label" text="Date Pickers" GridPane.columnSpan="3"/>
|
||||
<MFXDatePicker promptText="Pick a date..." GridPane.rowIndex="1"/>
|
||||
<MFXDatePicker id="custDatePicker" fx:id="custDatePicker" closePopupOnChange="false" floatMode="INLINE"
|
||||
floatingText="Custom" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
<MFXDatePicker disable="true" promptText="Disabled" GridPane.columnIndex="2" GridPane.rowIndex="1"/>
|
||||
</GridPane>
|
@ -1,92 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane alignment="CENTER" hgap="20.0" styleClass="grid-pane" stylesheets="@../css/Progress.css" vgap="20.0"
|
||||
xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.ProgressController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="LEFT" prefWidth="90.0"/>
|
||||
<ColumnConstraints halignment="CENTER" prefWidth="64.0"/>
|
||||
<ColumnConstraints halignment="CENTER" prefWidth="64.0"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0" prefWidth="64.0"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0" prefWidth="20.0"/>
|
||||
<ColumnConstraints halignment="LEFT" minWidth="10.0" prefWidth="90.0"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0" prefWidth="100.0"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0" prefWidth="100.0"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0" prefWidth="100.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
<RowConstraints prefHeight="64.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="70.0"/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="30.0" right="30.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane minHeight="150.0" minWidth="146.0" prefHeight="372.0" prefWidth="146.0" styleClass="grid-background"
|
||||
GridPane.columnSpan="4" GridPane.rowSpan="2147483647">
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
styleClass="header-label" text="Progress Bars" GridPane.columnSpan="4"/>
|
||||
<Label styleClass="sub-header-label" text="Default" GridPane.rowIndex="1"/>
|
||||
<MFXProgressBar GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.rowIndex="1"/>
|
||||
<Label styleClass="sub-header-label" text="Determinate" GridPane.rowIndex="2"/>
|
||||
<MFXProgressBar id="determinateBar" fx:id="determinateBar" progress="0.0" GridPane.columnIndex="1"
|
||||
GridPane.columnSpan="3" GridPane.rowIndex="2"/>
|
||||
<Label styleClass="sub-header-label" text="Custom 1" GridPane.rowIndex="3"/>
|
||||
<MFXProgressBar id="customBar1" GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.rowIndex="3"/>
|
||||
<Label styleClass="sub-header-label" text="Custom 2" GridPane.rowIndex="4"/>
|
||||
<MFXProgressBar id="customBar2" minHeight="8.0" GridPane.columnIndex="1" GridPane.columnSpan="3"
|
||||
GridPane.rowIndex="4"/>
|
||||
<Label styleClass="sub-header-label" text="Disabled" GridPane.rowIndex="5"/>
|
||||
<MFXProgressBar disable="true" GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.rowIndex="5"/>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnIndex="5"
|
||||
GridPane.columnSpan="4" GridPane.rowSpan="2147483647">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Progress Spinners"
|
||||
GridPane.columnIndex="5" GridPane.columnSpan="4"/>
|
||||
<Label styleClass="sub-header-label" text="Default" GridPane.columnIndex="5" GridPane.rowIndex="1"/>
|
||||
<MFXProgressSpinner radius="24.0" GridPane.columnIndex="6" GridPane.rowIndex="1"/>
|
||||
<Label styleClass="sub-header-label" text="Determinate" GridPane.columnIndex="5" GridPane.rowIndex="2"/>
|
||||
<MFXProgressSpinner id="determinateSpinner" fx:id="determinateSpinner" progress="0.0" radius="24.0"
|
||||
GridPane.columnIndex="7" GridPane.rowIndex="2"/>
|
||||
<Label styleClass="sub-header-label" text="Custom 1" GridPane.columnIndex="5" GridPane.rowIndex="3"/>
|
||||
<MFXProgressSpinner id="customSpinner1" radius="24.0" GridPane.columnIndex="6" GridPane.rowIndex="3"/>
|
||||
<Label styleClass="sub-header-label" text="Custom 2" GridPane.columnIndex="5" GridPane.rowIndex="4"/>
|
||||
<MFXProgressSpinner id="customSpinner2" radius="24.0" GridPane.columnIndex="7" GridPane.rowIndex="4"/>
|
||||
<Label styleClass="sub-header-label" text="Disabled" GridPane.columnIndex="5" GridPane.rowIndex="5"/>
|
||||
<MFXProgressSpinner disable="true" radius="24.0" GridPane.columnIndex="6" GridPane.rowIndex="5"/>
|
||||
</GridPane>
|
@ -1,58 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane hgap="30.0" maxHeight="-Infinity" maxWidth="-Infinity" styleClass="grid-pane"
|
||||
stylesheets="@../css/Buttons.css" vgap="20.0" xmlns="http://javafx.com/javafx/17"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.ScrollPanesController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="30.0" right="30.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="2"
|
||||
GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Scroll Panes"
|
||||
GridPane.columnSpan="2"/>
|
||||
<MFXScrollPane fx:id="scroll1" fitToWidth="true" maxHeight="-Infinity" maxWidth="-Infinity" minWidth="-Infinity"
|
||||
prefHeight="150.0" prefWidth="250.0" GridPane.rowIndex="1"/>
|
||||
<MFXScrollPane fx:id="scroll2" maxHeight="-Infinity" maxWidth="-Infinity" minWidth="-Infinity" prefHeight="150.0"
|
||||
prefWidth="250.0" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
<HBox alignment="CENTER" spacing="10.0" GridPane.columnSpan="2" GridPane.rowIndex="2">
|
||||
<MFXButton onAction="#setRandomTrackColor" styleClass="outline-button" text="Random Track Color"/>
|
||||
<MFXButton onAction="#setRandomThumbColor" styleClass="outline-button" text="Random Thumb Color"/>
|
||||
<MFXButton onAction="#setRandomThumbHoverColor" styleClass="outline-button" text="Random Thumb Hover Color"/>
|
||||
</HBox>
|
||||
</GridPane>
|
@ -1,80 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane alignment="CENTER" hgap="20.0" styleClass="grid-pane" stylesheets="@../css/Sliders.css" vgap="20.0"
|
||||
xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.SlidersController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="LEFT" minWidth="10.0"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER" prefWidth="20.0"/>
|
||||
<ColumnConstraints halignment="LEFT"/>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0"/>
|
||||
<RowConstraints prefHeight="64.0"/>
|
||||
<RowConstraints prefHeight="64.0"/>
|
||||
<RowConstraints prefHeight="64.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="200.0"/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="30.0" right="30.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="2147483647"
|
||||
GridPane.rowSpan="2147483647">
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
styleClass="header-label" text="Sliders" GridPane.columnSpan="2147483647"/>
|
||||
<Label styleClass="sub-header-label" text="Default" GridPane.rowIndex="1"/>
|
||||
<MFXSlider prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
<Label styleClass="sub-header-label" text="Custom" GridPane.rowIndex="2"/>
|
||||
<MFXSlider id="customSlider" fx:id="customSlider" popupSide="OTHER_SIDE" prefWidth="150.0" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="2"/>
|
||||
<MFXSlider disable="true" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
|
||||
<Label styleClass="sub-header-label" text="Disabled" GridPane.rowIndex="3"/>
|
||||
<Label styleClass="sub-header-label" text="Bidirectional" GridPane.columnIndex="3" GridPane.rowIndex="1"/>
|
||||
<MFXSlider min="-100.0" prefWidth="150.0" GridPane.columnIndex="4" GridPane.rowIndex="1"/>
|
||||
<Label styleClass="sub-header-label" text="Ticks" GridPane.columnIndex="3" GridPane.rowIndex="2"/>
|
||||
<MFXSlider minorTicksCount="4" prefWidth="150.0" showMajorTicks="true" showMinorTicks="true"
|
||||
sliderMode="SNAP_TO_TICKS" tickUnit="20.0" GridPane.columnIndex="4" GridPane.rowIndex="2"/>
|
||||
<Label styleClass="sub-header-label" text="Decimal Precision to 2" GridPane.columnIndex="3" GridPane.rowIndex="3"/>
|
||||
<MFXSlider decimalPrecision="2" prefWidth="150.0" GridPane.columnIndex="4" GridPane.rowIndex="3"/>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Vertical Sliders"
|
||||
GridPane.columnSpan="2147483647" GridPane.rowIndex="4"/>
|
||||
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" spacing="20.0" GridPane.columnSpan="2147483647"
|
||||
GridPane.rowIndex="5" GridPane.rowSpan="2147483647">
|
||||
<MFXSlider orientation="VERTICAL" prefWidth="150.0"/>
|
||||
<MFXSlider min="-100.0" minorTicksCount="4" orientation="VERTICAL" popupSide="OTHER_SIDE" prefWidth="150.0"
|
||||
showMajorTicks="true" showMinorTicks="true" sliderMode="SNAP_TO_TICKS"/>
|
||||
<MFXSlider disable="true" orientation="VERTICAL" prefWidth="150.0"/>
|
||||
</HBox>
|
||||
</GridPane>
|
@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.MFXButton?>
|
||||
<?import io.github.palexdev.materialfx.controls.MFXStepper?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" stylesheets="@../css/Stepper.css"
|
||||
xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.StepperController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="40.0" valignment="CENTER" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane styleClass="grid-background" GridPane.rowSpan="2147483647">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-15.0" left="-15.0" right="-15.0" top="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Stepper"/>
|
||||
<MFXButton fx:id="unlock" styleClass="outline-button" text="Unlock Mouse" GridPane.rowIndex="1"/>
|
||||
<MFXStepper fx:id="stepper" minHeight="450.0" prefHeight="450.0" prefWidth="600.0" GridPane.rowIndex="2"/>
|
||||
</GridPane>
|
@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.MFXPaginatedTableView?>
|
||||
<?import io.github.palexdev.materialfx.controls.MFXTableView?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane alignment="TOP_CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
styleClass="grid-pane" stylesheets="@../css/Common.css" vgap="10.0" xmlns="http://javafx.com/javafx/17"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.TableViewsController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER" minWidth="10.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="30.0" right="30.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="2147483647"
|
||||
GridPane.rowSpan="2147483647">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-15.0" left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxWidth="1.7976931348623157E308" styleClass="header-label" text="Label"
|
||||
GridPane.columnSpan="2147483647">
|
||||
<GridPane.margin>
|
||||
<Insets/>
|
||||
</GridPane.margin>
|
||||
<padding>
|
||||
<Insets bottom="10.0" top="10.0"/>
|
||||
</padding>
|
||||
</Label>
|
||||
<MFXTableView fx:id="table" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="300.0"
|
||||
prefWidth="800.0" GridPane.columnSpan="2147483647" GridPane.rowIndex="1"/>
|
||||
<MFXPaginatedTableView fx:id="paginated" maxWidth="-Infinity" minWidth="-Infinity" prefWidth="800.0"
|
||||
GridPane.columnSpan="2147483647" GridPane.rowIndex="2"/>
|
||||
</GridPane>
|
@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2022 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 Lesser 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 Lesser General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Lesser General Public License
|
||||
~ along with MaterialFX. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import io.github.palexdev.materialfx.controls.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane alignment="CENTER" hgap="20.0" styleClass="grid-pane" stylesheets="@../css/TextFields.css" vgap="20.0"
|
||||
xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.github.palexdev.materialfx.demo.controllers.TextFieldsController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
<ColumnConstraints halignment="CENTER"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="64.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="10.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="32.0"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="150.0" valignment="BASELINE"/>
|
||||
</rowConstraints>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="30.0" right="30.0" top="20.0"/>
|
||||
</padding>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="2147483647"
|
||||
GridPane.rowSpan="3">
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-7.0" left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
styleClass="header-label" text="Text Fields and Password Fields" GridPane.columnSpan="2147483647"/>
|
||||
<MFXTextField floatingText="Inline Mode" GridPane.rowIndex="1"/>
|
||||
<MFXTextField floatMode="BORDER" floatingText="Border Mode" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
<MFXTextField borderGap="2.0" floatMode="ABOVE" floatingText="Above Mode" GridPane.columnIndex="2"
|
||||
GridPane.rowIndex="1"/>
|
||||
<MFXTextField floatMode="DISABLED" promptText="No Floating Text" GridPane.columnIndex="3" GridPane.rowIndex="1"/>
|
||||
<MFXTextField disable="true" floatingText="Disabled" text="Text" GridPane.columnIndex="5" GridPane.rowIndex="1"/>
|
||||
<MFXTextField id="customField" floatingText="Custom" promptText="Prompt Text" GridPane.columnIndex="4"
|
||||
GridPane.rowIndex="1"/>
|
||||
<MFXPasswordField floatingText="Inline Mode" GridPane.rowIndex="2"/>
|
||||
<MFXPasswordField floatMode="BORDER" floatingText="Border Mode" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||
<MFXPasswordField borderGap="2.0" floatMode="ABOVE" floatingText="Above Mode" GridPane.columnIndex="2"
|
||||
GridPane.rowIndex="2"/>
|
||||
<MFXPasswordField floatMode="DISABLED" promptText="No Floating Text" GridPane.columnIndex="3"
|
||||
GridPane.rowIndex="2"/>
|
||||
<MFXPasswordField id="customPassword" floatingText="Custom" promptText="Prompt Text" GridPane.columnIndex="4"
|
||||
GridPane.rowIndex="2"/>
|
||||
<MFXPasswordField disable="true" floatingText="Disabled" text="Text" GridPane.columnIndex="5"
|
||||
GridPane.rowIndex="2"/>
|
||||
<StackPane minHeight="150.0" minWidth="300.0" styleClass="grid-background" GridPane.columnSpan="2147483647"
|
||||
GridPane.rowIndex="4" GridPane.rowSpan="2147483647">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-15.0" left="-15.0" right="-15.0"/>
|
||||
</GridPane.margin>
|
||||
</StackPane>
|
||||
<Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
styleClass="header-label" text="Features" GridPane.columnSpan="2147483647" GridPane.rowIndex="4"/>
|
||||
<MFXTextField animated="false" floatingText="Not Animated" GridPane.rowIndex="5"/>
|
||||
<MFXTextField allowEdit="false" caretVisible="false" floatingText="As Label" selectable="false" text="Label's text"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="5"/>
|
||||
<MFXTextField fx:id="textField" floatingText="Characters Limit" GridPane.columnIndex="2" GridPane.rowIndex="5"/>
|
||||
<VBox spacing="5.0" GridPane.columnIndex="3" GridPane.columnSpan="2147483647" GridPane.rowIndex="5">
|
||||
<padding>
|
||||
<Insets right="10.0"/>
|
||||
</padding>
|
||||
<MFXPasswordField id="validatedField" fx:id="passwordField" floatingText="Validated" maxWidth="200.0"/>
|
||||
<Label id="validationLabel" fx:id="validationLabel" maxWidth="1.7976931348623157E308" minHeight="-Infinity"
|
||||
textFill="#ef6e6b" visible="false" wrapText="true"/>
|
||||
</VBox>
|
||||
</GridPane>
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB |
@ -1,34 +0,0 @@
|
||||
import javafx.application.Application;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.Region;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public class BorderWithGap extends Application {
|
||||
|
||||
// Background
|
||||
@Override
|
||||
public void start(Stage primaryStage) {
|
||||
AnchorPane pane = new AnchorPane();
|
||||
|
||||
Label label = new Label("Border with gap");
|
||||
AnchorPane.setTopAnchor(label, 50.0);
|
||||
AnchorPane.setLeftAnchor(label, 50.0);
|
||||
label.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
|
||||
pane.getChildren().add(label);
|
||||
|
||||
label.setStyle(
|
||||
"""
|
||||
-fx-background-color: blue, -fx-background, -fx-background;
|
||||
-fx-background-insets: 0, 0 10 38 10, 1;
|
||||
-fx-background-radius: 5, 0, 3;
|
||||
-fx-padding: 10;
|
||||
"""
|
||||
);
|
||||
|
||||
Scene scene = new Scene(pane, 600, 600);
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.show();
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
import io.github.palexdev.materialfx.controls.MFXButton;
|
||||
import io.github.palexdev.materialfx.controls.MFXContextMenu;
|
||||
import io.github.palexdev.materialfx.controls.MFXContextMenuItem;
|
||||
import io.github.palexdev.materialfx.factories.InsetsFactory;
|
||||
import io.github.palexdev.materialfx.utils.ColorUtils;
|
||||
import io.github.palexdev.materialfx.utils.StringUtils;
|
||||
import io.github.palexdev.mfxresources.fonts.fontawesome.FontAwesomeSolid;
|
||||
import javafx.application.Application;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public class ContextTest extends Application {
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
BorderPane bp = new BorderPane();
|
||||
|
||||
MFXButton button = new MFXButton("Show");
|
||||
MFXContextMenu menu = new MFXContextMenu(button);
|
||||
populateMenu(menu, 5);
|
||||
|
||||
Label labelSeparator = new Label("Separator");
|
||||
labelSeparator.setPadding(InsetsFactory.of(5, 3, 5, 0));
|
||||
menu.addSeparator(labelSeparator);
|
||||
menu.addItem(new MFXContextMenuItem("Separated Item", FontAwesomeSolid.random(ColorUtils.getRandomColor(), 12)));
|
||||
|
||||
menu.addLineSeparator(MFXContextMenu.Builder.getLineSeparator());
|
||||
menu.addItem(new MFXContextMenuItem("LSeparated Item", FontAwesomeSolid.random(ColorUtils.getRandomColor(), 12)));
|
||||
|
||||
menu.install();
|
||||
|
||||
bp.setCenter(button);
|
||||
Scene scene = new Scene(bp, 800, 600);
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.show();
|
||||
}
|
||||
|
||||
private void populateMenu(MFXContextMenu menu, int num) {
|
||||
MFXContextMenuItem[] items = new MFXContextMenuItem[num];
|
||||
for (int i = 0; i < num; i++) {
|
||||
MFXContextMenuItem item = new MFXContextMenuItem("Menu Item " + (i + 1), FontAwesomeSolid.random(ColorUtils.getRandomColor(), 12));
|
||||
item.setAccelerator("Alt + " + StringUtils.randAlphabetic(1).toUpperCase());
|
||||
items[i] = item;
|
||||
}
|
||||
menu.addItems(items);
|
||||
}
|
||||
}
|
@ -1,94 +0,0 @@
|
||||
import fr.brouillard.oss.cssfx.CSSFX;
|
||||
import io.github.palexdev.materialfx.MFXResourcesLoader;
|
||||
import io.github.palexdev.materialfx.controls.BoundTextField;
|
||||
import io.github.palexdev.materialfx.controls.MFXButton;
|
||||
import io.github.palexdev.materialfx.controls.MFXFilterPane;
|
||||
import io.github.palexdev.materialfx.controls.MFXTextField;
|
||||
import io.github.palexdev.materialfx.demo.model.Device;
|
||||
import io.github.palexdev.materialfx.dialogs.MFXDialogs;
|
||||
import io.github.palexdev.materialfx.dialogs.MFXStageDialog;
|
||||
import io.github.palexdev.materialfx.factories.InsetsFactory;
|
||||
import io.github.palexdev.materialfx.filter.EnumFilter;
|
||||
import io.github.palexdev.materialfx.filter.IntegerFilter;
|
||||
import io.github.palexdev.materialfx.utils.NodeUtils;
|
||||
import javafx.application.Application;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.text.Text;
|
||||
import javafx.stage.Stage;
|
||||
import org.scenicview.ScenicView;
|
||||
|
||||
public class FilterPaneTest extends Application {
|
||||
private String text =
|
||||
"""
|
||||
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
|
||||
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
|
||||
when an unknown printer took a galley of type and scrambled it to make a type specimen book.
|
||||
It has survived not only five centuries, but also the leap into electronic typesetting,
|
||||
remaining essentially unchanged.
|
||||
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
|
||||
and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
|
||||
""";
|
||||
private MFXStageDialog dialog;
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
CSSFX.start();
|
||||
|
||||
BorderPane borderPane = new BorderPane();
|
||||
borderPane.setPadding(InsetsFactory.all(20));
|
||||
|
||||
dialog = MFXDialogs.info()
|
||||
.setHeaderText("Info Dialog")
|
||||
//.setContentText("This is a simple test for the new MaterialFX dialogs!")
|
||||
.setContentText(text)
|
||||
.addActions(new MFXButton("Cancel"))
|
||||
.addActions(new MFXButton("Ok"))
|
||||
.makeScrollable(true)
|
||||
.addStylesheets(MFXResourcesLoader.load("css/MFXDialogs.css"))
|
||||
.toStageDialogBuilder()
|
||||
.setTitle("MaterialFX - Dialogs Test")
|
||||
.initOwner(primaryStage)
|
||||
.setOwnerNode(borderPane)
|
||||
.setScrimOwner(true)
|
||||
.setDraggable(true)
|
||||
.setOverlayClose(true)
|
||||
.get();
|
||||
|
||||
MFXFilterPane<Device> filterPane = new MFXFilterPane<>();
|
||||
filterPane.getStylesheets().add(MFXResourcesLoader.load("css/MFXFilterPane.css"));
|
||||
filterPane.getFilters().add(new EnumFilter<>("State", Device::getState, Device.State.class));
|
||||
filterPane.getFilters().add(new IntegerFilter<>("Machine ID", Device::getID));
|
||||
|
||||
MFXButton button = new MFXButton("Show Dialog");
|
||||
button.setOnAction(event -> {
|
||||
//dialog.showDialog();
|
||||
MFXStageDialog dialog = MFXDialogs.filter(filterPane)
|
||||
.makeScrollable(false)
|
||||
.addStylesheets(MFXResourcesLoader.load("css/MFXDialogs.css"))
|
||||
.toStageDialogBuilder()
|
||||
.setTitle("MFXFilterDialog - Test")
|
||||
.setAlwaysOnTop(true)
|
||||
.setDraggable(true)
|
||||
.get();
|
||||
dialog.showDialog();
|
||||
ScenicView.show(dialog.getScene());
|
||||
});
|
||||
|
||||
MFXTextField textField = new MFXTextField("", "", "Float");
|
||||
NodeUtils.waitForSkin(textField, () -> {
|
||||
BoundTextField node = (BoundTextField) textField.lookup(".text-field");
|
||||
NodeUtils.waitForSkin(node, () -> {
|
||||
Text text = (Text) node.lookup(".text");
|
||||
text.wrappingWidthProperty().bind(textField.widthProperty());
|
||||
}, false, true);
|
||||
}, false, true);
|
||||
|
||||
borderPane.setTop(button);
|
||||
//borderPane.setCenter(filterPane);
|
||||
borderPane.setBottom(textField);
|
||||
Scene scene = new Scene(borderPane, 800, 600);
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.show();
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
public enum FloatingStyle {
|
||||
FLOATING, IFTA
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user