Skip to content

Commit 45da651

Browse files
bhharsh13bhavanisreeharicarldea
authored
IIA-1586 Border of the Expanded Pattern should get highlighted (#610)
* Update version to start feature: IIA-1586-Pattern-border-highlight * Highlight the Pattern Border * Highlight the Pattern when expanded * Update version to finish feature: IIA-1586-Pattern-border-highlight --------- Co-authored-by: Sreehari <bhsreehari@deloitte.com> Co-authored-by: Carl Dea <carl.dea@gmail.com>
1 parent 00d9225 commit 45da651

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

kview/src/main/java/dev/ikm/komet/kview/mvvm/view/navigation/PatternNavEntryController.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import javafx.scene.input.MouseButton;
3232
import javafx.scene.layout.HBox;
3333
import javafx.scene.layout.StackPane;
34+
import javafx.scene.layout.VBox;
3435
import org.carlfx.cognitive.loader.InjectViewModel;
3536
import org.carlfx.cognitive.viewmodel.SimpleViewModel;
3637
import org.slf4j.Logger;
@@ -53,6 +54,9 @@ public enum PatternNavEntry{
5354
@FXML
5455
private HBox semanticElementHBox;
5556

57+
@FXML
58+
private VBox mainVBox;
59+
5660
@FXML
5761
private ImageView identicon;
5862

@@ -88,6 +92,16 @@ private void initialize() {
8892
}
8993
});
9094

95+
instancesTitledPane.expandedProperty().addListener((obs, wasExpanded, isNowExpanded) -> {
96+
if (isNowExpanded) {
97+
if (!mainVBox.getStyleClass().contains("search-entry-title-pane")) {
98+
mainVBox.getStyleClass().add("search-entry-title-pane");
99+
}
100+
} else {
101+
mainVBox.getStyleClass().remove("search-entry-title-pane");
102+
}
103+
});
104+
91105
KometIcon kometPlusIcon = KometIcon.create(PLUS,"icon-klcontext-menu");
92106
KometIcon kometTrashIcon = KometIcon.create(TRASH, "icon-klcontext-menu");
93107

kview/src/main/resources/dev/ikm/komet/kview/mvvm/view/navigation/pattern-nav-entry.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<HBox fx:id="patternEntryHBox" prefWidth="332.0" styleClass="search-entry-hbox" stylesheets="@../kview.css" xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dev.ikm.komet.kview.mvvm.view.navigation.PatternNavEntryController">
1414
<children>
15-
<VBox HBox.hgrow="ALWAYS">
15+
<VBox fx:id="mainVBox" focusTraversable="true" prefWidth="334.0" HBox.hgrow="ALWAYS">
1616
<children>
1717
<HBox fx:id="semanticElementHBox" styleClass="pattern-title-container" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="24.0" prefHeight="40.0" prefWidth="332.0" spacing="11.0" VBox.vgrow="NEVER">
1818
<children>

0 commit comments

Comments
 (0)