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
4ea47ea4
Commit
4ea47ea4
authored
7 years ago
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
Fixed
#206
- search --> rangeslider --> textfields on change not only on enter
parent
65a1bbfb
No related branches found
No related tags found
1 merge request
!213
merge v1_6_0 into master
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
BudgetMasterClient/src/main/java/de/deadlocker8/budgetmasterclient/ui/controller/SearchController.java
+26
-33
26 additions, 33 deletions
...r8/budgetmasterclient/ui/controller/SearchController.java
with
26 additions
and
33 deletions
BudgetMasterClient/src/main/java/de/deadlocker8/budgetmasterclient/ui/controller/SearchController.java
+
26
−
33
View file @
4ea47ea4
...
@@ -127,7 +127,6 @@ public class SearchController extends BaseController implements Styleable
...
@@ -127,7 +127,6 @@ public class SearchController extends BaseController implements Styleable
hboxSearchByAmount
.
setDisable
(
true
);
hboxSearchByAmount
.
setDisable
(
true
);
int
maximum
;
int
maximum
;
try
try
{
{
...
@@ -160,12 +159,7 @@ public class SearchController extends BaseController implements Styleable
...
@@ -160,12 +159,7 @@ public class SearchController extends BaseController implements Styleable
HBox
.
setHgrow
(
rangeSlider
,
Priority
.
ALWAYS
);
HBox
.
setHgrow
(
rangeSlider
,
Priority
.
ALWAYS
);
textFieldAmountMin
.
setTextFormatter
(
new
TextFormatter
<>(
c
->
{
textFieldAmountMin
.
setTextFormatter
(
new
TextFormatter
<>(
c
->
{
if
(
c
.
getControlNewText
().
isEmpty
())
if
(
c
.
getControlNewText
().
isEmpty
()
||
c
.
getControlNewText
().
matches
(
"[0-9]*"
))
{
return
c
;
}
if
(
c
.
getControlNewText
().
matches
(
"[0-9]*"
))
{
{
return
c
;
return
c
;
}
}
...
@@ -176,12 +170,7 @@ public class SearchController extends BaseController implements Styleable
...
@@ -176,12 +170,7 @@ public class SearchController extends BaseController implements Styleable
}));
}));
textFieldAmountMax
.
setTextFormatter
(
new
TextFormatter
<>(
c
->
{
textFieldAmountMax
.
setTextFormatter
(
new
TextFormatter
<>(
c
->
{
if
(
c
.
getControlNewText
().
isEmpty
())
if
(
c
.
getControlNewText
().
isEmpty
()
||
c
.
getControlNewText
().
matches
(
"[0-9]*"
))
{
return
c
;
}
if
(
c
.
getControlNewText
().
matches
(
"[0-9]*"
))
{
{
return
c
;
return
c
;
}
}
...
@@ -191,26 +180,12 @@ public class SearchController extends BaseController implements Styleable
...
@@ -191,26 +180,12 @@ public class SearchController extends BaseController implements Styleable
}
}
}));
}));
textFieldAmountMin
.
setOnKeyReleased
((
event
)->{
textFieldAmountMin
.
textProperty
().
addListener
((
a
,
b
,
c
)->{
if
(
event
.
getCode
()
==
KeyCode
.
ENTER
)
setRangeSliderAmountMin
();
{
String
text
=
textFieldAmountMin
.
getText
();
if
(
text
!=
null
&&
!
text
.
equals
(
""
))
{
rangeSlider
.
setLowValue
(
Integer
.
parseInt
(
text
));
}
}
});
});
textFieldAmountMax
.
setOnKeyReleased
((
event
)->{
textFieldAmountMax
.
textProperty
().
addListener
((
a
,
b
,
c
)->{
if
(
event
.
getCode
()
==
KeyCode
.
ENTER
)
setRangeSliderAmountMax
();
{
String
text
=
textFieldAmountMax
.
getText
();
if
(
text
!=
null
&&
!
text
.
equals
(
""
))
{
rangeSlider
.
setHighValue
(
Integer
.
parseInt
(
text
));
}
}
});
});
textFieldAmountMin
.
setText
(
"0"
);
textFieldAmountMin
.
setText
(
"0"
);
...
@@ -233,6 +208,24 @@ public class SearchController extends BaseController implements Styleable
...
@@ -233,6 +208,24 @@ public class SearchController extends BaseController implements Styleable
applyStyle
();
applyStyle
();
}
}
private
void
setRangeSliderAmountMin
()
{
String
text
=
textFieldAmountMin
.
getText
();
if
(
text
!=
null
&&
!
text
.
equals
(
""
))
{
rangeSlider
.
setLowValue
(
Integer
.
parseInt
(
text
));
}
}
private
void
setRangeSliderAmountMax
()
{
String
text
=
textFieldAmountMax
.
getText
();
if
(
text
!=
null
&&
!
text
.
equals
(
""
))
{
rangeSlider
.
setHighValue
(
Integer
.
parseInt
(
text
));
}
}
private
int
getMaxAmountFromServer
()
throws
Exception
private
int
getMaxAmountFromServer
()
throws
Exception
{
{
ServerConnection
connection
=
new
ServerConnection
(
controller
.
getSettings
());
ServerConnection
connection
=
new
ServerConnection
(
controller
.
getSettings
());
...
...
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