Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
course-material
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
IT1901
course-material
Commits
80fbe220
Commit
80fbe220
authored
Oct 17, 2019
by
George Adrian Stoica
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified the tagsbar to accept tag even if it is not in the autocomplete
entries loading the new image for the delete icon (x)
parent
dfa0a78f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
simpleexample2/fxui/src/main/java/simpleex/ui/tags/TagsBar.java
...example2/fxui/src/main/java/simpleex/ui/tags/TagsBar.java
+2
-2
No files found.
simpleexample2/fxui/src/main/java/simpleex/ui/tags/TagsBar.java
View file @
80fbe220
...
...
@@ -44,7 +44,7 @@ public class TagsBar extends HBox {
field
.
setOnAction
(
evt
->
{
String
text
=
field
.
getText
();
// No Duplicates allowed
if
(!
text
.
isEmpty
()
&&
getEntries
().
contains
(
text
)
&&
!
hBox
.
getChildren
().
stream
()
if
(!
text
.
isEmpty
()
&&
/*getEntries().contains(text) && */
!
hBox
.
getChildren
().
stream
()
.
anyMatch
(
s
->
((
Tag
)
s
).
getTag
().
toLowerCase
().
equals
(
text
.
toLowerCase
())))
hBox
.
getChildren
().
add
(
new
Tag
(
text
));
field
.
clear
();
...
...
@@ -95,7 +95,7 @@ public class TagsBar extends HBox {
public
class
Tag
extends
HBox
{
private
Label
textLabel
=
new
Label
();
private
Label
iconLabel
=
new
Label
(
null
,
new
ImageView
(
new
Image
(
getClass
().
getResourceAsStream
(
"x.png"
))));
private
Label
iconLabel
=
new
Label
(
null
,
new
ImageView
(
new
Image
(
getClass
().
getResourceAsStream
(
"x
1
.png"
))));
// Constructor
public
Tag
(
String
tag
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment