mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
fixes for javafx, keyword search, and image gallery issue
This commit is contained in:
parent
2f5c66c7e5
commit
1d376eab39
@ -263,6 +263,13 @@ public class Installer extends ModuleInstall {
|
||||
//initialize java fx if exists
|
||||
System.setProperty("javafx.macosx.embedded", "true");
|
||||
try {
|
||||
|
||||
// Due to a lingering issue https://bugs.openjdk.org/browse/JDK-8223377 where glass.dll from java 8 gets loaded instead of the java 17 one.
|
||||
String javaLibraryPath = "java.library.path";
|
||||
String jvmBinPathStr = Paths.get(System.getProperty("java.home"), "bin").toAbsolutePath().toString();
|
||||
String path = System.getProperty(javaLibraryPath);
|
||||
System.setProperty(javaLibraryPath, StringUtils.isBlank(path) ? jvmBinPathStr : jvmBinPathStr + File.pathSeparator + path);
|
||||
|
||||
// Creating a JFXPanel initializes JavaFX
|
||||
new JFXPanel();
|
||||
Platform.setImplicitExit(false);
|
||||
|
@ -55,6 +55,11 @@ import org.xml.sax.SAXException;
|
||||
*/
|
||||
public class XMLUtil {
|
||||
|
||||
static {
|
||||
// this is to ensure using xalan for the transformer factory: https://stackoverflow.com/a/64364531/2375948
|
||||
System.setProperty("javax.xml.transform.TransformerFactory","com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
|
||||
}
|
||||
|
||||
private static DocumentBuilder getDocumentBuilder() throws ParserConfigurationException {
|
||||
// See JIRA-6958 for details about class loading and jaxb.
|
||||
ClassLoader original = Thread.currentThread().getContextClassLoader();
|
||||
|
@ -46,6 +46,7 @@ import javafx.beans.binding.DoubleBinding;
|
||||
import javafx.beans.property.ReadOnlyObjectProperty;
|
||||
import javafx.beans.property.ReadOnlyObjectWrapper;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.event.ActionEvent;
|
||||
@ -662,24 +663,25 @@ public class GroupPane extends BorderPane {
|
||||
|
||||
private final DrawableTile tile = new DrawableTile(GroupPane.this, controller);
|
||||
|
||||
DrawableCell() {
|
||||
itemProperty().addListener((ObservableValue<? extends Long> observable, Long oldValue, Long newValue) -> {
|
||||
if (oldValue != null) {
|
||||
cellMap.remove(oldValue, DrawableCell.this);
|
||||
tile.setFile(null);
|
||||
protected final ChangeListener<Long> changeListener = (ObservableValue<? extends Long> observable, Long oldValue, Long newValue) -> {
|
||||
if ((oldValue == null && newValue == null) || (oldValue != null && newValue != null && oldValue.equals(newValue))) {
|
||||
// if no change, do nothing
|
||||
return;
|
||||
}
|
||||
|
||||
DrawableCell oldValueCell = oldValue == null ? null : cellMap.remove(oldValue);
|
||||
if (oldValueCell != null) {
|
||||
// remove change listener to get garbage collected
|
||||
oldValueCell.itemProperty().removeListener(oldValueCell.changeListener);
|
||||
}
|
||||
|
||||
if (newValue != null) {
|
||||
if (cellMap.containsKey(newValue)) {
|
||||
if (tile != null) {
|
||||
// Clear out the old value to prevent out-of-date listeners
|
||||
// from activating.
|
||||
cellMap.get(newValue).tile.setFile(null);
|
||||
}
|
||||
}
|
||||
cellMap.put(newValue, DrawableCell.this);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
DrawableCell() {
|
||||
itemProperty().addListener(changeListener);
|
||||
setGraphic(tile);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user