Add a loading screen#629
Conversation
Current coverage is 57.73% (diff: 0.00%)@@ master #629 diff @@
==========================================
Files 194 194
Lines 6051 6062 +11
Methods 0 0
Messages 0 0
Branches 550 551 +1
==========================================
- Hits 3562 3500 -62
- Misses 2327 2398 +71
- Partials 162 164 +2
|
120d4de to
91d7f9a
Compare
| private Stage preloaderStage; | ||
|
|
||
| @Override | ||
| public void start(Stage preloaderStage) throws Exception { |
There was a problem hiding this comment.
I'm assuming this is part of the method signature defined by Preloader.start?
There was a problem hiding this comment.
You don't have to throw the Exception even if the parent class does. I'd rather see explicitly what methods this method actually throws.
Try removing it and adding only the exceptions that get thrown and see if it still compiles. I bet it will.
|
I like it! |
91d7f9a to
dd7eb5b
Compare
| import com.google.inject.Guice; | ||
| import com.google.inject.Injector; | ||
| import com.google.inject.util.Modules; | ||
| import com.sun.javafx.application.LauncherImpl; |
There was a problem hiding this comment.
You're supposed to avoid this package. Is there another way to do this?? If not it's fine.
There was a problem hiding this comment.
I found another way. Thanks!
There was a problem hiding this comment.
@JLLeitschuh Just for future reference, com.sun.* is fine, it's sun.* that should be avoided
|
Has anyone have experience with loading bars? How do you decide when to add to the completion of the bar? |
|
You'll have to ask @ThomasJClark for a higher quality version of the GRIP logo. |
|
If possible a vector drawing. |
dd7eb5b to
2f99d73
Compare
30a9ae6 to
3c0ccf0
Compare
| notifyPreloader(new Preloader.ProgressNotification(0.45)); | ||
| server.addHandler(pipelineSwitcher); | ||
| server.start(); | ||
| notifyPreloader(new Preloader.ProgressNotification(0.6)); |
There was a problem hiding this comment.
Comments on the location of these progress events? Should I add more or have less...
dab4552 to
6edca52
Compare
6edca52 to
b524f8e
Compare
| progressBar = (ProgressBar) root.getChildrenUnmodifiable().filtered( | ||
| p -> p instanceof ProgressBar).get(0); | ||
|
|
||
| System.setProperty("prism.lcdtext", "false"); |
|
How does this look on High DPI screens? Any idea? |
|
My guess would be that the loading bar would look taller than it does on a normal display. The image is locked at display width / 4. Edit: Take a look at this https://youtu.be/VwDD86o8PCQ |
|
Cool! Looks awesome! |
| new GripSourcesHardwareModule()).with(new GripNetworkModule(), new GripUiModule())); | ||
|
|
||
| injector.injectMembers(this); | ||
| notifyPreloader(new Preloader.ProgressNotification(0.15)); |
There was a problem hiding this comment.
I can guarantee you that creating the dependency injector probably takes the most amount of time.
There was a problem hiding this comment.
Right now the longest thing for me is starting the Jetty server
|
The loading bar color doesn't fit the theme. Can you change it to more of a forest green that matches the lighter green in the logo? |
| public void handleApplicationNotification(PreloaderNotification pn) { | ||
| if (pn instanceof ProgressNotification) { | ||
| progressBar.setProgress(((ProgressNotification) pn).getProgress()); | ||
| } else if (pn instanceof StateChangeNotification |
There was a problem hiding this comment.
Instance of!!! Bah! But this is probably the only way.
So, fine, this works.
There was a problem hiding this comment.
I agree... they should change the api
|
@SamCarlberg For the color are you thinking something like A4CFBE or 58a787? |
|
I think something more like 33cc33. Those look too desaturated imo |
|
After discussion on gitter - 6C8058 was picked |
|
Getting this at the end of the stacktrace when I quit the app (it runs fine, though) Edit: only when running from intellij, it's fine when run from the command line. |
|
The text is pretty jaggy for me (OS X Yosemite) |
|
@SamCarlberg I fixed the issue with your first comment. You can run the task |
|
Is this good to go? |
|
Waiting on a response from @SamCarlberg |
|
@SamCarlberg bump |
|
@SamCarlberg The latest commit should fix the issue |
|
Good yet? |
|
I think so. @SamCarlberg should probably test it again first |
|
Scaling issue is fixed. |
|
LGTM |

I added a loading screen to GRIP.
@JLLeitschuh Something that will make this nicer is a higher quality version of the GRIP logo.
Video Demo: https://youtu.be/J08DqqBTGPY