Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LoadingBar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robert Goldmann
LoadingBar
Commits
dd50a36e
Commit
dd50a36e
authored
8 years ago
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
added styling
parent
4128215d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/de/deadlocker8/loadingbar/ui/Controller.java
+8
-2
8 additions, 2 deletions
src/de/deadlocker8/loadingbar/ui/Controller.java
src/de/deadlocker8/loadingbar/ui/GUI.fxml
+9
-1
9 additions, 1 deletion
src/de/deadlocker8/loadingbar/ui/GUI.fxml
with
17 additions
and
3 deletions
src/de/deadlocker8/loadingbar/ui/Controller.java
+
8
−
2
View file @
dd50a36e
...
@@ -9,6 +9,7 @@ import javafx.collections.FXCollections;
...
@@ -9,6 +9,7 @@ import javafx.collections.FXCollections;
import
javafx.collections.ObservableList
;
import
javafx.collections.ObservableList
;
import
javafx.fxml.FXML
;
import
javafx.fxml.FXML
;
import
javafx.scene.Node
;
import
javafx.scene.Node
;
import
javafx.scene.control.Button
;
import
javafx.scene.control.Label
;
import
javafx.scene.control.Label
;
import
javafx.scene.control.ProgressBar
;
import
javafx.scene.control.ProgressBar
;
import
javafx.scene.image.Image
;
import
javafx.scene.image.Image
;
...
@@ -20,12 +21,14 @@ import tools.AlertGenerator;
...
@@ -20,12 +21,14 @@ import tools.AlertGenerator;
public
class
Controller
public
class
Controller
{
{
@FXML
private
AnchorPane
mainPane
;
@FXML
private
AnchorPane
mainPane
;
@FXML
private
Label
labelDescription
;
@FXML
private
Label
labelTarget
;
@FXML
private
Label
labelTarget
;
@FXML
private
Label
labelUser
;
@FXML
private
Label
labelUser
;
@FXML
private
Label
labelMessage
;
@FXML
private
Label
labelMessage
;
@FXML
private
ProgressBar
progressBar
;
@FXML
private
ProgressBar
progressBar
;
@FXML
private
ProgressBar
progressBarTarget
;
@FXML
private
ProgressBar
progressBarTarget
;
@FXML
private
StackPane
stackPane
;
@FXML
private
StackPane
stackPane
;
@FXML
private
Button
buttonStop
;
private
Stage
stage
;
private
Stage
stage
;
private
Image
icon
=
new
Image
(
"de/deadlocker8/loadingbar/resources/icon.png"
);
private
Image
icon
=
new
Image
(
"de/deadlocker8/loadingbar/resources/icon.png"
);
...
@@ -33,17 +36,20 @@ public class Controller
...
@@ -33,17 +36,20 @@ public class Controller
private
CountdownTimer
timer
;
private
CountdownTimer
timer
;
private
int
targetPercentage
;
private
int
targetPercentage
;
private
boolean
swapped
;
private
boolean
swapped
;
private
final
String
BACKGROUND_COLOR
=
"#333333"
;
public
void
init
(
Stage
stage
)
public
void
init
(
Stage
stage
)
{
{
this
.
stage
=
stage
;
this
.
stage
=
stage
;
mainPane
.
setStyle
(
"-fx-background-color:
#333333"
);
mainPane
.
setStyle
(
"-fx-background-color:
"
+
BACKGROUND_COLOR
);
stackPane
.
setStyle
(
"-fx-background-color: derive(
#333333
, -60%)"
);
stackPane
.
setStyle
(
"-fx-background-color: derive(
"
+
BACKGROUND_COLOR
+
"
, -60%)"
);
progressBar
.
setStyle
(
"-fx-accent: white;"
);
progressBar
.
setStyle
(
"-fx-accent: white;"
);
labelDescription
.
setStyle
(
"-fx-text-fill: white; -fx-font-size: 20; -fx-font-weight: bold;"
);
labelTarget
.
setStyle
(
"-fx-text-fill: white; -fx-font-size: 40; -fx-font-weight: bold;"
);
labelTarget
.
setStyle
(
"-fx-text-fill: white; -fx-font-size: 40; -fx-font-weight: bold;"
);
labelUser
.
setStyle
(
"-fx-text-fill: white; -fx-font-size: 30; -fx-font-weight: bold;"
);
labelUser
.
setStyle
(
"-fx-text-fill: white; -fx-font-size: 30; -fx-font-weight: bold;"
);
labelMessage
.
setStyle
(
"-fx-text-fill: white; -fx-font-size: 30; -fx-font-weight: bold;"
);
labelMessage
.
setStyle
(
"-fx-text-fill: white; -fx-font-size: 30; -fx-font-weight: bold;"
);
buttonStop
.
setStyle
(
"-fx-background-color: transparent; -fx-border-color: white; -fx-border-width: 3; -fx-border-radius: 0; -fx-text-fill: white;"
);
}
}
public
void
buttonStart
()
public
void
buttonStart
()
...
...
This diff is collapsed.
Click to expand it.
src/de/deadlocker8/loadingbar/ui/GUI.fxml
+
9
−
1
View file @
dd50a36e
...
@@ -13,10 +13,18 @@
...
@@ -13,10 +13,18 @@
<children>
<children>
<VBox
alignment=
"TOP_CENTER"
layoutX=
"25.0"
layoutY=
"16.0"
prefHeight=
"363.0"
prefWidth=
"350.0"
AnchorPane.bottomAnchor=
"25.0"
AnchorPane.leftAnchor=
"25.0"
AnchorPane.rightAnchor=
"25.0"
AnchorPane.topAnchor=
"25.0"
>
<VBox
alignment=
"TOP_CENTER"
layoutX=
"25.0"
layoutY=
"16.0"
prefHeight=
"363.0"
prefWidth=
"350.0"
AnchorPane.bottomAnchor=
"25.0"
AnchorPane.leftAnchor=
"25.0"
AnchorPane.rightAnchor=
"25.0"
AnchorPane.topAnchor=
"25.0"
>
<children>
<children>
<Label
fx:id=
"labelDescription"
alignment=
"CENTER"
maxWidth=
"1.7976931348623157E308"
prefHeight=
"27.0"
text=
"Stop if it hits X percent."
>
<font>
<Font
name=
"System Bold"
size=
"18.0"
/>
</font>
</Label>
<Label
fx:id=
"labelMessage"
alignment=
"CENTER"
maxWidth=
"1.7976931348623157E308"
prefHeight=
"27.0"
>
<Label
fx:id=
"labelMessage"
alignment=
"CENTER"
maxWidth=
"1.7976931348623157E308"
prefHeight=
"27.0"
>
<font>
<font>
<Font
name=
"System Bold"
size=
"18.0"
/>
<Font
name=
"System Bold"
size=
"18.0"
/>
</font>
</font>
<VBox.margin>
<Insets
top=
"50.0"
/>
</VBox.margin>
</Label>
</Label>
<Label
fx:id=
"labelTarget"
alignment=
"CENTER"
maxWidth=
"1.7976931348623157E308"
prefHeight=
"27.0"
>
<Label
fx:id=
"labelTarget"
alignment=
"CENTER"
maxWidth=
"1.7976931348623157E308"
prefHeight=
"27.0"
>
<font>
<font>
...
@@ -43,7 +51,7 @@
...
@@ -43,7 +51,7 @@
<Insets
top=
"15.0"
/>
<Insets
top=
"15.0"
/>
</VBox.margin>
</VBox.margin>
</Label>
</Label>
<Button
mnemonicParsing=
"false"
onAction=
"#buttonStop"
text=
"STOP"
>
<Button
fx:id=
"buttonStop"
mnemonicParsing=
"false"
onAction=
"#buttonStop"
text=
"STOP"
>
<VBox.margin>
<VBox.margin>
<Insets
top=
"20.0"
/>
<Insets
top=
"20.0"
/>
</VBox.margin>
</VBox.margin>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment