mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Commented out code that uses EventDispatchChainImpl because it doesn't compile.
This commit is contained in:
parent
658a5a15e6
commit
04f83b401f
@ -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 @@ import org.sleuthkit.autopsy.casemodule.services.contentviewertags.ContentViewer
|
||||
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 final class ImageTag extends Group {
|
||||
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 @@ import javafx.scene.input.MouseEvent;
|
||||
*/
|
||||
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 final class ImageTagsGroup extends Group {
|
||||
|
||||
//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 @@ public final class ImageTagsGroup extends Group {
|
||||
* @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 @@ public final class ImageTagsGroup extends Group {
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user