From 04f83b401f53e844f5aae7f4cd23bb480f85f8d6 Mon Sep 17 00:00:00 2001 From: esaunders <esaunders@basistech.com> Date: Tue, 25 Aug 2020 14:11:33 -0400 Subject: [PATCH] Commented out code that uses EventDispatchChainImpl because it doesn't compile. --- .../contentviewers/imagetagging/ImageTag.java | 20 ++++++++++--------- .../imagetagging/ImageTagsGroup.java | 17 ++++++++-------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/imagetagging/ImageTag.java b/Core/src/org/sleuthkit/autopsy/contentviewers/imagetagging/ImageTag.java index bc249a94ab..6d9de772a1 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/imagetagging/ImageTag.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/imagetagging/ImageTag.java @@ -18,7 +18,9 @@ */ package org.sleuthkit.autopsy.contentviewers.imagetagging; -import com.sun.javafx.event.EventDispatchChainImpl; + +// TODO: See JIRA-6693 +//import com.sun.javafx.event.EventDispatchChainImpl; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; @@ -46,7 +48,7 @@ public final class ImageTag extends Group { // Used to tell the 8 edit handles to hide if this tag is no longer selected - private final EventDispatchChainImpl ALL_CHILDREN; +// private final EventDispatchChainImpl ALL_CHILDREN; private final PhysicalTag physicalTag; @@ -57,13 +59,13 @@ public final class ImageTag extends Group { private final ContentViewerTag<ImageTagRegion> appTag; public ImageTag(ContentViewerTag<ImageTagRegion> contentViewerTag, ImageView image) { - ALL_CHILDREN = new EventDispatchChainImpl(); +// ALL_CHILDREN = new EventDispatchChainImpl(); this.appTag = contentViewerTag; - this.getChildren().addListener((ListChangeListener<Node>) change -> { - change.next(); - change.getAddedSubList().forEach((node) -> ALL_CHILDREN.append(node.getEventDispatcher())); - }); +// this.getChildren().addListener((ListChangeListener<Node>) change -> { +// change.next(); +// change.getAddedSubList().forEach((node) -> ALL_CHILDREN.append(node.getEventDispatcher())); +// }); ImageTagRegion details = contentViewerTag.getDetails(); physicalTag = new PhysicalTag(details); @@ -120,8 +122,8 @@ public ImageTag(ContentViewerTag<ImageTagRegion> contentViewerTag, ImageView ima Tooltip.install(this, new Tooltip(contentViewerTag.getContentTag() .getName().getDisplayName())); - this.addEventHandler(ImageTagControls.NOT_FOCUSED, event -> ALL_CHILDREN.dispatchEvent(event)); - this.addEventHandler(ImageTagControls.FOCUSED, event -> ALL_CHILDREN.dispatchEvent(event)); +// this.addEventHandler(ImageTagControls.NOT_FOCUSED, event -> ALL_CHILDREN.dispatchEvent(event)); +// this.addEventHandler(ImageTagControls.FOCUSED, event -> ALL_CHILDREN.dispatchEvent(event)); } /** diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/imagetagging/ImageTagsGroup.java b/Core/src/org/sleuthkit/autopsy/contentviewers/imagetagging/ImageTagsGroup.java index 69d2a73c4c..0572b66e68 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/imagetagging/ImageTagsGroup.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/imagetagging/ImageTagsGroup.java @@ -18,11 +18,11 @@ */ package org.sleuthkit.autopsy.contentviewers.imagetagging; -import com.sun.javafx.event.EventDispatchChainImpl; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import javafx.event.Event; +import javafx.event.EventDispatchChain; import javafx.geometry.Point2D; import javafx.scene.Group; import javafx.scene.Node; @@ -41,7 +41,8 @@ */ public final class ImageTagsGroup extends Group { - private final EventDispatchChainImpl NO_OP_CHAIN = new EventDispatchChainImpl(); + // TODO: See JIRA-6693 +// private final EventDispatchChain NO_OP_CHAIN = new EventDispatchChainImpl(); private final PropertyChangeSupport pcs = new PropertyChangeSupport(this); private volatile ImageTag currentFocus; @@ -50,10 +51,10 @@ public ImageTagsGroup(Node backDrop) { //Reset focus of current selection if the back drop has focus. backDrop.setOnMousePressed((mouseEvent) -> { - if (currentFocus != null) { - currentFocus.getEventDispatcher().dispatchEvent( - new Event(ImageTagControls.NOT_FOCUSED), NO_OP_CHAIN); - } +// if (currentFocus != null) { +// currentFocus.getEventDispatcher().dispatchEvent( +// new Event(ImageTagControls.NOT_FOCUSED), NO_OP_CHAIN); +// } this.pcs.firePropertyChange(new PropertyChangeEvent(this, ImageTagControls.NOT_FOCUSED.getName(), currentFocus, null)); @@ -130,7 +131,7 @@ private ImageTag getTagToSelect(Point2D coordinate) { * @param n */ private void resetFocus(ImageTag n) { - n.getEventDispatcher().dispatchEvent(new Event(ImageTagControls.NOT_FOCUSED), NO_OP_CHAIN); +// n.getEventDispatcher().dispatchEvent(new Event(ImageTagControls.NOT_FOCUSED), NO_OP_CHAIN); this.pcs.firePropertyChange(new PropertyChangeEvent(this, ImageTagControls.NOT_FOCUSED.getName(), n, null)); } @@ -146,7 +147,7 @@ private void requestFocus(ImageTag n) { resetFocus(currentFocus); } - n.getEventDispatcher().dispatchEvent(new Event(ImageTagControls.FOCUSED), NO_OP_CHAIN); +// n.getEventDispatcher().dispatchEvent(new Event(ImageTagControls.FOCUSED), NO_OP_CHAIN); this.pcs.firePropertyChange(new PropertyChangeEvent(this, ImageTagControls.FOCUSED.getName(), currentFocus, n)); currentFocus = n; -- GitLab