Skip to content
Snippets Groups Projects
Commit 04f83b40 authored by esaunders's avatar esaunders
Browse files

Commented out code that uses EventDispatchChainImpl because it doesn't compile.

parent 658a5a15
No related branches found
No related tags found
No related merge requests found
......@@ -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));
}
/**
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment