Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BudgetMaster
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
BudgetMaster
Commits
7b5a979f
Commit
7b5a979f
authored
8 years ago
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
added buttons for enabling/disabling all categories in filterGUI
parent
b96d88ed
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!75
merge v1_1_0 into master
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/de/deadlocker8/budgetmaster/ui/FilterController.java
+47
-33
47 additions, 33 deletions
src/de/deadlocker8/budgetmaster/ui/FilterController.java
src/de/deadlocker8/budgetmaster/ui/FilterGUI.fxml
+22
-6
22 additions, 6 deletions
src/de/deadlocker8/budgetmaster/ui/FilterGUI.fxml
with
69 additions
and
39 deletions
src/de/deadlocker8/budgetmaster/ui/FilterController.java
+
47
−
33
View file @
7b5a979f
...
@@ -26,6 +26,8 @@ public class FilterController
...
@@ -26,6 +26,8 @@ public class FilterController
@FXML
private
Button
buttonCancel
;
@FXML
private
Button
buttonCancel
;
@FXML
private
Button
buttonReset
;
@FXML
private
Button
buttonReset
;
@FXML
private
Button
buttonFilter
;
@FXML
private
Button
buttonFilter
;
@FXML
private
Button
buttonCategoryAll
;
@FXML
private
Button
buttonCategoryNone
;
private
Stage
stage
;
private
Stage
stage
;
private
Controller
controller
;
private
Controller
controller
;
...
@@ -47,7 +49,7 @@ public class FilterController
...
@@ -47,7 +49,7 @@ public class FilterController
iconReset
.
setSize
(
17
);
iconReset
.
setSize
(
17
);
iconReset
.
setStyle
(
"-fx-text-fill: white"
);
iconReset
.
setStyle
(
"-fx-text-fill: white"
);
buttonReset
.
setGraphic
(
iconReset
);
buttonReset
.
setGraphic
(
iconReset
);
FontIcon
iconSave
=
new
FontIcon
(
FontIconType
.
SAVE
);
FontIcon
iconSave
=
new
FontIcon
(
FontIconType
.
FILTER
);
iconSave
.
setSize
(
17
);
iconSave
.
setSize
(
17
);
iconSave
.
setStyle
(
"-fx-text-fill: white"
);
iconSave
.
setStyle
(
"-fx-text-fill: white"
);
buttonFilter
.
setGraphic
(
iconSave
);
buttonFilter
.
setGraphic
(
iconSave
);
...
@@ -55,6 +57,8 @@ public class FilterController
...
@@ -55,6 +57,8 @@ public class FilterController
buttonCancel
.
setStyle
(
"-fx-background-color: #2E79B9; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 15;"
);
buttonCancel
.
setStyle
(
"-fx-background-color: #2E79B9; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 15;"
);
buttonReset
.
setStyle
(
"-fx-background-color: #2E79B9; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 15;"
);
buttonReset
.
setStyle
(
"-fx-background-color: #2E79B9; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 15;"
);
buttonFilter
.
setStyle
(
"-fx-background-color: #2E79B9; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 15;"
);
buttonFilter
.
setStyle
(
"-fx-background-color: #2E79B9; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 15;"
);
buttonCategoryAll
.
setStyle
(
"-fx-background-color: #2E79B9; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 13;"
);
buttonCategoryNone
.
setStyle
(
"-fx-background-color: #2E79B9; -fx-text-fill: white; -fx-font-weight: bold; -fx-font-size: 13;"
);
for
(
Category
currentCategory
:
controller
.
getCategoryHandler
().
getCategories
())
for
(
Category
currentCategory
:
controller
.
getCategoryHandler
().
getCategories
())
{
{
...
@@ -115,7 +119,7 @@ public class FilterController
...
@@ -115,7 +119,7 @@ public class FilterController
}
}
String
name
=
textFieldSearch
.
getText
();
String
name
=
textFieldSearch
.
getText
();
if
(
name
.
equals
(
""
))
if
(
name
!=
null
&&
name
.
equals
(
""
))
{
{
name
=
null
;
name
=
null
;
}
}
...
@@ -123,13 +127,7 @@ public class FilterController
...
@@ -123,13 +127,7 @@ public class FilterController
// get new unfiltered list from server
// get new unfiltered list from server
controller
.
refresh
(
new
FilterSettings
());
controller
.
refresh
(
new
FilterSettings
());
FilterSettings
newFilterSettings
=
new
FilterSettings
(
isIncomeAllowed
,
FilterSettings
newFilterSettings
=
new
FilterSettings
(
isIncomeAllowed
,
isPaymentAllowed
,
isNoRepeatingAllowed
,
isMonthlyRepeatingAllowed
,
isRepeatingEveryXDaysAllowed
,
allowedCategoryIDs
,
name
);
isPaymentAllowed
,
isNoRepeatingAllowed
,
isMonthlyRepeatingAllowed
,
isRepeatingEveryXDaysAllowed
,
allowedCategoryIDs
,
name
);
controller
.
setFilterSettings
(
newFilterSettings
);
controller
.
setFilterSettings
(
newFilterSettings
);
controller
.
getPaymentHandler
().
filter
(
newFilterSettings
);
controller
.
getPaymentHandler
().
filter
(
newFilterSettings
);
...
@@ -150,4 +148,20 @@ public class FilterController
...
@@ -150,4 +148,20 @@ public class FilterController
{
{
stage
.
close
();
stage
.
close
();
}
}
public
void
enableAllCategories
()
{
for
(
Node
node
:
vboxCategories
.
getChildren
())
{
((
CheckBox
)
node
).
setSelected
(
true
);
}
}
public
void
disableAllCategories
()
{
for
(
Node
node
:
vboxCategories
.
getChildren
())
{
((
CheckBox
)
node
).
setSelected
(
false
);
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/de/deadlocker8/budgetmaster/ui/FilterGUI.fxml
+
22
−
6
View file @
7b5a979f
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Font?>
...
@@ -55,7 +56,7 @@
...
@@ -55,7 +56,7 @@
<Font
size=
"14.0"
/>
<Font
size=
"14.0"
/>
</font>
</font>
</CheckBox>
</CheckBox>
<CheckBox
fx:id=
"checkBoxMonthlyRepeating"
mnemonicParsing=
"false"
text=
"
jeden x-ten eines Monats
"
>
<CheckBox
fx:id=
"checkBoxMonthlyRepeating"
mnemonicParsing=
"false"
text=
"
monatlich
"
>
<font>
<font>
<Font
size=
"14.0"
/>
<Font
size=
"14.0"
/>
</font>
</font>
...
@@ -68,12 +69,27 @@
...
@@ -68,12 +69,27 @@
</children>
</children>
</VBox>
</VBox>
<VBox
prefHeight=
"150.0"
prefWidth=
"422.0"
spacing=
"10.0"
>
<VBox
prefHeight=
"150.0"
prefWidth=
"422.0"
spacing=
"10.0"
>
<children>
<HBox
spacing=
"10.0"
>
<children>
<children>
<Label
text=
"Kategorien"
>
<Label
text=
"Kategorien"
>
<font>
<font>
<Font
name=
"System Bold"
size=
"16.0"
/>
<Font
name=
"System Bold"
size=
"16.0"
/>
</font>
</font>
</Label>
</Label>
<Region
prefWidth=
"200.0"
HBox.hgrow=
"ALWAYS"
/>
<Button
fx:id=
"buttonCategoryAll"
mnemonicParsing=
"false"
onAction=
"#enableAllCategories"
text=
"Alle"
>
<font>
<Font
name=
"System Bold"
size=
"13.0"
/>
</font>
</Button>
<Button
fx:id=
"buttonCategoryNone"
mnemonicParsing=
"false"
onAction=
"#disableAllCategories"
text=
"Keine"
>
<font>
<Font
name=
"System Bold"
size=
"13.0"
/>
</font>
</Button>
</children>
</HBox>
<ScrollPane
prefHeight=
"93.0"
prefWidth=
"422.0"
VBox.vgrow=
"ALWAYS"
>
<ScrollPane
prefHeight=
"93.0"
prefWidth=
"422.0"
VBox.vgrow=
"ALWAYS"
>
<content>
<content>
<VBox
fx:id=
"vboxCategories"
spacing=
"5.0"
/>
<VBox
fx:id=
"vboxCategories"
spacing=
"5.0"
/>
...
...
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