├── .gitignore
├── LICENSE
├── README.md
├── build.xml
├── lib
├── AnimateFX-1.2.1.jar
├── CopyLibs
│ └── org-netbeans-modules-java-j2seproject-copylibstask.jar
├── controlsfx-8.40.18.jar
├── fontawesomefx-8.9.jar
├── gson-2.8.6.jar
├── jfoenix-8.0.10.jar
├── mysql-connector-java-8.0.22.jar
└── nblibraries.properties
├── manifest.mf
├── nbproject
├── UPDATED.TXT
├── build-impl.xml
├── configs
│ ├── Run_as_WebStart.properties
│ └── Run_in_Browser.properties
├── genfiles.properties
├── jfx-impl.xml
├── jfx-impl_backup.xml
├── private
│ ├── configs
│ │ ├── Run_as_WebStart.properties
│ │ └── Run_in_Browser.properties
│ ├── private.properties
│ ├── private.xml
│ └── retriever
│ │ └── catalog.xml
├── project.properties
└── project.xml
└── src
├── com
└── laynezcoder
│ └── estfx
│ ├── Main.java
│ ├── alerts
│ ├── AlertType.java
│ └── AlertsBuilder.java
│ ├── animations
│ └── Animations.java
│ ├── controllers
│ ├── AboutController.java
│ ├── CustomersController.java
│ ├── HomeController.java
│ ├── LoginController.java
│ ├── MainController.java
│ ├── ProductsController.java
│ ├── QuotesController.java
│ ├── SettingsController.java
│ ├── StartController.java
│ ├── StatisticsController.java
│ └── UsersController.java
│ ├── database
│ ├── DBElectronicStoreToolFX.sql
│ ├── DatabaseConnection.java
│ └── DatabaseHelper.java
│ ├── mask
│ ├── RequieredFieldsValidators.java
│ └── TextFieldMask.java
│ ├── models
│ ├── Customers.java
│ ├── Products.java
│ ├── Quotes.java
│ └── Users.java
│ ├── notifications
│ ├── NotificationType.java
│ └── NotificationsBuilder.java
│ ├── preferences
│ └── Preferences.java
│ ├── resources
│ └── Constants.java
│ ├── util
│ ├── AutocompleteComboBox.java
│ ├── ContextMenu.java
│ ├── CropImageProfile.java
│ ├── DefaultProfileImage.java
│ └── JFXDialogTool.java
│ └── views
│ ├── AboutView.fxml
│ ├── CustomersView.fxml
│ ├── HomeView.fxml
│ ├── LoginView.fxml
│ ├── MainView.fxml
│ ├── ProductsView.fxml
│ ├── QuotesView.fxml
│ ├── SettingsView.fxml
│ ├── StartView.fxml
│ ├── StatisticsView.fxml
│ └── UsersView.fxml
└── resources
├── LightTheme.css
├── Start.css
├── media
├── delete-person.png
├── empty-image.jpg
├── empty-statistics.png
├── error.png
├── estfx-logo.png
├── home-background.png
├── icon.png
├── image-not-found.png
├── information.png
├── laynezco-logo.png
├── laynezcode-logo.png
├── license.pdf
├── profiles
│ ├── a.png
│ ├── b.png
│ ├── c.png
│ ├── d.png
│ ├── e.png
│ ├── f.png
│ ├── g.png
│ ├── h.png
│ ├── i.png
│ ├── j.png
│ ├── k.png
│ ├── l.png
│ ├── m.png
│ ├── n.png
│ ├── o.png
│ ├── p.png
│ ├── q.png
│ ├── r.png
│ ├── s.png
│ ├── t.png
│ ├── u.png
│ ├── v.png
│ ├── w.png
│ ├── x.png
│ ├── y.png
│ └── z.png
├── success.png
├── usb.png
└── welcome.png
├── rimouski.ttf
└── typodermic-eula-02-2014.pdf
/.gitignore:
--------------------------------------------------------------------------------
1 | /build/
2 | /dist/
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
Management tool for an electronics store JavaFx + MySQL
2 |
3 | Management software for electronics store, developed with Java and MySQL. The videos showing the development of this application will be available on my youtube channel
4 | [LaynezCode](https://www.youtube.com/channel/UCyh1gKvoLx0Jk4ujhS3OIUA?view_as=subscriber).
5 |
6 | Before you begin, access your MySQL database manager and run the script that is stored in the src/com/laynezcoder/database/DBElectronicStoreToolFX folder. Then enter the DatabaseConnection class stored in the same folder and edit the access credentials with yours. After this, enjoy the program.
7 |
8 | ### App Features
9 | * Home window
10 |
11 |
12 |
13 |
14 | * Store customer management
15 |
16 |
17 |
18 |
19 | * Management of quotes by clients
20 |
21 |
22 |
23 |
24 | * Management of existence, realization and report of the quotation to the customer
25 |
26 |
27 |
28 |
29 | * Detailed view of quotes
30 |
31 |
32 |
33 |
34 | * Product management
35 |
36 |
37 |
38 |
39 |
40 | * Detailed picture of the products.
41 |
42 |
43 |
44 |
45 |
46 | * Manage users and access control
47 |
48 |
49 |
50 |
51 | * Windows are displayed according to user type
52 |
53 |
54 |
55 |
56 | * Customer statistics, quotes and products
57 |
58 |
59 |
60 |
61 | * Login window
62 |
63 |
64 |
65 |
66 | * Custom settings
67 |
68 |
69 |
70 |
71 | * Adding a user is assigned a default profile photo with the initial of their name
72 |
73 |
74 |
75 |
76 |
77 | * Now you can change your profile picture in a personalized way!
78 |
79 |
80 |
81 |
82 |
83 | ### Miscellaneous
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/build.xml:
--------------------------------------------------------------------------------
1 |
2 | Builds, tests, and runs the project ElectronicStoreToolFX.
3 |
4 |
53 |
54 |
--------------------------------------------------------------------------------
/lib/AnimateFX-1.2.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/lib/AnimateFX-1.2.1.jar
--------------------------------------------------------------------------------
/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
--------------------------------------------------------------------------------
/lib/controlsfx-8.40.18.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/lib/controlsfx-8.40.18.jar
--------------------------------------------------------------------------------
/lib/fontawesomefx-8.9.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/lib/fontawesomefx-8.9.jar
--------------------------------------------------------------------------------
/lib/gson-2.8.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/lib/gson-2.8.6.jar
--------------------------------------------------------------------------------
/lib/jfoenix-8.0.10.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/lib/jfoenix-8.0.10.jar
--------------------------------------------------------------------------------
/lib/mysql-connector-java-8.0.22.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/lib/mysql-connector-java-8.0.22.jar
--------------------------------------------------------------------------------
/lib/nblibraries.properties:
--------------------------------------------------------------------------------
1 | libs.CopyLibs.classpath=\
2 | ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
3 | libs.CopyLibs.displayName=CopyLibs Task
4 | libs.CopyLibs.prop-version=3.0
5 |
--------------------------------------------------------------------------------
/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/nbproject/UPDATED.TXT:
--------------------------------------------------------------------------------
1 | ==================================================
2 | Project ElectronicStoreToolFX build script updated
3 | ==================================================
4 |
5 | Project build script file jfx-impl.xml in nbproject sub-directory has not been recognized
6 | as compliant with this version of NetBeans JavaFX support module. To ensure correct
7 | and complete functionality within this NetBeans installation the script file has been
8 | backed up to jfx-impl_backup.xml and then updated to the currently supported state.
9 |
10 | FX Project build script auto-update may be triggered on project open either after
11 | NetBeans installation update or by manual changes in jfx-impl.xml. Please note that
12 | changing jfx-impl.xml manually is not recommended. Any build customization code should
13 | be placed only in build.xml in project root directory.
14 |
15 | Remark: The auto-update mechanism can be disabled by setting property
16 | javafx.disable.autoupdate=true
17 | Automatic opening of this notification when project files are updated can be disabled by setting property
18 | javafx.disable.autoupdate.notification=true
19 | (in build.properties, private.properties or project.properties).
20 |
21 | Remark: Files nbproject/jfx-impl_backup*.xml and this file nbproject/UPDATED.TXT
22 | are not used when building the project and can be freely deleted.
23 |
24 |
--------------------------------------------------------------------------------
/nbproject/configs/Run_as_WebStart.properties:
--------------------------------------------------------------------------------
1 | # Do not modify this property in this configuration. It can be re-generated.
2 | $label=Run as WebStart
3 |
--------------------------------------------------------------------------------
/nbproject/configs/Run_in_Browser.properties:
--------------------------------------------------------------------------------
1 | # Do not modify this property in this configuration. It can be re-generated.
2 | $label=Run in Browser
3 |
--------------------------------------------------------------------------------
/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=6986b6f1
2 | build.xml.script.CRC32=fd63efe6
3 | build.xml.stylesheet.CRC32=8064a381@1.80.1.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=cf7cd0c3
7 | nbproject/build-impl.xml.script.CRC32=76229e8f
8 | nbproject/build-impl.xml.stylesheet.CRC32=d549e5cc@1.97.0.48
9 |
--------------------------------------------------------------------------------
/nbproject/private/configs/Run_as_WebStart.properties:
--------------------------------------------------------------------------------
1 | # Do not modify this property in this configuration. It can be re-generated.
2 | javafx.run.as=webstart
3 |
--------------------------------------------------------------------------------
/nbproject/private/configs/Run_in_Browser.properties:
--------------------------------------------------------------------------------
1 | # Do not modify this property in this configuration. It can be re-generated.
2 | javafx.run.as=embedded
3 |
--------------------------------------------------------------------------------
/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | auxiliary.org-netbeans-modules-projectapi.issue214819_5f_fx_5f_enabled=true
2 | compile.on.save=true
3 | do.depend=false
4 | do.jar=true
5 | do.jlink=false
6 | # No need to modify this property unless customizing JavaFX Ant task infrastructure
7 | endorsed.javafx.ant.classpath=.
8 | javac.debug=true
9 | javadoc.preview=true
10 | javafx.run.as=standalone
11 | javafx.run.inbrowser=
12 | javafx.run.inbrowser.path=C:\\Program Files\\Internet Explorer\\iexplore.exe
13 | jlink.strip=false
14 | user.properties.file=C:\\Users\\LaynezCode\\AppData\\Roaming\\NetBeans\\12.2\\build.properties
15 |
--------------------------------------------------------------------------------
/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/C:/Users/LaynezCode/Documents/NetBeansProjects/ElectronicStoreToolFX/src/com/laynezcoder/estfx/util/JFXDialogTool.java
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/nbproject/private/retriever/catalog.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/nbproject/private/retriever/catalog.xml
--------------------------------------------------------------------------------
/nbproject/project.properties:
--------------------------------------------------------------------------------
1 | annotation.processing.enabled=true
2 | annotation.processing.enabled.in.editor=false
3 | annotation.processing.processors.list=
4 | annotation.processing.run.all.processors=true
5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
6 | application.title=ElectronicStoreToolFX
7 | application.vendor=LaynezCode
8 | build.classes.dir=${build.dir}/classes
9 | build.classes.excludes=**/*.java,**/*.form
10 | # This directory is removed when the project is cleaned:
11 | build.dir=build
12 | build.generated.dir=${build.dir}/generated
13 | build.generated.sources.dir=${build.dir}/generated-sources
14 | # Only compile against the classpath explicitly listed here:
15 | build.sysclasspath=ignore
16 | build.test.classes.dir=${build.dir}/test/classes
17 | build.test.results.dir=${build.dir}/test/results
18 | compile.on.save=true
19 | compile.on.save.unsupported.javafx=true
20 | # Uncomment to specify the preferred debugger connection transport:
21 | #debug.transport=dt_socket
22 | debug.classpath=\
23 | ${run.classpath}
24 | debug.modulepath=\
25 | ${run.modulepath}
26 | debug.test.classpath=\
27 | ${run.test.classpath}
28 | debug.test.modulepath=\
29 | ${run.test.modulepath}
30 | # This directory is removed when the project is cleaned:
31 | dist.dir=dist
32 | dist.jar=${dist.dir}/ElectronicStoreToolFX.jar
33 | dist.javadoc.dir=${dist.dir}/javadoc
34 | endorsed.classpath=
35 | excludes=
36 | file.reference.AnimateFX-1.2.1.jar=lib/AnimateFX-1.2.1.jar
37 | file.reference.controlsfx-8.40.18.jar=lib/controlsfx-8.40.18.jar
38 | file.reference.fontawesomefx-8.9.jar=lib/fontawesomefx-8.9.jar
39 | file.reference.gson-2.8.6.jar=lib\\gson-2.8.6.jar
40 | file.reference.jfoenix-8.0.10.jar=lib/jfoenix-8.0.10.jar
41 | file.reference.mysql-connector-java-8.0.22.jar=lib/mysql-connector-java-8.0.22.jar
42 | includes=**
43 | # Non-JavaFX jar file creation is deactivated in JavaFX 2.0+ projects
44 | jar.archive.disabled=true
45 | jar.compress=false
46 | javac.classpath=\
47 | ${javafx.classpath.extension}:\
48 | ${file.reference.jfoenix-8.0.10.jar}:\
49 | ${file.reference.controlsfx-8.40.18.jar}:\
50 | ${file.reference.fontawesomefx-8.9.jar}:\
51 | ${file.reference.mysql-connector-java-8.0.22.jar}:\
52 | ${file.reference.AnimateFX-1.2.1.jar}:\
53 | ${file.reference.gson-2.8.6.jar}
54 | # Space-separated list of extra javac options
55 | javac.compilerargs=
56 | javac.deprecation=false
57 | javac.external.vm=false
58 | javac.modulepath=
59 | javac.processormodulepath=
60 | javac.processorpath=\
61 | ${javac.classpath}
62 | javac.source=1.8
63 | javac.target=1.8
64 | javac.test.classpath=\
65 | ${javac.classpath}:\
66 | ${build.classes.dir}
67 | javac.test.modulepath=\
68 | ${javac.modulepath}
69 | javac.test.processorpath=\
70 | ${javac.test.classpath}
71 | javadoc.additionalparam=
72 | javadoc.author=false
73 | javadoc.encoding=${source.encoding}
74 | javadoc.html5=false
75 | javadoc.noindex=false
76 | javadoc.nonavbar=false
77 | javadoc.notree=false
78 | javadoc.private=false
79 | javadoc.splitindex=true
80 | javadoc.use=true
81 | javadoc.version=false
82 | javadoc.windowtitle=
83 | javafx.application.implementation.version=1.0
84 | javafx.binarycss=false
85 | javafx.classpath.extension=\
86 | ${java.home}/lib/javaws.jar:\
87 | ${java.home}/lib/deploy.jar:\
88 | ${java.home}/lib/plugin.jar
89 | javafx.deploy.adddesktopshortcut=false
90 | javafx.deploy.addstartmenushortcut=false
91 | javafx.deploy.allowoffline=true
92 | # If true, application update mode is set to 'background', if false, update mode is set to 'eager'
93 | javafx.deploy.backgroundupdate=false
94 | javafx.deploy.disable.proxy=false
95 | javafx.deploy.embedJNLP=true
96 | javafx.deploy.includeDT=true
97 | javafx.deploy.installpermanently=false
98 | javafx.deploy.permissionselevated=false
99 | # Set true to prevent creation of temporary copy of deployment artifacts before each run (disables concurrent runs)
100 | javafx.disable.concurrent.runs=false
101 | # Set true to enable multiple concurrent runs of the same WebStart or Run-in-Browser project
102 | javafx.enable.concurrent.external.runs=false
103 | # This is a JavaFX project
104 | javafx.enabled=true
105 | javafx.fallback.class=com.javafx.main.NoJavaFXFallback
106 | # Main class for JavaFX
107 | javafx.main.class=com.laynezcoder.estfx.Main
108 | javafx.preloader.class=
109 | # This project does not use Preloader
110 | javafx.preloader.enabled=false
111 | javafx.preloader.jar.filename=
112 | javafx.preloader.jar.path=
113 | javafx.preloader.project.path=
114 | javafx.preloader.type=none
115 | # Set true for GlassFish only. Rebases manifest classpaths of JARs in lib dir. Not usable with signed JARs.
116 | javafx.rebase.libs=false
117 | javafx.run.height=600
118 | javafx.run.width=800
119 | javafx.signing.blob=false
120 | javafx.signing.enabled=false
121 | javafx.signing.type=notsigned
122 | jlink.launcher=false
123 | jlink.launcher.name=ElectronicStoreToolFX
124 | # Pre-JavaFX 2.0 WebStart is deactivated in JavaFX 2.0+ projects
125 | jnlp.enabled=false
126 | # Main class for Java launcher
127 | main.class=com.javafx.main.Main
128 | # For improved security specify narrower Codebase manifest attribute to prevent RIAs from being repurposed
129 | manifest.custom.codebase=*
130 | # Specify Permissions manifest attribute to override default (choices: sandbox, all-permissions)
131 | manifest.custom.permissions=
132 | manifest.file=manifest.mf
133 | meta.inf.dir=${src.dir}/META-INF
134 | mkdist.disabled=false
135 | native.bundling.enabled=false
136 | platform.active=default_platform
137 | run.classpath=\
138 | ${dist.jar}:\
139 | ${javac.classpath}:\
140 | ${build.classes.dir}
141 | run.modulepath=\
142 | ${javac.modulepath}
143 | run.test.classpath=\
144 | ${javac.test.classpath}:\
145 | ${build.test.classes.dir}
146 | run.test.modulepath=\
147 | ${javac.test.modulepath}
148 | source.encoding=UTF-8
149 | src.dir=src
150 | test.src.dir=test
151 |
--------------------------------------------------------------------------------
/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | ElectronicStoreToolFX
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | .\lib\nblibraries.properties
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/Main.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx;
17 |
18 | import com.laynezcoder.estfx.database.DatabaseHelper;
19 | import com.laynezcoder.estfx.resources.Constants;
20 | import java.io.IOException;
21 | import java.util.logging.Level;
22 | import java.util.logging.Logger;
23 | import javafx.application.Application;
24 | import javafx.fxml.FXMLLoader;
25 | import javafx.scene.Parent;
26 | import javafx.scene.Scene;
27 | import javafx.scene.image.Image;
28 | import javafx.stage.Stage;
29 | import javafx.stage.StageStyle;
30 |
31 | public class Main extends Application {
32 |
33 | @Override
34 | public void start(Stage stage) {
35 | if (DatabaseHelper.checkIfUserExists() == 0) {
36 | startWindow(stage);
37 | } else {
38 | loginWindow(stage);
39 | }
40 | }
41 |
42 | private void loginWindow(Stage stage) {
43 | try {
44 | DatabaseHelper.logout();
45 | Parent root = FXMLLoader.load(getClass().getResource(Constants.LOGIN_VIEW));
46 | stage.getIcons().add(new Image(Constants.STAGE_ICON));
47 | stage.initStyle(StageStyle.UNDECORATED);
48 | stage.setTitle(Constants.TITLE);
49 | stage.setScene(new Scene(root));
50 | stage.show();
51 | } catch (IOException ex) {
52 | Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
53 | }
54 | }
55 |
56 | private void startWindow(Stage stage) {
57 | try {
58 | Parent root = FXMLLoader.load(getClass().getResource(Constants.START_VIEW));
59 | stage.getIcons().add(new Image(Constants.STAGE_ICON));
60 | stage.initStyle(StageStyle.UNDECORATED);
61 | stage.setScene(new Scene(root));
62 | stage.setTitle(Constants.TITLE);
63 | stage.show();
64 | } catch (IOException ex) {
65 | Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
66 | }
67 | }
68 |
69 | public static void main(String[] args) {
70 | launch(args);
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/alerts/AlertType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.alerts;
17 |
18 | public enum AlertType {
19 | ERROR, SUCCES
20 | }
21 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/alerts/AlertsBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.alerts;
17 |
18 | import com.jfoenix.controls.JFXButton;
19 | import com.jfoenix.controls.JFXDialog;
20 | import com.laynezcoder.estfx.database.DatabaseHelper;
21 | import com.laynezcoder.estfx.resources.Constants;
22 | import javafx.geometry.Insets;
23 | import javafx.geometry.Pos;
24 | import javafx.scene.Node;
25 | import javafx.scene.layout.AnchorPane;
26 | import javafx.scene.layout.Background;
27 | import javafx.scene.layout.HBox;
28 | import javafx.scene.layout.StackPane;
29 | import javafx.scene.layout.VBox;
30 | import javafx.scene.text.Text;
31 |
32 | public class AlertsBuilder {
33 |
34 | private static String title;
35 |
36 | private static String buttonStyle;
37 |
38 | private static String titleStyle;
39 |
40 | private static String bodyStyle;
41 |
42 | private static JFXDialog dialog;
43 |
44 | public static void create(AlertType type, StackPane dialogContainer, Node nodeToBlur, Node nodeToDisable, String body) {
45 | setFunction(type);
46 |
47 | AnchorPane root = new AnchorPane();
48 | root.setPrefSize(390, 230);
49 |
50 | JFXButton button = new JFXButton("Okey");
51 | button.getStyleClass().add(buttonStyle);
52 |
53 | HBox buttonContainer = new HBox();
54 | buttonContainer.setLayoutY(115);
55 | buttonContainer.setPrefSize(390, 115);
56 | buttonContainer.setAlignment(Pos.CENTER);
57 | buttonContainer.getChildren().addAll(button);
58 |
59 | Text textTitle = new Text(title);
60 | textTitle.getStyleClass().add(titleStyle);
61 |
62 | Text textBody = new Text(body);
63 | textBody.getStyleClass().add(bodyStyle);
64 |
65 | VBox textContainer = new VBox();
66 | textContainer.setSpacing(5);
67 | textContainer.setPrefSize(390, 115);
68 | textContainer.setAlignment(Pos.CENTER_LEFT);
69 | textContainer.setPadding(new Insets(0, 0, 0, 30));
70 | textContainer.getChildren().addAll(textTitle, textBody);
71 | root.getChildren().addAll(buttonContainer, textContainer);
72 |
73 | nodeToDisable.setDisable(true);
74 | nodeToBlur.setEffect(Constants.BOX_BLUR_EFFECT);
75 |
76 | dialog = new JFXDialog();
77 | dialog.setContent(root);
78 | dialog.setDialogContainer(dialogContainer);
79 | dialog.setBackground(Background.EMPTY);
80 | dialog.getStyleClass().add("jfx-dialog-overlay-pane");
81 | dialog.setTransitionType(DatabaseHelper.dialogTransition());
82 | dialog.show();
83 |
84 | button.setOnMouseClicked(e -> {
85 | dialog.close();
86 | });
87 |
88 | dialog.setOnDialogOpened(e -> {
89 | nodeToDisable.setDisable(true);
90 | nodeToBlur.setEffect(Constants.BOX_BLUR_EFFECT);
91 | });
92 |
93 | dialog.setOnDialogClosed(e -> {
94 | nodeToDisable.setDisable(false);
95 | nodeToBlur.setEffect(null);
96 | });
97 | }
98 |
99 | public static void close() {
100 | if (dialog != null) {
101 | dialog.close();
102 | }
103 | }
104 |
105 | private static void setFunction(AlertType type) {
106 | switch (type) {
107 | case SUCCES:
108 | title = "Succes!";
109 | buttonStyle = "alert-success-button";
110 | titleStyle = "alert-success-title";
111 | bodyStyle = "alert-success-body";
112 | break;
113 |
114 | case ERROR:
115 | title = "Oops!";
116 | buttonStyle = "alert-error-button";
117 | titleStyle = "alert-error-title";
118 | bodyStyle = "alert-error-body";
119 | break;
120 | }
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/animations/Animations.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.animations;
17 |
18 | import animatefx.animation.FadeIn;
19 | import animatefx.animation.FadeInUp;
20 | import animatefx.animation.FadeOut;
21 | import animatefx.animation.Shake;
22 | import com.jfoenix.controls.JFXProgressBar;
23 | import javafx.animation.Interpolator;
24 | import javafx.animation.KeyFrame;
25 | import javafx.animation.KeyValue;
26 | import javafx.animation.ScaleTransition;
27 | import javafx.animation.Timeline;
28 | import javafx.scene.Node;
29 | import javafx.scene.effect.ColorAdjust;
30 | import javafx.util.Duration;
31 |
32 | public class Animations {
33 |
34 | public static void fadeInUp(Node node) {
35 | new FadeInUp(node).play();
36 | }
37 |
38 | public static void fadeOut(Node node) {
39 | new FadeOut(node).play();
40 | }
41 |
42 | public static void shake(Node node) {
43 | new Shake(node).play();
44 | }
45 |
46 | public static void fadeOutWithDuration(Node node) {
47 | FadeOut fadeOut = new FadeOut(node);
48 | fadeOut.setSpeed(10);
49 | fadeOut.play();
50 | }
51 |
52 | public static void fade(Node parent, Node node, Node icon) {
53 | ColorAdjust colorAdjust = new ColorAdjust();
54 | colorAdjust.setBrightness(0.0);
55 |
56 | node.setEffect(colorAdjust);
57 |
58 | parent.setOnMouseEntered(e -> {
59 | icon.setVisible(true);
60 | fadeInUp(icon);
61 |
62 | Timeline fadeInTimeline = new Timeline(
63 | new KeyFrame(Duration.seconds(0),
64 | new KeyValue(colorAdjust.brightnessProperty(), colorAdjust.brightnessProperty().getValue(), Interpolator.LINEAR)),
65 | new KeyFrame(Duration.seconds(0.2), new KeyValue(colorAdjust.brightnessProperty(), -0.6, Interpolator.LINEAR)
66 | ));
67 | fadeInTimeline.setCycleCount(1);
68 | fadeInTimeline.setAutoReverse(false);
69 | fadeInTimeline.play();
70 | });
71 |
72 | parent.setOnMouseExited(e -> {
73 | fadeOut(icon);
74 |
75 | Timeline fadeOutTimeline = new Timeline(
76 | new KeyFrame(Duration.seconds(0),
77 | new KeyValue(colorAdjust.brightnessProperty(), colorAdjust.brightnessProperty().getValue(), Interpolator.LINEAR)),
78 | new KeyFrame(Duration.seconds(0.2), new KeyValue(colorAdjust.brightnessProperty(), 0, Interpolator.LINEAR)
79 | ));
80 | fadeOutTimeline.setCycleCount(1);
81 | fadeOutTimeline.setAutoReverse(false);
82 | fadeOutTimeline.play();
83 | });
84 | }
85 |
86 | public static void tooltip(Node node, Node tooltip) {
87 | node.setOnMouseEntered(ev -> {
88 | FadeIn fadeIn = new FadeIn(tooltip);
89 | fadeIn.setSpeed(3);
90 | fadeIn.play();
91 | tooltip.setVisible(true);
92 | });
93 |
94 | node.setOnMouseExited(ev -> tooltip.setVisible(false));
95 | }
96 |
97 | public static void hover(Node node, int duration, double setXAndY) {
98 | ScaleTransition scaleTrans = new ScaleTransition(Duration.millis(duration), node);
99 | scaleTrans.setFromX(1.0);
100 | scaleTrans.setFromY(1.0);
101 | scaleTrans.setToX(setXAndY);
102 | scaleTrans.setToY(setXAndY);
103 |
104 | node.setOnMouseEntered(ev -> {
105 | scaleTrans.setRate(1.0);
106 | scaleTrans.play();
107 | });
108 |
109 | node.setOnMouseExited(ev -> {
110 | scaleTrans.setRate(-1.0);
111 | scaleTrans.play();
112 | });
113 | }
114 |
115 | public static void progressAnimation(JFXProgressBar progressBar, double value) {
116 | Timeline timeline = new Timeline();
117 |
118 | KeyValue keyValue = new KeyValue(progressBar.progressProperty(), value);
119 | KeyFrame keyFrame = new KeyFrame(new Duration(600), keyValue);
120 | timeline.getKeyFrames().add(keyFrame);
121 |
122 | timeline.play();
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/controllers/AboutController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.controllers;
17 |
18 | import com.laynezcoder.estfx.animations.Animations;
19 | import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIconView;
20 | import java.awt.Desktop;
21 | import java.io.IOException;
22 | import java.net.URI;
23 | import java.net.URISyntaxException;
24 | import java.net.URL;
25 | import java.util.ResourceBundle;
26 | import java.util.logging.Level;
27 | import java.util.logging.Logger;
28 | import javafx.animation.FadeTransition;
29 | import javafx.animation.PauseTransition;
30 | import javafx.animation.ScaleTransition;
31 | import javafx.fxml.FXML;
32 | import javafx.fxml.Initializable;
33 | import javafx.scene.Node;
34 | import javafx.scene.control.Separator;
35 | import javafx.scene.image.ImageView;
36 | import javafx.scene.text.Text;
37 | import javafx.util.Duration;
38 |
39 | public class AboutController implements Initializable {
40 |
41 | private final String GITHUB = "https://github.com/LaynezCode";
42 |
43 | private final String FACEBOOK = "https://www.facebook.com/LaynezCode-106644811127683";
44 |
45 | private final String GMAIL = "https://www.google.com/";
46 |
47 | private final String YOUTUBE = "https://www.youtube.com/c/LaynezCode/";
48 |
49 | @FXML
50 | private ImageView estfx;
51 |
52 | @FXML
53 | private Text developer;
54 |
55 | @FXML
56 | private ImageView laynezcode;
57 |
58 | @FXML
59 | private MaterialDesignIconView facebook;
60 |
61 | @FXML
62 | private MaterialDesignIconView youtube;
63 |
64 | @FXML
65 | private MaterialDesignIconView github;
66 |
67 | @FXML
68 | private MaterialDesignIconView google;
69 |
70 | @FXML
71 | private Text mark;
72 |
73 | @FXML
74 | private ImageView laynezcorporation;
75 |
76 | @FXML
77 | private Separator separator;
78 |
79 | @Override
80 | public void initialize(URL location, ResourceBundle resources) {
81 | setAnimations();
82 | setURL();
83 | }
84 |
85 | private void setURL() {
86 | url(GITHUB, github);
87 | url(FACEBOOK, facebook);
88 | url(GMAIL, google);
89 | url(YOUTUBE, youtube);
90 | }
91 |
92 | private void setAnimations() {
93 | transition(estfx, 0);
94 | transition(developer, 2);
95 | transition(laynezcode, 3);
96 | transition(separator, 4);
97 | transition(facebook, 5);
98 | transition(youtube, 6);
99 | transition(github, 7);
100 | transition(google, 8);
101 | transition(mark, 9);
102 | transition(laynezcorporation, 10);
103 | }
104 |
105 | private void transition(Node node, int duration) {
106 | ScaleTransition scaleTransition = new ScaleTransition(Duration.millis(100), node);
107 | scaleTransition.setFromX(1.0);
108 | scaleTransition.setFromY(1.0);
109 | scaleTransition.setToX(1.2);
110 | scaleTransition.setToY(1.2);
111 |
112 | FadeTransition fadeTransition = new FadeTransition(Duration.millis(3000), node);
113 | fadeTransition.setFromValue(2);
114 | fadeTransition.setToValue(0.5);
115 |
116 | PauseTransition pauseTransition = new PauseTransition();
117 | pauseTransition.setDuration(Duration.seconds(duration));
118 | pauseTransition.setOnFinished(ev -> {
119 | PauseTransition pauseTransition2 = new PauseTransition();
120 | pauseTransition2.setDuration(Duration.seconds(0.1));
121 | pauseTransition2.setOnFinished(ev2 -> {
122 | node.setVisible(true);
123 | });
124 |
125 | pauseTransition2.play();
126 | Animations.fadeInUp(node);
127 | fadeTransition.play();
128 | });
129 |
130 | pauseTransition.play();
131 |
132 | node.setOnMouseEntered(ev -> {
133 | fadeTransition.setToValue(1);
134 | fadeTransition.playFromStart();
135 |
136 | scaleTransition.setRate(1.0);
137 | scaleTransition.play();
138 | });
139 |
140 | node.setOnMouseExited(ev -> {
141 | fadeTransition.setDuration(Duration.millis(100));
142 | fadeTransition.setToValue(0.5);
143 | fadeTransition.playFromStart();
144 |
145 | scaleTransition.setRate(-1.0);
146 | scaleTransition.play();
147 | });
148 | }
149 |
150 | private void url(String url, Node node) {
151 | node.setOnMouseClicked(ev -> {
152 | Desktop desktop = Desktop.getDesktop();
153 | try {
154 | desktop.browse(new URI(url));
155 | } catch (IOException | URISyntaxException ex) {
156 | Logger.getLogger(AboutController.class.getName()).log(Level.SEVERE, null, ex);
157 | }
158 | });
159 | }
160 | }
161 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/controllers/LoginController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.controllers;
17 |
18 | import com.jfoenix.controls.JFXButton;
19 | import com.jfoenix.controls.JFXPasswordField;
20 | import com.jfoenix.controls.JFXTextField;
21 | import com.laynezcoder.estfx.animations.Animations;
22 | import com.laynezcoder.estfx.database.DatabaseConnection;
23 | import com.laynezcoder.estfx.database.DatabaseHelper;
24 | import com.laynezcoder.estfx.mask.RequieredFieldsValidators;
25 | import com.laynezcoder.estfx.mask.TextFieldMask;
26 | import com.laynezcoder.estfx.notifications.NotificationType;
27 | import com.laynezcoder.estfx.notifications.NotificationsBuilder;
28 | import com.laynezcoder.estfx.resources.Constants;
29 | import de.jensd.fx.glyphs.fontawesome.FontAwesomeIcon;
30 | import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView;
31 | import java.io.IOException;
32 | import java.net.URL;
33 | import java.sql.PreparedStatement;
34 | import java.sql.ResultSet;
35 | import java.sql.SQLException;
36 | import java.util.ResourceBundle;
37 | import java.util.logging.Level;
38 | import java.util.logging.Logger;
39 | import javafx.fxml.FXML;
40 | import javafx.fxml.FXMLLoader;
41 | import javafx.fxml.Initializable;
42 | import javafx.scene.Parent;
43 | import javafx.scene.Scene;
44 | import javafx.scene.image.Image;
45 | import javafx.scene.input.KeyCode;
46 | import javafx.scene.input.KeyCombination;
47 | import javafx.scene.input.KeyEvent;
48 | import javafx.scene.input.MouseEvent;
49 | import javafx.scene.layout.Pane;
50 | import javafx.scene.text.Text;
51 | import javafx.stage.Stage;
52 | import javafx.stage.StageStyle;
53 |
54 | public class LoginController implements Initializable {
55 |
56 | private final String INCORRECT_CREDENTIALS = "Incorrect user or password";
57 |
58 | @FXML
59 | private JFXButton btnLogin;
60 |
61 | @FXML
62 | private Pane paneIcon;
63 |
64 | @FXML
65 | private JFXTextField txtUser;
66 |
67 | @FXML
68 | private JFXTextField txtPassword;
69 |
70 | @FXML
71 | private JFXPasswordField pfPassword;
72 |
73 | @FXML
74 | private FontAwesomeIconView icon;
75 |
76 | @FXML
77 | private Text title;
78 |
79 | private double x, y;
80 |
81 | @Override
82 | public void initialize(URL location, ResourceBundle resources) {
83 | showPassword();
84 | setValidations();
85 | selectText();
86 | setMask();
87 | animations();
88 | }
89 |
90 | private void animations() {
91 | Animations.fadeInUp(title);
92 | Animations.fadeInUp(txtUser);
93 | Animations.fadeInUp(txtPassword);
94 | Animations.fadeInUp(pfPassword);
95 | Animations.fadeInUp(btnLogin);
96 | }
97 |
98 | private void setValidations() {
99 | RequieredFieldsValidators.toJFXPasswordField(pfPassword);
100 | RequieredFieldsValidators.toJFXTextField(txtUser);
101 | RequieredFieldsValidators.toJFXTextField(txtPassword);
102 | }
103 |
104 | private void setMask() {
105 | TextFieldMask.onlyNumbersAndLettersNotSpaces(txtUser, 40);
106 | TextFieldMask.onlyNumbersAndLettersNotSpaces(txtPassword, 40);
107 | TextFieldMask.onlyNumbersAndLettersNotSpaces(pfPassword, 40);
108 | }
109 |
110 | private void selectText() {
111 | TextFieldMask.selectText(txtUser);
112 | TextFieldMask.selectText(txtPassword);
113 | TextFieldMask.selectText(pfPassword);
114 | }
115 |
116 | @FXML
117 | private void login() {
118 | String user = txtUser.getText().trim();
119 | String pass = pfPassword.getText().trim();
120 |
121 | if (user.isEmpty() && pass.isEmpty()) {
122 | Animations.shake(txtUser);
123 | Animations.shake(pfPassword);
124 | Animations.shake(paneIcon);
125 | NotificationsBuilder.create(NotificationType.ERROR, Constants.MESSAGE_INSUFFICIENT_DATA);
126 | return;
127 | }
128 |
129 | if (user.isEmpty()) {
130 | txtUser.requestFocus();
131 | Animations.shake(txtUser);
132 | return;
133 | }
134 |
135 | if (pass.isEmpty()) {
136 | pfPassword.requestFocus();
137 | Animations.shake(pfPassword);
138 | Animations.shake(paneIcon);
139 | return;
140 | }
141 |
142 | try {
143 | String sql = "SELECT id, nameUser FROM Users WHERE email = BINARY ? AND pass = BINARY ?";
144 | PreparedStatement preparedStatement = DatabaseConnection.getInstance().getConnection().prepareStatement(sql);
145 | preparedStatement.setString(1, user);
146 | preparedStatement.setString(2, pass);
147 |
148 | ResultSet rs = preparedStatement.executeQuery();
149 | if (rs.next()) {
150 | int id = rs.getInt("id");
151 | String nameUser = rs.getString("nameUser");
152 |
153 | boolean result = DatabaseHelper.insertUserSession(id);
154 | if (result) {
155 | loadMain();
156 | NotificationsBuilder.create(NotificationType.SUCCESS, "Welcome to the system " + nameUser + "!");
157 | }
158 | } else {
159 | NotificationsBuilder.create(NotificationType.ERROR, INCORRECT_CREDENTIALS);
160 | Animations.shake(txtUser);
161 | Animations.shake(pfPassword);
162 | Animations.shake(txtPassword);
163 | Animations.shake(paneIcon);
164 | }
165 | } catch (SQLException ex) {
166 | Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex);
167 | NotificationsBuilder.create(NotificationType.ERROR, Constants.MESSAGE_ERROR_CONNECTION_MYSQL);
168 | }
169 |
170 | }
171 |
172 | private void loadMain() {
173 | try {
174 | FXMLLoader loader = new FXMLLoader();
175 | loader.setLocation(getClass().getResource(Constants.MAIN_VIEW));
176 | Parent root = loader.load();
177 | MainController main = loader.getController();
178 |
179 | if (DatabaseHelper.getUserType().equals("Administrator")) {
180 | main.getBtnStatistics().setVisible(true);
181 | main.getBtnAddUser().setVisible(true);
182 | main.getBtnAbout().setVisible(true);
183 | } else {
184 | main.getBtnStatistics().setVisible(false);
185 | main.getBtnAddUser().setVisible(false);
186 | main.getBtnAbout().setVisible(false);
187 | }
188 |
189 | Stage stage = new Stage(StageStyle.DECORATED);
190 | stage.getIcons().add(new Image(Constants.STAGE_ICON));
191 | stage.setFullScreenExitKeyCombination(KeyCombination.NO_MATCH);
192 | stage.setMinHeight(Constants.MIN_HEIGHT);
193 | stage.setMinWidth(Constants.MIN_WIDTH);
194 | stage.setTitle(Constants.TITLE);
195 | stage.setScene(new Scene(root));
196 | stage.show();
197 | closeStage();
198 |
199 | root.setOnKeyPressed((KeyEvent e) -> {
200 | if (e.getCode().equals(KeyCode.F11)) {
201 | stage.setFullScreen(!stage.isFullScreen());
202 | }
203 | });
204 |
205 | stage.setOnCloseRequest(ev -> {
206 | DatabaseHelper.logout();
207 | ProductsController.closeStage();
208 | });
209 | } catch (IOException ex) {
210 | Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex);
211 | }
212 | }
213 |
214 | @FXML
215 | private void showPassword() {
216 | txtPassword.managedProperty().bind(icon.pressedProperty());
217 | txtPassword.visibleProperty().bind(icon.pressedProperty());
218 | txtPassword.textProperty().bindBidirectional(pfPassword.textProperty());
219 |
220 | pfPassword.managedProperty().bind(icon.pressedProperty().not());
221 | pfPassword.visibleProperty().bind(icon.pressedProperty().not());
222 |
223 | icon.pressedProperty().addListener((o, oldVal, newVal) -> {
224 | if (newVal) {
225 | icon.setIcon(FontAwesomeIcon.EYE);
226 | } else {
227 | icon.setIcon(FontAwesomeIcon.EYE_SLASH);
228 | }
229 | });
230 | }
231 |
232 | @FXML
233 | private void closeStage() {
234 | ((Stage) txtUser.getScene().getWindow()).close();
235 | }
236 |
237 | @FXML
238 | private void pressed(MouseEvent event) {
239 | x = event.getSceneX();
240 | y = event.getSceneY();
241 | }
242 |
243 | @FXML
244 | private void dragged(MouseEvent event) {
245 | Stage stg = (Stage) btnLogin.getScene().getWindow();
246 | stg.setX(event.getScreenX() - x);
247 | stg.setY(event.getScreenY() - y);
248 | }
249 | }
250 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/controllers/MainController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.controllers;
17 |
18 | import com.jfoenix.controls.JFXButton;
19 | import com.laynezcoder.estfx.animations.Animations;
20 | import com.laynezcoder.estfx.database.DatabaseHelper;
21 | import com.laynezcoder.estfx.resources.Constants;
22 | import java.io.IOException;
23 | import java.net.URL;
24 | import java.util.ResourceBundle;
25 | import java.util.logging.Level;
26 | import java.util.logging.Logger;
27 | import javafx.fxml.FXML;
28 | import javafx.fxml.FXMLLoader;
29 | import javafx.fxml.Initializable;
30 | import javafx.scene.Parent;
31 | import javafx.scene.Scene;
32 | import javafx.scene.image.Image;
33 | import javafx.scene.input.MouseEvent;
34 | import javafx.scene.layout.AnchorPane;
35 | import javafx.stage.Stage;
36 | import javafx.stage.StageStyle;
37 |
38 | public class MainController implements Initializable {
39 |
40 | @FXML
41 | private JFXButton btnHome;
42 |
43 | @FXML
44 | private JFXButton btnCustomers;
45 |
46 | @FXML
47 | private JFXButton btnQuotes;
48 |
49 | @FXML
50 | private JFXButton btnExit;
51 |
52 | @FXML
53 | private JFXButton btnAbout;
54 |
55 | @FXML
56 | private JFXButton btnStatistics;
57 |
58 | @FXML
59 | private JFXButton btnAddUser;
60 |
61 | @FXML
62 | private JFXButton btnSettings;
63 |
64 | @FXML
65 | private JFXButton btnProducts;
66 |
67 | @FXML
68 | private AnchorPane rootContainer;
69 |
70 | @FXML
71 | private AnchorPane tooltipCustomers;
72 |
73 | @FXML
74 | private AnchorPane tooltipHome;
75 |
76 | @FXML
77 | private AnchorPane tooltipQuotes;
78 |
79 | @FXML
80 | private AnchorPane tooltipSettings;
81 |
82 | @FXML
83 | private AnchorPane tooltipExit;
84 |
85 | @FXML
86 | private AnchorPane tooltipProducts;
87 |
88 | @FXML
89 | private AnchorPane tooltipAbout;
90 |
91 | @FXML
92 | private AnchorPane tooltipStatistics;
93 |
94 | @FXML
95 | private AnchorPane tooltipAddUser;
96 |
97 | @Override
98 | public void initialize(URL location, ResourceBundle resources) {
99 | homeWindowsInitialize();
100 | tooltips();
101 | }
102 |
103 | @FXML
104 | private void setDisableButtons(MouseEvent event) {
105 | setDisableButtons(event, btnHome);
106 | setDisableButtons(event, btnCustomers);
107 | setDisableButtons(event, btnQuotes);
108 | setDisableButtons(event, btnProducts);
109 | setDisableButtons(event, btnAddUser);
110 | setDisableButtons(event, btnStatistics);
111 | setDisableButtons(event, btnAbout);
112 | setDisableButtons(event, btnSettings);
113 | setDisableButtons(event, btnExit);
114 | }
115 |
116 | private void homeWindowsInitialize() {
117 | btnHome.setDisable(true);
118 | showFXMLWindows("HomeView");
119 | }
120 |
121 | @FXML
122 | private void homeWindows(MouseEvent event) {
123 | btnHome.setDisable(true);
124 | showFXMLWindows("HomeView");
125 | setDisableButtons(event);
126 | }
127 |
128 | @FXML
129 | private void customersWindows(MouseEvent event) {
130 | showFXMLWindows("CustomersView");
131 | setDisableButtons(event);
132 | }
133 |
134 | @FXML
135 | private void quotesWindows(MouseEvent event) {
136 | showFXMLWindows("QuotesView");
137 | setDisableButtons(event);
138 | }
139 |
140 | @FXML
141 | private void settingsWindows(MouseEvent event) {
142 | showFXMLWindows("SettingsView");
143 | setDisableButtons(event);
144 | }
145 |
146 | @FXML
147 | private void statisticsWindows(MouseEvent event) {
148 | showFXMLWindows("StatisticsView");
149 | setDisableButtons(event);
150 | }
151 |
152 | @FXML
153 | private void aboutWindows(MouseEvent event) {
154 | showFXMLWindows("AboutView");
155 | setDisableButtons(event);
156 | }
157 |
158 | @FXML
159 | private void productsWindows(MouseEvent event) {
160 | showFXMLWindows("ProductsView");
161 | setDisableButtons(event);
162 | }
163 |
164 | @FXML
165 | private void addUserWindows(MouseEvent event) {
166 | showFXMLWindows("UsersView");
167 | setDisableButtons(event);
168 | }
169 |
170 | @FXML
171 | private void loginWindow() {
172 | try {
173 | Parent root = FXMLLoader.load(getClass().getResource(Constants.LOGIN_VIEW));
174 | Stage stage = new Stage(StageStyle.UNDECORATED);
175 | stage.getIcons().add(new Image(Constants.STAGE_ICON));
176 | Scene scene = new Scene(root);
177 | stage.setScene(scene);
178 | stage.show();
179 | closeStage();
180 | DatabaseHelper.logout();
181 | } catch (IOException ex) {
182 | Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);
183 | }
184 | }
185 |
186 | private void closeStage() {
187 | ((Stage) btnHome.getScene().getWindow()).close();
188 | }
189 |
190 | private void setDisableButtons(MouseEvent event, JFXButton button) {
191 | if (event.getSource().equals(button)) {
192 | button.setDisable(true);
193 | } else {
194 | button.setDisable(false);
195 | }
196 | }
197 |
198 | private void tooltips() {
199 | Animations.tooltip(btnHome, tooltipHome);
200 | Animations.tooltip(btnHome, tooltipHome);
201 | Animations.tooltip(btnCustomers, tooltipCustomers);
202 | Animations.tooltip(btnQuotes, tooltipQuotes);
203 | Animations.tooltip(btnSettings, tooltipSettings);
204 | Animations.tooltip(btnExit, tooltipExit);
205 | Animations.tooltip(btnProducts, tooltipProducts);
206 | Animations.tooltip(btnStatistics, tooltipStatistics);
207 | Animations.tooltip(btnAbout, tooltipAbout);
208 | Animations.tooltip(btnAddUser, tooltipAddUser);
209 | }
210 |
211 | private void showFXMLWindows(String FXMLName) {
212 | rootContainer.getChildren().clear();
213 | try {
214 | Parent root = FXMLLoader.load(getClass().getResource(Constants.VIEWS_PACKAGE + FXMLName + ".fxml"));
215 | AnchorPane.setBottomAnchor(root, 0.0);
216 | AnchorPane.setTopAnchor(root, 0.0);
217 | AnchorPane.setLeftAnchor(root, 0.0);
218 | AnchorPane.setRightAnchor(root, 0.0);
219 | rootContainer.getChildren().setAll(root);
220 | } catch (IOException ex) {
221 | Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);
222 | }
223 | }
224 |
225 | public JFXButton getBtnStatistics() {
226 | return btnStatistics;
227 | }
228 |
229 | public JFXButton getBtnAddUser() {
230 | return btnAddUser;
231 | }
232 |
233 | public JFXButton getBtnAbout() {
234 | return btnAbout;
235 | }
236 | }
237 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/controllers/StatisticsController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.controllers;
17 |
18 | import animatefx.animation.FadeIn;
19 | import com.jfoenix.controls.JFXPopup;
20 | import com.laynezcoder.estfx.animations.Animations;
21 | import com.laynezcoder.estfx.database.DatabaseHelper;
22 | import com.sun.javafx.scene.control.skin.DatePickerSkin;
23 | import java.net.URL;
24 | import java.util.ResourceBundle;
25 | import javafx.collections.FXCollections;
26 | import javafx.collections.ObservableList;
27 | import javafx.fxml.FXML;
28 | import javafx.fxml.Initializable;
29 | import javafx.scene.Node;
30 | import javafx.scene.chart.PieChart;
31 | import javafx.scene.control.DatePicker;
32 | import javafx.scene.image.ImageView;
33 | import javafx.scene.input.MouseButton;
34 | import javafx.scene.layout.AnchorPane;
35 | import javafx.scene.layout.HBox;
36 | import javafx.scene.text.Text;
37 |
38 | public class StatisticsController implements Initializable {
39 |
40 | @FXML
41 | private AnchorPane rootStatistics;
42 |
43 | @FXML
44 | private AnchorPane rootDate;
45 |
46 | @FXML
47 | private PieChart pieChart;
48 |
49 | @FXML
50 | private Text title;
51 |
52 | @FXML
53 | private HBox hbox;
54 |
55 | @FXML
56 | private HBox hboxImage;
57 |
58 | @FXML
59 | private ImageView emptyImage;
60 |
61 | private final DatePicker datepicker = new DatePicker();
62 |
63 | private final DatePickerSkin datePickerSkin = new DatePickerSkin(datepicker);
64 |
65 | private final Node popupContent = datePickerSkin.getPopupContent();
66 |
67 | private final JFXPopup popup = new JFXPopup();
68 |
69 | private final ObservableList data = FXCollections.observableArrayList();
70 |
71 | @Override
72 | public void initialize(URL location, ResourceBundle resources) {
73 | setGraphics();
74 | setDatePicker();
75 | setPopup();
76 | setNodeStartupConfiguration();
77 | setAnimations();
78 | }
79 |
80 | private void setNodeStartupConfiguration() {
81 | popupContent.getStyleClass().addAll("jfx-date-picker");
82 | hboxImage.setVisible(true);
83 | hbox.setVisible(false);
84 | pieChart.setLegendVisible(false);
85 | }
86 |
87 | private void setAnimations() {
88 | Animations.fadeInUp(hboxImage);
89 | Animations.fadeInUp(title);
90 | }
91 |
92 | private void setDatePicker() {
93 | popupContent.setVisible(false);
94 | rootDate.getChildren().add(popupContent);
95 | }
96 |
97 | private void setPopup() {
98 | popup.setPopupContent(rootDate);
99 |
100 | pieChart.setOnMouseClicked(ev -> {
101 | if (ev.getButton().equals(MouseButton.SECONDARY)) {
102 | popupContent.setVisible(true);
103 | popup.show(pieChart);
104 | popup.setAnchorX(ev.getScreenX());
105 | popup.setAnchorY(ev.getScreenY());
106 | }
107 | });
108 |
109 | hboxImage.setOnMouseClicked(ev -> {
110 | if (ev.getButton().equals(MouseButton.SECONDARY)) {
111 | popupContent.setVisible(true);
112 | popup.show(hboxImage);
113 | popup.setAnchorX(ev.getScreenX());
114 | popup.setAnchorY(ev.getScreenY());
115 | }
116 | });
117 |
118 | emptyImage.setOnMouseClicked(ev -> {
119 | if (ev.getButton().equals(MouseButton.SECONDARY)) {
120 | popupContent.setVisible(true);
121 | popup.show(emptyImage);
122 | popup.setAnchorX(ev.getScreenX());
123 | popup.setAnchorY(ev.getScreenY());
124 | }
125 | });
126 |
127 | rootStatistics.setOnMouseClicked(ev -> {
128 | if (ev.getButton().equals(MouseButton.SECONDARY)) {
129 | popupContent.setVisible(true);
130 | popup.show(rootStatistics);
131 | popup.setAnchorX(ev.getScreenX());
132 | popup.setAnchorY(ev.getScreenY());
133 | }
134 | });
135 | }
136 |
137 | private void setGraphics() {
138 | datepicker.setOnAction(ev -> {
139 |
140 | popup.hide();
141 |
142 | pieChart.getData().clear();
143 |
144 | java.sql.Date date = java.sql.Date.valueOf(datepicker.getValue());
145 |
146 | int count = DatabaseHelper.getCustomers(date);
147 | int count2 = DatabaseHelper.getQuotes(date);
148 | int count3 = DatabaseHelper.getProducts(date);
149 |
150 | if (count == 0 && count2 == 0 && count3 == 0) {
151 | hboxImage.setVisible(true);
152 | hbox.setVisible(false);
153 | new FadeIn(hboxImage).play();
154 | } else {
155 | hboxImage.setVisible(false);
156 | hbox.setVisible(true);
157 |
158 | PieChart.Data one = new PieChart.Data("Total customers: " + count, count);
159 | data.add(one);
160 | pieChart.setData(data);
161 | Animations.hover(one.getNode(), 50, 1.1);
162 |
163 | PieChart.Data two = new PieChart.Data("Total quotes: " + count2, count2);
164 | data.add(two);
165 | pieChart.setData(data);
166 | Animations.hover(two.getNode(), 50, 1.1);
167 |
168 | PieChart.Data three = new PieChart.Data("Total products: " + count3, count3);
169 | data.add(three);
170 | pieChart.setData(data);
171 | Animations.hover(three.getNode(), 50, 1.1);
172 | }
173 | pieChart.setData(data);
174 | });
175 | }
176 | }
177 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/database/DBElectronicStoreToolFX.sql:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | DROP DATABASE IF EXISTS DBElectronicStoreToolFX;
17 | CREATE DATABASE DBElectronicStoreToolFX;
18 | USE DBElectronicStoreToolFX;
19 |
20 | CREATE TABLE Customers (
21 | id INT NOT NULL AUTO_INCREMENT,
22 | customerName VARCHAR(150) NOT NULL,
23 | customerNumber VARCHAR(50) NOT NULL,
24 | customerEmail VARCHAR(150) NOT NULL,
25 | it VARCHAR(50) NOT NULL,
26 | insertionDate DATE NOT NULL,
27 | PRIMARY KEY (id)
28 | );
29 |
30 | CREATE TABLE Quotes (
31 | id INT NOT NULL AUTO_INCREMENT,
32 | descriptionQuote LONGTEXT NOT NULL,
33 | requestDate DATE NOT NULL,
34 | price DOUBLE NULL,
35 | existence VARCHAR(20) NOT NULL,
36 | realization VARCHAR(20) NOT NULL,
37 | report VARCHAR (20) NOT NULL,
38 | customerId INT NOT NULL,
39 | PRIMARY KEY (id),
40 | CONSTRAINT FOREIGN KEY (customerId)
41 | REFERENCES Customers (id)
42 | ON DELETE CASCADE
43 | );
44 |
45 | CREATE TABLE Products (
46 | id INT NOT NULL AUTO_INCREMENT,
47 | barcode VARCHAR(25) NOT NULL,
48 | productName LONGTEXT NOT NULL,
49 | purchasePrice DOUBLE NOT NULL,
50 | porcentage INT NOT NULL,
51 | salePrice DOUBLE NOT NULL,
52 | minimalPrice DOUBLE NOT NULL,
53 | descriptionProduct LONGTEXT NOT NULL,
54 | imageProduct MEDIUMBLOB NOT NULL,
55 | insertionDate DATE NOT NULL,
56 | PRIMARY KEY (id)
57 | );
58 |
59 | CREATE TABLE Users (
60 | id INT NOT NULL AUTO_INCREMENT,
61 | nameUser VARCHAR(150) NOT NULL,
62 | email VARCHAR(150) NOT NULL,
63 | pass VARCHAR(150) NOT NULL,
64 | biography LONGTEXT NOT NULL,
65 | dialogTransition VARCHAR(150) NOT NULL,
66 | userType VARCHAR(150) NOT NULL,
67 | profileImage LONGBLOB NOT NULL,
68 | PRIMARY KEY (id)
69 | );
70 |
71 | CREATE TABLE UserSession (
72 | id INT NOT NULL AUTO_INCREMENT,
73 | userId INT NOT NULL,
74 | PRIMARY KEY (id),
75 | CONSTRAINT FOREIGN KEY (userId)
76 | REFERENCES Users (id)
77 | );
78 |
79 | CREATE TRIGGER triggerAddCustomerInsertDate BEFORE INSERT ON Customers
80 | FOR EACH ROW SET NEW.insertionDate = NOW();
81 |
82 | CREATE TRIGGER triggerAddProductInsertDate BEFORE INSERT ON Products
83 | FOR EACH ROW SET NEW.insertionDate = NOW();
84 |
85 | CREATE TRIGGER triggerAddDialogTransition BEFORE INSERT ON Users
86 | FOR EACH ROW SET NEW.dialogTransition = "CENTER";
87 |
88 | CREATE TRIGGER triggerAddBiography BEFORE INSERT ON Users
89 | FOR EACH ROW SET NEW.biography = "Every day is a new opportunity to change your life.";
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/database/DatabaseConnection.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.database;
17 |
18 | import com.laynezcoder.estfx.resources.Constants;
19 | import java.io.PrintWriter;
20 | import java.io.StringWriter;
21 | import java.sql.Connection;
22 | import java.sql.DriverManager;
23 | import java.sql.SQLException;
24 | import java.util.logging.Level;
25 | import java.util.logging.Logger;
26 | import javafx.scene.control.Alert;
27 | import javafx.scene.control.Label;
28 | import javafx.scene.control.TextArea;
29 | import javafx.scene.layout.GridPane;
30 | import javafx.scene.layout.Priority;
31 | import javafx.stage.StageStyle;
32 |
33 | public class DatabaseConnection {
34 |
35 | private Connection connection;
36 | private static DatabaseConnection instance;
37 | private static final String DATABASE = "DBElectronicStoreToolFX";
38 | private static final String TIME_ZONE = "?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC";
39 | private static final String URL = "jdbc:mysql://localhost:3306/" + DATABASE + TIME_ZONE;
40 | private static final String USER = "root";
41 | private static final String PASSWORD = "admin";
42 |
43 | private DatabaseConnection() {
44 | try {
45 | connection = DriverManager.getConnection(URL, USER, PASSWORD);
46 | } catch (SQLException ex) {
47 | Logger.getLogger(DatabaseConnection.class.getName()).log(Level.SEVERE, null, ex);
48 | showException(Constants.MESSAGE_ERROR_CONNECTION_MYSQL, ex);
49 | }
50 | }
51 |
52 | public static DatabaseConnection getInstance() {
53 | if (instance == null) {
54 | instance = new DatabaseConnection();
55 | }
56 | return instance;
57 | }
58 |
59 | public Connection getConnection() {
60 | return connection;
61 | }
62 |
63 | private void showException(String message, Exception exception) {
64 | Alert alert = new Alert(Alert.AlertType.ERROR);
65 | alert.initStyle(StageStyle.UTILITY);
66 | alert.setTitle("Exception");
67 | alert.setHeaderText(Alert.AlertType.ERROR.toString());
68 | alert.setContentText(message);
69 |
70 | StringWriter sw = new StringWriter();
71 | PrintWriter pw = new PrintWriter(sw);
72 | exception.printStackTrace(pw);
73 | String exceptionText = sw.toString();
74 |
75 | Label label = new Label("Details:");
76 |
77 | TextArea textArea = new TextArea(exceptionText);
78 | textArea.setEditable(false);
79 | textArea.setWrapText(true);
80 |
81 | textArea.setMaxWidth(Double.MAX_VALUE);
82 | textArea.setMaxHeight(Double.MAX_VALUE);
83 | GridPane.setVgrow(textArea, Priority.ALWAYS);
84 | GridPane.setHgrow(textArea, Priority.ALWAYS);
85 |
86 | GridPane expContent = new GridPane();
87 | expContent.setMaxWidth(Double.MAX_VALUE);
88 | expContent.add(label, 0, 0);
89 | expContent.add(textArea, 0, 1);
90 |
91 | alert.getDialogPane().setExpandableContent(expContent);
92 |
93 | alert.showAndWait();
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/mask/RequieredFieldsValidators.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.mask;
17 |
18 | import com.jfoenix.controls.JFXComboBox;
19 | import com.jfoenix.controls.JFXDatePicker;
20 | import com.jfoenix.controls.JFXPasswordField;
21 | import com.jfoenix.controls.JFXTextArea;
22 | import com.jfoenix.controls.JFXTextField;
23 | import com.jfoenix.validation.RequiredFieldValidator;
24 | import de.jensd.fx.glyphs.fontawesome.FontAwesomeIcon;
25 | import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView;
26 |
27 | public class RequieredFieldsValidators {
28 |
29 | private static final FontAwesomeIcon WARNING_ICON = FontAwesomeIcon.EXCLAMATION_TRIANGLE;
30 |
31 | private static final String MESSAGE = "Obligatory field";
32 |
33 | public static void toJFXTextField(JFXTextField txt) {
34 | RequiredFieldValidator validator = new RequiredFieldValidator(MESSAGE);
35 | validator.setIcon(new FontAwesomeIconView(WARNING_ICON));
36 |
37 | txt.getValidators().add(validator);
38 | txt.focusedProperty().addListener((o, oldVal, newVal) -> {
39 | if (!newVal) {
40 | txt.validate();
41 | }
42 | });
43 | }
44 |
45 | public static void toJFXPasswordField(JFXPasswordField txt) {
46 | RequiredFieldValidator validator = new RequiredFieldValidator(MESSAGE);
47 | validator.setIcon(new FontAwesomeIconView(WARNING_ICON));
48 |
49 | txt.getValidators().add(validator);
50 | txt.focusedProperty().addListener((o, oldVal, newVal) -> {
51 | if (!newVal) {
52 | txt.validate();
53 | }
54 | });
55 | }
56 |
57 | public static void toJFXTextArea(JFXTextArea txt) {
58 | RequiredFieldValidator validator = new RequiredFieldValidator(MESSAGE);
59 | validator.setIcon(new FontAwesomeIconView(WARNING_ICON));
60 |
61 | txt.getValidators().add(validator);
62 | txt.focusedProperty().addListener((o, oldVal, newVal) -> {
63 | if (!newVal) {
64 | txt.validate();
65 | }
66 | });
67 | }
68 |
69 | public static void toJFXComboBox(JFXComboBox comboBox) {
70 | RequiredFieldValidator validator = new RequiredFieldValidator(MESSAGE);
71 | validator.setIcon(new FontAwesomeIconView(WARNING_ICON));
72 |
73 | comboBox.getValidators().add(validator);
74 | comboBox.focusedProperty().addListener((o, oldVal, newVal) -> {
75 | if (!newVal) {
76 | comboBox.validate();
77 | }
78 | });
79 | }
80 |
81 | public static void toJFXDatePicker(JFXDatePicker datePicker) {
82 | RequiredFieldValidator validator = new RequiredFieldValidator(MESSAGE);
83 | validator.setIcon(new FontAwesomeIconView(WARNING_ICON));
84 |
85 | datePicker.getValidators().add(validator);
86 | datePicker.focusedProperty().addListener((o, oldVal, newVal) -> {
87 | if (!newVal) {
88 | datePicker.validate();
89 | }
90 | });
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/mask/TextFieldMask.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.mask;
17 |
18 | import java.util.function.UnaryOperator;
19 | import java.util.regex.Pattern;
20 | import javafx.application.Platform;
21 | import javafx.scene.control.TextArea;
22 | import javafx.scene.control.TextField;
23 | import javafx.scene.control.TextFormatter;
24 |
25 | public class TextFieldMask {
26 |
27 | public static void onlyDoubleNumbers5Integers(TextField txt) {
28 | txt.textProperty().addListener((observable, oldValue, newValue) -> {
29 | if (!newValue.matches("\\d{0,5}([\\.]\\d{0,2})?")) {
30 | txt.setText(oldValue);
31 | }
32 | });
33 | }
34 |
35 | public static void onlyDoubleNumbers10Integers(TextField txt) {
36 | txt.textProperty().addListener((observable, oldValue, newValue) -> {
37 | if (!newValue.matches("\\d{0,10}([\\.]\\d{0,2})?")) {
38 | txt.setText(oldValue);
39 | }
40 | });
41 | }
42 |
43 | public static void onlyNumbers(TextField txt) {
44 | txt.textProperty().addListener((observable, oldValue, newValue) -> {
45 | if (!newValue.matches("\\d*")) {
46 | txt.setText(oldValue);
47 | }
48 | });
49 | }
50 |
51 | public static void onlyLetters(TextField txt, int limit) {
52 | Pattern pattern = Pattern.compile("[a-zA-Z\\s]*");
53 | UnaryOperator filter = change -> {
54 | if (pattern.matcher(change.getControlNewText()).matches()) {
55 | int newLength = change.getControlNewText().length();
56 | if (newLength > limit) {
57 | String trimmedText = change.getControlNewText().substring(0, limit);
58 | change.setText(trimmedText);
59 | int oldLength = change.getControlText().length();
60 | change.setRange(0, oldLength);
61 | }
62 | return change;
63 | } else {
64 | return null;
65 | }
66 | };
67 | TextFormatter formatter = new TextFormatter<>(filter);
68 | txt.setTextFormatter(formatter);
69 | }
70 |
71 | public static void onlyNumbersAndLettersNotSpaces(TextField txt, int limit) {
72 | Pattern pattern = Pattern.compile("[a-zA-Z\\d]*");
73 | UnaryOperator filter = change -> {
74 | if (pattern.matcher(change.getControlNewText()).matches()) {
75 | int newLength = change.getControlNewText().length();
76 | if (newLength > limit) {
77 | String trimmedText = change.getControlNewText().substring(0, limit);
78 | change.setText(trimmedText);
79 | int oldLength = change.getControlText().length();
80 | change.setRange(0, oldLength);
81 | }
82 | return change;
83 | } else {
84 | return null;
85 | }
86 | };
87 | TextFormatter formatter = new TextFormatter<>(filter);
88 | txt.setTextFormatter(formatter);
89 | }
90 |
91 | public static void characterLimit(TextField textField, int limit) {
92 | UnaryOperator textLimitFilter = change -> {
93 | if (change.isContentChange()) {
94 | int newLength = change.getControlNewText().length();
95 | if (newLength > limit) {
96 | String trimmedText = change.getControlNewText().substring(0, limit);
97 | change.setText(trimmedText);
98 | int oldLength = change.getControlText().length();
99 | change.setRange(0, oldLength);
100 | }
101 | }
102 | return change;
103 | };
104 | textField.setTextFormatter(new TextFormatter(textLimitFilter));
105 | }
106 |
107 | public static void setTextIfFieldIsEmpty(TextField text) {
108 | text.focusedProperty().addListener((observable, oldValue, newValue) -> {
109 | if (text.getText().isEmpty() && newValue) {
110 | text.setText("0");
111 | }
112 | });
113 | }
114 |
115 | public static void selectText(TextField txt) {
116 | txt.focusedProperty().addListener((o, oldVal, newVal) -> {
117 | Platform.runLater(() -> {
118 | if (!txt.getText().isEmpty() && newVal) {
119 | txt.selectAll();
120 | }
121 | });
122 | });
123 | }
124 |
125 | public static void selectTextToJFXTextArea(TextArea txt) {
126 | txt.focusedProperty().addListener((o, oldVal, newVal) -> {
127 | Platform.runLater(() -> {
128 | if (!txt.getText().isEmpty() && newVal) {
129 | txt.selectAll();
130 | }
131 | });
132 | });
133 | }
134 | }
135 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/models/Customers.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.models;
17 |
18 | import java.sql.Date;
19 |
20 | public class Customers {
21 | private Integer id;
22 | private String customerName;
23 | private String customerNumber;
24 | private String customerEmail;
25 | private String it;
26 | private Date insertionDate;
27 |
28 | public Customers() {
29 | }
30 |
31 | public Customers(Integer id, String customerName) {
32 | this.id = id;
33 | this.customerName = customerName;
34 | }
35 |
36 | public Customers(Integer id, String customerName, String customerNumber, String customerEmail, String it) {
37 | this.id = id;
38 | this.customerName = customerName;
39 | this.customerNumber = customerNumber;
40 | this.customerEmail = customerEmail;
41 | this.it = it;
42 | }
43 |
44 | public Customers(Integer id, String customerName, String customerNumber, String customerEmail, String it, Date insertionDate) {
45 | this.id = id;
46 | this.customerName = customerName;
47 | this.customerNumber = customerNumber;
48 | this.customerEmail = customerEmail;
49 | this.it = it;
50 | this.insertionDate = insertionDate;
51 | }
52 |
53 | public Integer getId() {
54 | return id;
55 | }
56 |
57 | public void setId(Integer id) {
58 | this.id = id;
59 | }
60 |
61 | public String getCustomerName() {
62 | return customerName;
63 | }
64 |
65 | public void setCustomerName(String customerName) {
66 | this.customerName = customerName;
67 | }
68 |
69 | public String getCustomerNumber() {
70 | return customerNumber;
71 | }
72 |
73 | public void setCustomerNumber(String customerNumber) {
74 | this.customerNumber = customerNumber;
75 | }
76 |
77 | public String getCustomerEmail() {
78 | return customerEmail;
79 | }
80 |
81 | public void setCustomerEmail(String customerEmail) {
82 | this.customerEmail = customerEmail;
83 | }
84 |
85 | public String getIt() {
86 | return it;
87 | }
88 |
89 | public void setIt(String it) {
90 | this.it = it;
91 | }
92 |
93 | public Date getInsertionDate() {
94 | return insertionDate;
95 | }
96 |
97 | public void setInsertionDate(Date insertionDate) {
98 | this.insertionDate = insertionDate;
99 | }
100 |
101 | @Override
102 | public String toString (){
103 | return getId()+ " | " + getCustomerName();
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/models/Products.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.models;
17 |
18 | import java.io.InputStream;
19 |
20 | public class Products {
21 | private Integer id;
22 | private String barcode;
23 | private String productName;
24 | private Double purchasePrice;
25 | private Integer porcentage;
26 | private Double salePrice;
27 | private Double minimalPrice;
28 | private String descriptionProduct;
29 | private InputStream productImage;
30 |
31 | public Products() {
32 | }
33 |
34 | public Products(Integer id, String barcode, String productName, Double purchasePrice, Integer porcentage, Double salePrice, Double minimalPrice, String descriptionProduct) {
35 | this.id = id;
36 | this.barcode = barcode;
37 | this.productName = productName;
38 | this.purchasePrice = purchasePrice;
39 | this.porcentage = porcentage;
40 | this.salePrice = salePrice;
41 | this.minimalPrice = minimalPrice;
42 | this.descriptionProduct = descriptionProduct;
43 | }
44 |
45 | public Products(Integer id, String barcode, String productName, Double purchasePrice, Integer porcentage, Double salePrice, Double minimalPrice, String descriptionProduct, InputStream productImage) {
46 | this.id = id;
47 | this.barcode = barcode;
48 | this.productName = productName;
49 | this.purchasePrice = purchasePrice;
50 | this.porcentage = porcentage;
51 | this.salePrice = salePrice;
52 | this.minimalPrice = minimalPrice;
53 | this.descriptionProduct = descriptionProduct;
54 | this.productImage = productImage;
55 | }
56 |
57 | public Integer getId() {
58 | return id;
59 | }
60 |
61 | public void setId(Integer id) {
62 | this.id = id;
63 | }
64 |
65 | public String getBarcode() {
66 | return barcode;
67 | }
68 |
69 | public void setBarcode(String barcode) {
70 | this.barcode = barcode;
71 | }
72 |
73 | public String getProductName() {
74 | return productName;
75 | }
76 |
77 | public void setProductName(String productName) {
78 | this.productName = productName;
79 | }
80 |
81 | public Double getPurchasePrice() {
82 | return purchasePrice;
83 | }
84 |
85 | public void setPurchasePrice(Double purchasePrice) {
86 | this.purchasePrice = purchasePrice;
87 | }
88 |
89 | public Integer getPorcentage() {
90 | return porcentage;
91 | }
92 |
93 | public void setPorcentage(Integer porcentage) {
94 | this.porcentage = porcentage;
95 | }
96 |
97 | public Double getSalePrice() {
98 | return salePrice;
99 | }
100 |
101 | public void setSalePrice(Double salePrice) {
102 | this.salePrice = salePrice;
103 | }
104 |
105 | public Double getMinimalPrice() {
106 | return minimalPrice;
107 | }
108 |
109 | public void setMinimalPrice(Double minimalPrice) {
110 | this.minimalPrice = minimalPrice;
111 | }
112 |
113 | public String getDescriptionProduct() {
114 | return descriptionProduct;
115 | }
116 |
117 | public void setDescriptionProduct(String descriptionProduct) {
118 | this.descriptionProduct = descriptionProduct;
119 | }
120 |
121 | public InputStream getProductImage() {
122 | return productImage;
123 | }
124 |
125 | public void setProductImage(InputStream productImage) {
126 | this.productImage = productImage;
127 | }
128 | }
129 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/models/Quotes.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.models;
17 |
18 | import java.util.Date;
19 |
20 | public class Quotes {
21 |
22 | private Integer id;
23 | private String descriptionQuote;
24 | private Date requestDate;
25 | private Double price;
26 | private String existence;
27 | private String realization;
28 | private String report;
29 | private Integer customerId;
30 | private String customerName;
31 |
32 | public Quotes() {
33 | }
34 |
35 | public Quotes(Integer id, String descriptionQuote, Date requestDate, Double price, String existence, String realization, String report, String customerName) {
36 | this.id = id;
37 | this.descriptionQuote = descriptionQuote;
38 | this.requestDate = requestDate;
39 | this.price = price;
40 | this.existence = existence;
41 | this.realization = realization;
42 | this.report = report;
43 | this.customerName = customerName;
44 | }
45 |
46 | public Integer getId() {
47 | return id;
48 | }
49 |
50 | public void setId(Integer id) {
51 | this.id = id;
52 | }
53 |
54 | public String getDescriptionQuote() {
55 | return descriptionQuote;
56 | }
57 |
58 | public void setDescriptionQuote(String descriptionQuote) {
59 | this.descriptionQuote = descriptionQuote;
60 | }
61 |
62 | public Date getRequestDate() {
63 | return requestDate;
64 | }
65 |
66 | public void setRequestDate(Date requestDate) {
67 | this.requestDate = requestDate;
68 | }
69 |
70 | public Double getPrice() {
71 | return price;
72 | }
73 |
74 | public void setPrice(Double price) {
75 | this.price = price;
76 | }
77 |
78 | public String getExistence() {
79 | return existence;
80 | }
81 |
82 | public void setExistence(String existence) {
83 | this.existence = existence;
84 | }
85 |
86 | public String getRealization() {
87 | return realization;
88 | }
89 |
90 | public void setRealization(String realization) {
91 | this.realization = realization;
92 | }
93 |
94 | public String getReport() {
95 | return report;
96 | }
97 |
98 | public void setReport(String report) {
99 | this.report = report;
100 | }
101 |
102 | public Integer getCustomerId() {
103 | return customerId;
104 | }
105 |
106 | public void setCustomerId(Integer customerId) {
107 | this.customerId = customerId;
108 | }
109 |
110 | public String getCustomerName() {
111 | return customerName;
112 | }
113 |
114 | public void setCustomerName(String customerName) {
115 | this.customerName = customerName;
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/models/Users.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.models;
17 |
18 | import java.io.InputStream;
19 |
20 | public class Users {
21 |
22 | private Integer id;
23 | private String nameUser;
24 | private String email;
25 | private String pass;
26 | private String biography;
27 | private String dialogTransition;
28 | private String userType;
29 | private InputStream profileImage;
30 |
31 | public Users() {
32 | }
33 |
34 | public Users(String nameUser, String email, String pass, String userType) {
35 | this.nameUser = nameUser;
36 | this.email = email;
37 | this.pass = pass;
38 | this.userType = userType;
39 | }
40 |
41 | public Users(Integer id, String nameUser, String email, String pass, String biography, String dialogTransition, String userType) {
42 | this.id = id;
43 | this.nameUser = nameUser;
44 | this.email = email;
45 | this.pass = pass;
46 | this.biography = biography;
47 | this.dialogTransition = dialogTransition;
48 | this.userType = userType;
49 | }
50 |
51 | public Users(Integer id, String nameUser, String email, String pass, String userType) {
52 | this.id = id;
53 | this.nameUser = nameUser;
54 | this.email = email;
55 | this.pass = pass;
56 | this.userType = userType;
57 | }
58 |
59 | public Integer getId() {
60 | return id;
61 | }
62 |
63 | public void setId(Integer id) {
64 | this.id = id;
65 | }
66 |
67 | public String getNameUser() {
68 | return nameUser;
69 | }
70 |
71 | public void setNameUser(String nameUser) {
72 | this.nameUser = nameUser;
73 | }
74 |
75 | public String getEmail() {
76 | return email;
77 | }
78 |
79 | public void setEmail(String email) {
80 | this.email = email;
81 | }
82 |
83 | public String getPass() {
84 | return pass;
85 | }
86 |
87 | public void setPass(String pass) {
88 | this.pass = pass;
89 | }
90 |
91 | public String getBiography() {
92 | return biography;
93 | }
94 |
95 | public void setBiography(String biography) {
96 | this.biography = biography;
97 | }
98 |
99 | public String getDialogTransition() {
100 | return dialogTransition;
101 | }
102 |
103 | public void setDialogTransition(String dialogTransition) {
104 | this.dialogTransition = dialogTransition;
105 | }
106 |
107 | public InputStream getProfileImage() {
108 | return profileImage;
109 | }
110 |
111 | public void setProfileImage(InputStream imageProfile) {
112 | this.profileImage = imageProfile;
113 | }
114 |
115 | public String getUserType() {
116 | return userType;
117 | }
118 |
119 | public void setUserType(String userType) {
120 | this.userType = userType;
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/notifications/NotificationType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.notifications;
17 |
18 | public enum NotificationType {
19 | INFORMATION, ERROR, SUCCESS, INVALID_ACTION
20 | }
21 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/notifications/NotificationsBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.notifications;
17 |
18 | import com.laynezcoder.estfx.resources.Constants;
19 | import javafx.geometry.Pos;
20 | import javafx.scene.image.Image;
21 | import javafx.scene.image.ImageView;
22 | import javafx.util.Duration;
23 | import org.controlsfx.control.Notifications;
24 |
25 | public class NotificationsBuilder {
26 |
27 | private static Image icon;
28 |
29 | private static String title;
30 |
31 | public static void create(NotificationType type, String message) {
32 | setFunction(type);
33 | Notifications notifications = Notifications.create();
34 | notifications.title(title);
35 | notifications.text(message);
36 | notifications.graphic(new ImageView(icon));
37 | notifications.hideAfter(Duration.seconds(6));
38 | notifications.position(Pos.BASELINE_RIGHT);
39 | notifications.show();
40 | }
41 |
42 | private static void setFunction(NotificationType type) {
43 | switch (type) {
44 | case INFORMATION:
45 | title = "¡Information!";
46 | icon = new Image(Constants.INFORMATION_IMAGE);
47 | break;
48 |
49 | case ERROR:
50 | title = "¡Error!";
51 | icon = new Image(Constants.ERROR_IMAGE);
52 | break;
53 |
54 | case SUCCESS:
55 | title = "¡Success!";
56 | icon = new Image(Constants.SUCCESS_IMAGE);
57 | break;
58 |
59 | case INVALID_ACTION:
60 | title = "¡Invalid action!";
61 | icon = new Image(Constants.ERROR_IMAGE);
62 | break;
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/preferences/Preferences.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.preferences;
17 |
18 | import com.google.gson.Gson;
19 | import com.laynezcoder.estfx.notifications.NotificationType;
20 | import com.laynezcoder.estfx.notifications.NotificationsBuilder;
21 | import java.io.FileNotFoundException;
22 | import java.io.FileReader;
23 | import java.io.FileWriter;
24 | import java.io.IOException;
25 | import java.io.Writer;
26 | import java.util.logging.Level;
27 | import java.util.logging.Logger;
28 |
29 | public class Preferences {
30 |
31 | private static final String CONFIG_FILE = "config.txt";
32 |
33 | private static final String WARNING_MESSAGE = "The configuration file was not found. A new file will be created.";
34 |
35 | private String initialPathFileChooserProductsController;
36 |
37 | private String initialPathFileChooserSettingsController;
38 |
39 | public Preferences() {
40 | initialPathFileChooserProductsController = System.getProperty("user.home");
41 | initialPathFileChooserSettingsController = System.getProperty("user.home");
42 | }
43 |
44 | public static void initConfig() {
45 | Writer writer = null;
46 | try {
47 | Preferences preferences = new Preferences();
48 | Gson gson = new Gson();
49 | writer = new FileWriter(CONFIG_FILE);
50 | gson.toJson(preferences, writer);
51 | } catch (IOException ex) {
52 | Logger.getLogger(Preferences.class.getName()).log(Level.SEVERE, null, ex);
53 | } finally {
54 | try {
55 | writer.close();
56 | } catch (IOException ex) {
57 | Logger.getLogger(Preferences.class.getName()).log(Level.SEVERE, null, ex);
58 | }
59 | }
60 | }
61 |
62 | public static Preferences getPreferences() {
63 | Gson gson = new Gson();
64 | Preferences preferences = new Preferences();
65 | try {
66 | preferences= gson.fromJson(new FileReader(CONFIG_FILE), Preferences.class);
67 | } catch (FileNotFoundException ex) {
68 | initConfig();
69 | Logger.getLogger(Preferences.class.getName()).log(Level.SEVERE, WARNING_MESSAGE, ex);
70 | NotificationsBuilder.create(NotificationType.INFORMATION, WARNING_MESSAGE);
71 | }
72 | return preferences;
73 | }
74 |
75 | public static void writePreferencesToFile(Preferences preferences) {
76 | Writer writer = null;
77 | try {
78 | Gson gson = new Gson();
79 | writer = new FileWriter(CONFIG_FILE);
80 | gson.toJson(preferences, writer);
81 | } catch (IOException ex) {
82 | Logger.getLogger(Preferences.class.getName()).log(Level.SEVERE, null, ex);
83 | } finally {
84 | try {
85 | writer.close();
86 | } catch (IOException ex) {
87 | Logger.getLogger(Preferences.class.getName()).log(Level.SEVERE, null, ex);
88 | }
89 | }
90 | }
91 |
92 | public String getInitialPathFileChooserProductsController() {
93 | return initialPathFileChooserProductsController;
94 | }
95 |
96 | public void setInitialPathFileChooserProductsController(String path) {
97 | this.initialPathFileChooserProductsController = path;
98 | }
99 |
100 | public String getInitialPathFileChooserSettingsController() {
101 | return initialPathFileChooserSettingsController;
102 | }
103 |
104 | public void setInitialPathFileChooserSettingsController(String path) {
105 | this.initialPathFileChooserSettingsController = path;
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/resources/Constants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.resources;
17 |
18 | import javafx.scene.effect.BoxBlur;
19 |
20 | public class Constants {
21 |
22 | public static final String TITLE = "Electronic Store Tool FX";
23 | public static final Double MIN_WIDTH = 1040.00;
24 | public static final Double MIN_HEIGHT = 640.00;
25 |
26 | public static final String SOURCE_PACKAGES = "/com/laynezcoder/estfx";
27 | public static final String MEDIA_PACKAGE = "/resources/media/";
28 | public static final String VIEWS_PACKAGE = SOURCE_PACKAGES + "/views/";
29 | public static final String PROFILE_PICTURES_PACKAGE = MEDIA_PACKAGE + "profiles/";
30 | public static final String FONTS_PACKAGE = SOURCE_PACKAGES + "/fonts/";
31 |
32 | public static final String LOGIN_VIEW = VIEWS_PACKAGE + "LoginView.fxml";
33 | public static final String START_VIEW = VIEWS_PACKAGE + "StartView.fxml";
34 | public static final String MAIN_VIEW = VIEWS_PACKAGE + "MainView.fxml";
35 |
36 | public static final String STAGE_ICON = MEDIA_PACKAGE + "icon.png";
37 | public static final String NO_IMAGE_AVAILABLE = MEDIA_PACKAGE + "empty-image.jpg";
38 | public static final String INFORMATION_IMAGE = MEDIA_PACKAGE + "information.png";
39 | public static final String ERROR_IMAGE = MEDIA_PACKAGE + "error.png";
40 | public static final String SUCCESS_IMAGE = MEDIA_PACKAGE + "success.png";
41 |
42 | public static final String CSS_LIGHT_THEME = "/resources/LightTheme.css";
43 | public static final String LIGHT_THEME = Constants.class.getResource(CSS_LIGHT_THEME).toExternalForm();
44 |
45 | public static final String MESSAGE_ERROR_CONNECTION_MYSQL = "An error occurred when connecting to MySQL.\nCheck your connection to MySQL";
46 | public static final String MESSAGE_IMAGE_LARGE = "Please upload a picture smaller than 1 MB.";
47 | public static final String MESSAGE_IMAGE_NOT_FOUND = "Image not found. The record will be saved.";
48 | public static final String MESSAGE_INSUFFICIENT_DATA = "Insufficient data";
49 | public static final String MESSAGE_USER_ALREADY_EXISTS = "This user already exists";
50 | public static final String MESSAGE_PASSWORDS_NOT_MATCH = "Passwords do not match.";
51 | public static final String MESSAGE_ENTER_AT_LEAST_4_CHARACTERES = "Please enter at least 4 characters";
52 | public static final String MESSAGE_NO_RECORD_SELECTED = "Select an item from the table.";
53 |
54 | public static final String MESSAGE_ADDED = "Record added successfully";
55 | public static final String MESSAGE_UPDATED = "Record updated successfully";
56 | public static final String MESSAGE_DELETED = "Record deleted successfully";
57 |
58 | public static final String EXISTENT = "Existent";
59 | public static final String NOT_EXISTENT = "Not existent";
60 |
61 | public static final String REALIZED = "Realized";
62 | public static final String NOT_REALIZED = "Not realized";
63 |
64 | public static final String REPORTED = "Reported";
65 | public static final String NOT_REPORTED = "Not reported";
66 |
67 | public static final BoxBlur BOX_BLUR_EFFECT = new BoxBlur(3, 3, 3);
68 | }
69 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/util/AutocompleteComboBox.java:
--------------------------------------------------------------------------------
1 | package com.laynezcoder.estfx.util;
2 |
3 | import javafx.collections.FXCollections;
4 | import javafx.collections.ObservableList;
5 | import javafx.event.EventHandler;
6 | import javafx.scene.control.ComboBox;
7 | import javafx.scene.input.KeyCode;
8 | import javafx.scene.input.KeyEvent;
9 |
10 | /**
11 | * @autor Mateus Viccari by Stack Overflow https://stackoverflow.com/questions/19924852/autocomplete-combobox-in-javafx
12 | */
13 | public class AutocompleteComboBox {
14 |
15 | public interface AutoCompleteComparator {
16 | boolean matches(String typedText, T objectToCompare);
17 | }
18 |
19 | public static void autoCompleteComboBoxPlus(ComboBox comboBox, AutoCompleteComparator comparatorMethod) {
20 | ObservableList data = comboBox.getItems();
21 |
22 | comboBox.setEditable(true);
23 | comboBox.getEditor().focusedProperty().addListener(observable -> {
24 | if (comboBox.getSelectionModel().getSelectedIndex() < 0) {
25 | comboBox.getEditor().setText(null);
26 | }
27 | });
28 | comboBox.addEventHandler(KeyEvent.KEY_PRESSED, t -> comboBox.hide());
29 | comboBox.addEventHandler(KeyEvent.KEY_RELEASED, new EventHandler() {
30 |
31 | private boolean moveCaretToPos = false;
32 | private int caretPos;
33 |
34 | @Override
35 | public void handle(KeyEvent event) {
36 | if (event.getCode() == KeyCode.UP) {
37 | caretPos = -1;
38 | if (comboBox.getEditor().getText() != null) {
39 | moveCaret(comboBox.getEditor().getText().length());
40 | }
41 | return;
42 | } else if (event.getCode() == KeyCode.DOWN) {
43 | if (!comboBox.isShowing()) {
44 | comboBox.show();
45 | }
46 | caretPos = -1;
47 | if (comboBox.getEditor().getText() != null) {
48 | moveCaret(comboBox.getEditor().getText().length());
49 | }
50 | return;
51 | } else if (event.getCode() == KeyCode.BACK_SPACE) {
52 | if (comboBox.getEditor().getText() != null) {
53 | moveCaretToPos = true;
54 | caretPos = comboBox.getEditor().getCaretPosition();
55 | }
56 | } else if (event.getCode() == KeyCode.DELETE) {
57 | if (comboBox.getEditor().getText() != null) {
58 | moveCaretToPos = true;
59 | caretPos = comboBox.getEditor().getCaretPosition();
60 | }
61 | } else if (event.getCode() == KeyCode.ENTER) {
62 | return;
63 | }
64 |
65 | if (event.getCode() == KeyCode.RIGHT || event.getCode() == KeyCode.LEFT || event.getCode().equals(KeyCode.SHIFT) || event.getCode().equals(KeyCode.CONTROL)
66 | || event.isControlDown() || event.getCode() == KeyCode.HOME
67 | || event.getCode() == KeyCode.END || event.getCode() == KeyCode.TAB) {
68 | return;
69 | }
70 |
71 | ObservableList list = FXCollections.observableArrayList();
72 | for (T aData : data) {
73 | if (aData != null && comboBox.getEditor().getText() != null && comparatorMethod.matches(comboBox.getEditor().getText(), aData)) {
74 | list.add(aData);
75 | }
76 | }
77 | String t = "";
78 | if (comboBox.getEditor().getText() != null) {
79 | t = comboBox.getEditor().getText();
80 | }
81 |
82 | comboBox.setItems(list);
83 | comboBox.getEditor().setText(t);
84 | if (!moveCaretToPos) {
85 | caretPos = -1;
86 | }
87 | moveCaret(t.length());
88 | if (!list.isEmpty()) {
89 | comboBox.show();
90 | }
91 | }
92 |
93 | private void moveCaret(int textLength) {
94 | if (caretPos == -1) {
95 | comboBox.getEditor().positionCaret(textLength);
96 | } else {
97 | comboBox.getEditor().positionCaret(caretPos);
98 | }
99 | moveCaretToPos = false;
100 | }
101 | });
102 | }
103 |
104 | public static T getComboBoxValue(ComboBox comboBox){
105 | if (comboBox.getSelectionModel().getSelectedIndex() < 0) {
106 | return null;
107 | } else {
108 | return comboBox.getItems().get(comboBox.getSelectionModel().getSelectedIndex());
109 | }
110 | }
111 |
112 | }
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/util/ContextMenu.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.util;
17 |
18 | import com.jfoenix.controls.JFXButton;
19 | import com.jfoenix.controls.JFXPopup;
20 | import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon;
21 | import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIconView;
22 | import javafx.event.EventHandler;
23 | import javafx.geometry.Pos;
24 | import javafx.scene.Node;
25 | import javafx.scene.control.ContentDisplay;
26 | import javafx.scene.input.MouseButton;
27 | import javafx.scene.layout.VBox;
28 |
29 | public class ContextMenu {
30 |
31 | MaterialDesignIcon ICON_EDIT = MaterialDesignIcon.TABLE_EDIT;
32 |
33 | MaterialDesignIcon ICON_DELETE = MaterialDesignIcon.DELETE_VARIANT;
34 |
35 | MaterialDesignIcon ICON_DETAILS = MaterialDesignIcon.INFORMATION_OUTLINE;
36 |
37 | MaterialDesignIcon ICON_REFRESH = MaterialDesignIcon.REFRESH;
38 |
39 | private final JFXPopup popup;
40 |
41 | private final Node node;
42 |
43 | private JFXButton edit;
44 |
45 | private JFXButton delete;
46 |
47 | private JFXButton details;
48 |
49 | private JFXButton refresh;
50 |
51 | public ContextMenu(Node node) {
52 | this.node = node;
53 |
54 | popup = new JFXPopup();
55 | popup.setPopupContent(getContent());
56 | }
57 |
58 | public void setActionEdit(EventHandler action) {
59 | edit.setOnAction(action);
60 | }
61 |
62 | public void setActionDelete(EventHandler action) {
63 | delete.setOnAction(action);
64 | }
65 |
66 | public void setActionDetails(EventHandler action) {
67 | details.setOnAction(action);
68 | }
69 |
70 | public void setActionRefresh(EventHandler action) {
71 | refresh.setOnAction(action);
72 | }
73 |
74 | public void show() {
75 | node.setOnMouseClicked(ev -> {
76 | if (ev.getButton().equals(MouseButton.SECONDARY)) {
77 | popup.show(node);
78 | popup.setAnchorX(ev.getScreenX());
79 | popup.setAnchorY(ev.getScreenY());
80 | }
81 | });
82 | }
83 |
84 | public void hide() {
85 | popup.hide();
86 | }
87 |
88 | public JFXButton getEditButton() {
89 | return edit;
90 | }
91 |
92 | public JFXButton getDeleteButton() {
93 | return delete;
94 | }
95 |
96 | private VBox getContent() {
97 | edit = new JFXButton("Edit");
98 | edit.setGraphic(new MaterialDesignIconView(ICON_EDIT));
99 | edit.setAlignment(Pos.BASELINE_LEFT);
100 | edit.setContentDisplay(ContentDisplay.LEFT);
101 | style(edit);
102 |
103 | delete = new JFXButton("Delete");
104 | delete.setGraphic(new MaterialDesignIconView(ICON_DELETE));
105 | delete.setAlignment(Pos.BASELINE_LEFT);
106 | delete.setContentDisplay(ContentDisplay.LEFT);
107 | style(delete);
108 |
109 | details = new JFXButton("Details");
110 | details.setGraphic(new MaterialDesignIconView(ICON_DETAILS));
111 | details.setAlignment(Pos.BASELINE_LEFT);
112 | details.setContentDisplay(ContentDisplay.LEFT);
113 | style(details);
114 |
115 | refresh = new JFXButton("Refresh");
116 | refresh.setGraphic(new MaterialDesignIconView(ICON_REFRESH));
117 | refresh.setAlignment(Pos.BASELINE_LEFT);
118 | refresh.setContentDisplay(ContentDisplay.LEFT);
119 | style(refresh);
120 |
121 | VBox contextMenu = new VBox();
122 | contextMenu.setPrefSize(100, 130);
123 | contextMenu.getChildren().addAll(edit, delete, details, refresh);
124 |
125 | return contextMenu;
126 | }
127 |
128 | private void style(JFXButton button) {
129 | button.getStyleClass().add("button-context-menu");
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/util/CropImageProfile.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.util;
17 |
18 | import java.awt.Graphics2D;
19 | import java.awt.image.BufferedImage;
20 | import java.io.ByteArrayInputStream;
21 | import java.io.ByteArrayOutputStream;
22 | import java.io.File;
23 | import java.io.FileInputStream;
24 | import java.io.FileNotFoundException;
25 | import java.io.IOException;
26 | import java.io.InputStream;
27 | import java.util.logging.Level;
28 | import java.util.logging.Logger;
29 | import javafx.embed.swing.SwingFXUtils;
30 | import javafx.geometry.Bounds;
31 | import javafx.geometry.Rectangle2D;
32 | import javafx.scene.Group;
33 | import javafx.scene.SnapshotParameters;
34 | import javafx.scene.image.Image;
35 | import javafx.scene.image.ImageView;
36 | import javafx.scene.image.WritableImage;
37 | import javafx.scene.paint.Color;
38 | import javafx.scene.shape.Rectangle;
39 | import javax.imageio.ImageIO;
40 |
41 | public class CropImageProfile {
42 |
43 | private final String EXTENSION = "jpg";
44 |
45 | private ImageView imageView;
46 |
47 | private double imageHeight;
48 |
49 | private double imageWidth;
50 |
51 | private final File file;
52 |
53 | private InputStream outputStream;
54 |
55 | private InputStream inputStream;
56 |
57 | private Rectangle rect;
58 |
59 | private Group group;
60 |
61 | public CropImageProfile(File file) {
62 | this.file = file;
63 | createWorkSpace();
64 | }
65 |
66 | private void createWorkSpace() {
67 | group = new Group();
68 |
69 | try {
70 | inputStream = new FileInputStream(file);
71 | } catch (FileNotFoundException ex) {
72 | Logger.getLogger(CropImageProfile.class.getName()).log(Level.SEVERE, null, ex);
73 | }
74 |
75 | Image image = new Image(inputStream);
76 | imageHeight = image.getHeight();
77 | imageWidth = image.getWidth();
78 |
79 | imageView = new ImageView(image);
80 | imageView.setFitHeight(imageHeight);
81 | imageView.setFitWidth(imageWidth);
82 | imageView.setPreserveRatio(true);
83 |
84 | rect = new Rectangle();
85 | group.getChildren().addAll(imageView, rect);
86 |
87 | if (imageWidth > imageHeight) {
88 | rect.setWidth(imageHeight);
89 | rect.setHeight(imageHeight);
90 | rect.setX(imageWidth / 2 - imageHeight / 2);
91 | rect.setY(0);
92 | } else if (imageHeight > imageWidth) {
93 | rect.setWidth(imageWidth);
94 | rect.setHeight(imageWidth);
95 | rect.setX(0);
96 | rect.setY(imageHeight / 2 - imageWidth / 2);
97 | } else if (imageHeight == imageWidth) {
98 | group.getChildren().remove(rect);
99 | }
100 | }
101 |
102 | public InputStream getInputStream() throws FileNotFoundException {
103 | if (!group.getChildren().contains(rect)) {
104 | return new FileInputStream(file);
105 | } else {
106 | Bounds bounds = rect.getBoundsInParent();
107 | int width = (int) bounds.getWidth();
108 | int height = (int) bounds.getHeight();
109 |
110 | SnapshotParameters parameters = new SnapshotParameters();
111 | parameters.setFill(Color.TRANSPARENT);
112 | parameters.setViewport(new Rectangle2D(bounds.getMinX(), bounds.getMinY(), width, height));
113 |
114 | WritableImage wi = new WritableImage(width, height);
115 | imageView.snapshot(parameters, wi);
116 |
117 | BufferedImage bufImageARGB = SwingFXUtils.fromFXImage(wi, null);
118 | BufferedImage bufImageRGB = new BufferedImage(bufImageARGB.getWidth(), bufImageARGB.getHeight(), BufferedImage.OPAQUE);
119 |
120 | Graphics2D graphics = bufImageRGB.createGraphics();
121 | graphics.drawImage(bufImageARGB, 0, 0, null);
122 |
123 | ByteArrayOutputStream os = new ByteArrayOutputStream();
124 | try {
125 | ImageIO.write(bufImageRGB, EXTENSION, os);
126 | } catch (IOException ex) {
127 | Logger.getLogger(CropImageProfile.class.getName()).log(Level.SEVERE, null, ex);
128 | }
129 | outputStream = new ByteArrayInputStream(os.toByteArray());
130 | graphics.dispose();
131 | }
132 | return outputStream;
133 | }
134 | }
135 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/util/DefaultProfileImage.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.util;
17 |
18 | import com.laynezcoder.estfx.controllers.UsersController;
19 | import com.laynezcoder.estfx.resources.Constants;
20 | import java.io.FileNotFoundException;
21 | import java.io.InputStream;
22 |
23 | public class DefaultProfileImage {
24 |
25 | private static final String ABC = "abcdefghijklmnopqrstwxyz";
26 |
27 | public static InputStream getImage(String name) throws FileNotFoundException {
28 | InputStream inputStream = null;
29 |
30 | char character = name.toLowerCase().charAt(0);
31 |
32 | for (int i = 0; i < ABC.length(); i++) {
33 | if (ABC.charAt(i) == character) {
34 | inputStream = getProfilePictureFromPackage(String.valueOf(ABC.charAt(i)));
35 | }
36 | }
37 | return inputStream;
38 | }
39 |
40 | private static InputStream getProfilePictureFromPackage(String imageName) throws FileNotFoundException {
41 | return UsersController.class.getResourceAsStream(Constants.PROFILE_PICTURES_PACKAGE + imageName + ".png");
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/util/JFXDialogTool.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.laynezcoder.estfx.util;
17 |
18 | import com.jfoenix.controls.JFXDialog;
19 | import com.jfoenix.controls.events.JFXDialogEvent;
20 | import javafx.scene.layout.Background;
21 | import javafx.scene.layout.Region;
22 | import javafx.scene.layout.StackPane;
23 | import com.laynezcoder.estfx.database.DatabaseHelper;
24 | import javafx.event.EventHandler;
25 |
26 | public class JFXDialogTool {
27 |
28 | private final JFXDialog dialog;
29 |
30 | public JFXDialogTool(Region region, StackPane container) {
31 | dialog = new JFXDialog();
32 | dialog.setContent(region);
33 | dialog.setBackground(Background.EMPTY);
34 | dialog.setDialogContainer(container);
35 | dialog.getStyleClass().add("jfx-dialog-overlay-pane");
36 | dialog.setTransitionType(DatabaseHelper.dialogTransition());
37 | }
38 | public void setOnDialogOpened(EventHandler action) {
39 | dialog.setOnDialogOpened(action);
40 | }
41 |
42 | public void setOnDialogClosed(EventHandler action) {
43 | dialog.setOnDialogClosed(action);
44 | }
45 |
46 | public void show() {
47 | dialog.show();
48 | }
49 |
50 | public void close() {
51 | dialog.close();
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/views/AboutView.fxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/views/CustomersView.fxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/views/HomeView.fxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/views/LoginView.fxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/views/QuotesView.fxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/views/SettingsView.fxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/views/StatisticsView.fxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/src/com/laynezcoder/estfx/views/UsersView.fxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
--------------------------------------------------------------------------------
/src/resources/LightTheme.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | @font-face {
18 | src: url("rimouski.ttf");
19 | }
20 |
21 | * {
22 | -root: #f5f5f7;
23 | -primary: #2ab56f;
24 | -secondary: #bebec2;
25 | -delete: #f35f56;
26 | -hover: #2BA266;
27 | }
28 |
29 | .root {
30 | -fx-background-color: -root;
31 | }
32 |
33 | .h1 {
34 | -fx-font-size: 25;
35 | -fx-font-family: "Rimouski Sb";
36 | }
37 |
38 | .h2 {
39 | -fx-font-size: 20;
40 | -fx-font-family: "Rimouski Sb";
41 | }
42 |
43 | .h3 {
44 | -fx-font-size: 15;
45 | -fx-font-family: "Rimouski Sb";
46 | }
47 |
48 | .h4 {
49 | -fx-font-size: 14;
50 | -fx-font-family: "Rimouski Sb";
51 | }
52 |
53 | .h5 {
54 | -fx-font-size: 12;
55 | -fx-font-family: "Rimouski Sb";
56 | }
57 |
58 | .jfx-text-field {
59 | -fx-font-size: 14;
60 | -fx-accent: -primary;
61 | -jfx-focus-color: -primary;
62 | -jfx-unfocus-color: -secondary;
63 | }
64 |
65 | .jfx-text-field-login {
66 | -fx-font-size: 16;
67 | -fx-accent: -primary;
68 | -jfx-focus-color: -primary;
69 | -jfx-unfocus-color: -secondary;
70 | }
71 |
72 | .text-field-search {
73 | -fx-background-color: white;
74 | -fx-font-size: 12;
75 | -fx-accent: -primary;
76 | }
77 |
78 | .error-label {
79 | -fx-font-size: 10pt;
80 | }
81 |
82 | .button-general {
83 | -fx-background-color: -primary;
84 | -fx-font-family: "Rimouski Sb";
85 | -fx-font-size: 16;
86 | }
87 |
88 | .button-general .jfx-rippler {
89 | -jfx-rippler-fill: none;
90 | }
91 |
92 | .button-close {
93 | -fx-background-color: none;
94 | -fx-fill: -secondary;
95 | }
96 |
97 | .button-close .jfx-rippler {
98 | -jfx-rippler-fill: none;
99 | }
100 |
101 | .button-close:hover .glyph-icon {
102 | -fx-fill: black;
103 | }
104 |
105 | .main-view-button {
106 | -fx-background-color: #2d3037;
107 | -fx-text-fill: white;
108 | }
109 |
110 | .main-view-button .jfx-rippler {
111 | -jfx-rippler-fill: none;
112 | }
113 |
114 | .main-view-button:hover .glyph-icon,
115 | .main-view-button:pressed .glyph-icon {
116 | -fx-background-color: #76787c;
117 | -fx-fill: white;
118 | }
119 |
120 | .button-administrador {
121 | -fx-background-color: -primary;
122 | -fx-text-fill: white;
123 | }
124 |
125 | .button-administrador .jfx-rippler {
126 | -jfx-rippler-fill: none;
127 | }
128 |
129 | .button-user {
130 | -fx-background-color: #4A86FF;
131 | -fx-text-fill: white;
132 | }
133 |
134 | .button-user .jfx-rippler {
135 | -jfx-rippler-fill: none;
136 | }
137 |
138 | .button-no {
139 | -fx-pref-height: 15px;
140 | -fx-background-color: -delete;
141 | -fx-text-fill: white;
142 | }
143 |
144 | .button-no .jfx-rippler {
145 | -jfx-rippler-fill: none;
146 | }
147 |
148 | .button-yes {
149 | -fx-pref-height: 15px;
150 | -fx-background-color: -primary;
151 | -fx-text-fill: white;
152 | }
153 |
154 | .button-yes .jfx-rippler {
155 | -jfx-rippler-fill: none;
156 | }
157 |
158 | .table-view {
159 | -fx-background-color: white;
160 | }
161 |
162 | .table-cell {
163 | -fx-border-color: transparent;
164 | }
165 |
166 | .table-view .column-header,
167 | .table-view .column-header-background .filler {
168 | -fx-cell-size : 20;
169 | -fx-background-color: white;
170 | }
171 |
172 | .table-view .column-header .label {
173 | -fx-font-size: 16;
174 | -fx-text-fill: -secondary;
175 | -fx-alignment: CENTER_LEFT;
176 | }
177 |
178 | .table-view .cell {
179 | -fx-cell-size: 30;
180 | -fx-text-fill: #000000;
181 | -fx-font-size: 15;
182 | -fx-alignment: CENTER_LEFT;
183 | }
184 |
185 | .table-row-cell:selected {
186 | -fx-background-color: -secondary;
187 | }
188 |
189 | .table-row-cell:selected .text {
190 | -fx-fill: white;
191 | }
192 |
193 | .action-button {
194 | -fx-font-size: 12;
195 | -fx-font-family: "Rimouski Sb";
196 | -fx-background-color: -primary;
197 | -fx-text-fill: white;
198 | }
199 |
200 | .action-button .jfx-rippler {
201 | -jfx-rippler-fill: none;
202 | }
203 |
204 | .button-cancel {
205 | -fx-font-family: "Rimouski Sb";
206 | -fx-font-size: 12;
207 | -fx-background-color: white;
208 | -fx-border-color: -secondary;
209 | -fx-text-fill: -secondary;
210 | }
211 |
212 | .button-cancel .jfx-rippler {
213 | -jfx-rippler-fill: none;
214 | }
215 |
216 | .button-delete {
217 | -fx-font-family: "Rimouski Sb";
218 | -fx-background-color: -delete;
219 | -fx-text-fill: white;
220 | }
221 |
222 | .button-delete .jfx-rippler {
223 | -jfx-rippler-fill: none;
224 | }
225 |
226 | .menu-item .label {
227 | -fx-text-fill: grey;
228 | -fx-fill: black;
229 | -fx-font-size: 15;
230 | }
231 |
232 | .menu-item:hover,
233 | .menu-item:focused,
234 | .menu-item:focused .label {
235 | -fx-background-color: -primary;
236 | -fx-text-fill: white;
237 | -fx-fill: black;
238 | }
239 |
240 | .menu-item:hover .glyph-icon,
241 | .menu-item:focused .glyph-icon {
242 | -fx-background-color: -primary;
243 | -fx-text-fill: white;
244 | -fx-fill: white;
245 | }
246 |
247 | .jfx-date-picker {
248 | -jfx-default-color: -primary;
249 | -fx-font-size: 14;
250 | }
251 |
252 | .jfx-date-picker .arrow-button .arrow {
253 | -fx-background-color: white;
254 | }
255 |
256 | .jfx-date-picker .cell:focused {
257 | -fx-background-color: -primary;
258 | -fx-text-fill: white;
259 | }
260 |
261 | .jfx-date-picker .cell:hover {
262 | -fx-background-color: -primary;
263 | -fx-text-fill: white;
264 | }
265 |
266 | .jfx-svg-glyph {
267 | -fx-shape: "M328.139,32.267h-2.941v-2.11C325.197,13.527,311.668,0,295.041,0c-16.627,0-30.156,13.527-30.156,30.157v2.11h-34.73 v-2.11C230.154,13.527,216.625,0,200,0c-16.627,0-30.156,13.527-30.156,30.157v2.11h-34.73v-2.11 C135.113,13.527,121.584,0,104.957,0C88.332,0,74.803,13.527,74.803,30.157v2.11h-2.943c-24.789,0-44.887,20.096-44.887,44.886 v277.962c0,24.79,20.098,44.886,44.887,44.886h256.279c24.789,0,44.889-20.096,44.889-44.886V77.152 C373.027,52.362,352.93,32.267,328.139,32.267z M286.816,30.157c0-4.536,3.689-8.224,8.225-8.224c4.535,0,8.223,3.688,8.223,8.224 v40.127c0,4.534-3.688,8.223-8.223,8.223c-4.535,0-8.225-3.689-8.225-8.223V30.157z M191.777,30.157 c0-4.536,3.688-8.224,8.223-8.224s8.223,3.688,8.223,8.224v40.127c0,4.534-3.688,8.223-8.223,8.223s-8.223-3.689-8.223-8.223 V30.157z M96.736,30.157c0-4.536,3.686-8.224,8.221-8.224c4.535,0,8.227,3.688,8.227,8.224v40.127c0,4.534-3.691,8.223-8.227,8.223 c-4.535,0-8.221-3.689-8.221-8.223V30.157z M337.117,353.453c0,5.867-4.029,10.639-8.978,10.639H71.859 c-4.949,0-8.977-4.771-8.977-10.639V118.955h274.234V353.453z";
268 | }
269 |
270 | .jfx-combo-box {
271 | -fx-accent: -primary;
272 | -fx-font-size: 14;
273 | -fx-background-color: transparent;
274 | -jfx-focus-color: -primary;
275 | -jfx-unfocus-color: -secondary;
276 | }
277 |
278 | .jfx-combo-box .jfx-rippler {
279 | -jfx-rippler-fill: none;
280 | }
281 |
282 | .combo-box-popup .list-cell {
283 | -fx-background-color: white;
284 | -fx-text-fill: black;
285 | }
286 |
287 | .combo-box-popup .list-view .list-cell:filled:hover {
288 | -fx-background-color: -primary;
289 | -fx-text-fill: white;
290 | }
291 |
292 | .jfx-dialog-overlay-pane > StackPane {
293 | -fx-background-radius: 10;
294 | -fx-background-color: white;
295 | }
296 |
297 | .data0.chart-pie {
298 | -fx-pie-color: -primary;
299 | }
300 |
301 | .data1.chart-pie {
302 | -fx-pie-color: #2BA266;
303 | }
304 |
305 | .data2.chart-pie {
306 | -fx-pie-color: #41C474;
307 | }
308 |
309 | .chart-pie-label {
310 | -fx-font-family: "Rimouski Sb";
311 | -fx-font-size: 15;
312 | -fx-fill: black;
313 | }
314 |
315 | .alert-error-button {
316 | -fx-font-family: "Rimouski Sb";
317 | -fx-background-color: -delete;
318 | -fx-background-radius: 5;
319 | -fx-text-fill: white;
320 | -fx-pref-height: 50px;
321 | -fx-pref-width: 340px;
322 | -fx-font-size: 15;
323 | }
324 |
325 | .alert-error-button .jfx-rippler {
326 | -jfx-rippler-fill: none;
327 | }
328 |
329 | .alert-error-title {
330 | -fx-font-family: "Rimouski Sb";
331 | -fx-fill: -delete;
332 | -fx-font-size: 30;
333 | }
334 |
335 | .alert-error-body {
336 | -fx-font-family: "Rimouski Sb";
337 | -fx-fill: -delete;
338 | -fx-font-size: 15;
339 | }
340 |
341 | .alert-success-button {
342 | -fx-font-family: "Rimouski Sb";
343 | -fx-background-color: -primary;
344 | -fx-background-radius: 5;
345 | -fx-text-fill: white;
346 | -fx-pref-height: 50px;
347 | -fx-pref-width: 340px;
348 | -fx-font-size: 15;
349 | }
350 |
351 | .alert-success-button .jfx-rippler {
352 | -jfx-rippler-fill: none;
353 | }
354 |
355 | .alert-success-title {
356 | -fx-font-family: "Rimouski Sb";
357 | -fx-fill: -primary;
358 | -fx-font-size: 30;
359 | }
360 |
361 | .alert-success-body {
362 | -fx-font-family: "Rimouski Sb";
363 | -fx-fill: -primary;
364 | -fx-font-size: 15;
365 | }
366 |
367 | .password-field-cell {
368 | -fx-background-color: transparent;
369 | -fx-text-fill: black;
370 | -fx-highlight-fill: null;
371 | -fx-highlight-text-fill: null;
372 | }
373 |
374 | .table-row-cell:selected .password-field-cell {
375 | -fx-background-color: -secondary;
376 | -fx-text-fill: white;
377 | }
378 |
379 | .scroll-bar:vertical>.track-background, .scroll-bar:horizontal>.track-background {
380 | -fx-background-color: rgb(230.0, 230.0, 240.0);
381 | -fx-background-insets: 0.0;
382 | }
383 |
384 | .scroll-bar:vertical>.thumb, .scroll-bar:horizontal>.thumb {
385 | -fx-background-color: rgb(158, 158, 158 );
386 | -fx-background-insets: 0.0;
387 | -fx-background-radius: 4.0;
388 | }
389 |
390 | .scroll-bar>.increment-button, .scroll-bar>.decrement-button,
391 | .scroll-bar:hover>.increment-button, .scroll-bar:hover>.decrement-button {
392 | -fx-background-color: transparent;
393 | }
394 |
395 | .scroll-bar>.increment-button>.increment-arrow, .scroll-bar>.decrement-button>.decrement-arrow {
396 | -fx-background-color: rgb(150.0, 150.0, 150.0);
397 | }
398 |
399 | .scroll-bar>.track-background {
400 | -fx-background-color: transparent;
401 | }
402 |
403 | .button-context-menu {
404 | -fx-background-color: white;
405 | -fx-text-fill: -secondary;
406 | -fx-font-size: 15;
407 | -fx-pref-height: 32.5px;
408 | -fx-pref-width: 100px;
409 | }
410 |
411 | .button-context-menu .glyph-icon {
412 | -glyph-size: 20;
413 | -fx-fill: -secondary;
414 | }
415 |
416 | .button-context-menu:hover,
417 | .button-context-menu:pressed {
418 | -fx-background-color: -primary;
419 | -fx-text-fill: white;
420 | -fx-font-size: 15;
421 | -fx-pref-height: 32.5px;
422 | -fx-pref-width: 100px;
423 | }
424 |
425 | .button-context-menu:hover .glyph-icon,
426 | .button-context-menu:pressed .glyph-icon {
427 | -fx-fill: white;
428 | }
429 |
430 | .button-context-menu .jfx-rippler {
431 | -jfx-rippler-fill: none;
432 | }
--------------------------------------------------------------------------------
/src/resources/Start.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020-2021 LaynezCode
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | .button-start {
18 | -fx-background-color: #2d3037;
19 | -fx-text-fill: white;
20 | }
21 |
22 | .button-start .jfx-rippler {
23 | -jfx-rippler-fill: none;
24 | }
25 |
26 | .button-start-back {
27 | -fx-background-color: white;
28 | -fx-border-color: #2d3037;
29 | -fx-border-width: 1.5;
30 | -fx-text-fill: black;
31 | }
32 |
33 | .button-start-back .jfx-rippler {
34 | -jfx-rippler-fill: none;
35 | }
36 |
37 | .jfx-text-field-start {
38 | -fx-font-size: 14;
39 | -fx-accent: #2d3037;
40 | -jfx-focus-color: #2d3037;
41 | -jfx-unfocus-color: #2d3037;
42 | }
43 |
44 | .combo-box-start {
45 | -fx-font-size: 14;
46 | -jfx-focus-color: #2d3037;
47 | -jfx-unfocus-color: #2d3037;
48 | -fx-background-color: transparent;
49 | }
50 |
51 | .combo-box-start .jfx-rippler {
52 | -jfx-rippler-fill: none;
53 | }
54 |
55 | .combo-box-popup-start .list-cell {
56 | -fx-background-color: white;
57 | -fx-text-fill: black;
58 | }
59 |
60 | .combo-box-popup-start .list-view .list-cell:filled:hover {
61 | -fx-background-color: #2d3037;
62 | -fx-text-fill: white;
63 | }
64 |
65 | .jfx-progress-bar > .track, .jfx-progress-bar > .bar {
66 | -fx-background-radius: 30;
67 | }
68 |
69 | .jfx-progress-bar > .bar {
70 | -fx-background-color: #2d3037;
71 | }
72 |
73 |
--------------------------------------------------------------------------------
/src/resources/media/delete-person.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/delete-person.png
--------------------------------------------------------------------------------
/src/resources/media/empty-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/empty-image.jpg
--------------------------------------------------------------------------------
/src/resources/media/empty-statistics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/empty-statistics.png
--------------------------------------------------------------------------------
/src/resources/media/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/error.png
--------------------------------------------------------------------------------
/src/resources/media/estfx-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/estfx-logo.png
--------------------------------------------------------------------------------
/src/resources/media/home-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/home-background.png
--------------------------------------------------------------------------------
/src/resources/media/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/icon.png
--------------------------------------------------------------------------------
/src/resources/media/image-not-found.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/image-not-found.png
--------------------------------------------------------------------------------
/src/resources/media/information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/information.png
--------------------------------------------------------------------------------
/src/resources/media/laynezco-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/laynezco-logo.png
--------------------------------------------------------------------------------
/src/resources/media/laynezcode-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/laynezcode-logo.png
--------------------------------------------------------------------------------
/src/resources/media/license.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/license.pdf
--------------------------------------------------------------------------------
/src/resources/media/profiles/a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/a.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/b.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/c.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/d.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/e.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/e.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/f.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/g.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/g.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/h.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/i.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/i.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/j.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/j.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/k.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/k.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/l.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/l.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/m.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/m.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/n.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/o.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/o.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/p.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/q.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/q.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/r.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/r.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/s.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/t.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/t.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/u.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/u.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/v.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/v.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/w.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/w.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/x.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/y.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/y.png
--------------------------------------------------------------------------------
/src/resources/media/profiles/z.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/profiles/z.png
--------------------------------------------------------------------------------
/src/resources/media/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/success.png
--------------------------------------------------------------------------------
/src/resources/media/usb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/usb.png
--------------------------------------------------------------------------------
/src/resources/media/welcome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/media/welcome.png
--------------------------------------------------------------------------------
/src/resources/rimouski.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/rimouski.ttf
--------------------------------------------------------------------------------
/src/resources/typodermic-eula-02-2014.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LaynezCoder/ElectronicStoreToolFX/5f0a3fc7d089a16b38cddec8e03cd591e11a3cd3/src/resources/typodermic-eula-02-2014.pdf
--------------------------------------------------------------------------------