Commit 80fbe220 authored by George Adrian Stoica's avatar George Adrian Stoica

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
......@@ -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("x1.png"))));
// Constructor
public Tag(String tag) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment