From c7ae2276ac49804b231c4903bacf21d6e8cd9d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Tue, 29 Oct 2024 20:00:50 +0100 Subject: [PATCH] Fixed: Java 8 compatibility --- CHANGELOG.md | 7 ++----- src/com/jpexs/decompiler/flash/easygui/EasyPanel.java | 2 +- .../easygui/properties/panels/InstancePropertiesPanel.java | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2074f691..63d5fe796 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] -### Added -- Simple editor view - new simplified UI based on timeline view, - which resembles Flash Pro UI. Easier moving objects, - resizing, adding frames, adding objects to stage. Instance property editation. - Undo / redo feature. WIP +### Fixed +- Java 8 compatibility ## [21.1.2] - 2024-10-29 ### Added diff --git a/src/com/jpexs/decompiler/flash/easygui/EasyPanel.java b/src/com/jpexs/decompiler/flash/easygui/EasyPanel.java index f9846852e..f8cdac55c 100644 --- a/src/com/jpexs/decompiler/flash/easygui/EasyPanel.java +++ b/src/com/jpexs/decompiler/flash/easygui/EasyPanel.java @@ -33,7 +33,7 @@ public class EasyPanel extends JPanel { * TODO: switch to true when Easy mode is released. * I think it's not production ready yet. */ - public static final boolean EASY_AVAILABLE = true; + public static final boolean EASY_AVAILABLE = false; private TabSwitcher tabSwitcher; private EasySwfPanel easySwfPanel; diff --git a/src/com/jpexs/decompiler/flash/easygui/properties/panels/InstancePropertiesPanel.java b/src/com/jpexs/decompiler/flash/easygui/properties/panels/InstancePropertiesPanel.java index 0187d29df..8c329c3b1 100644 --- a/src/com/jpexs/decompiler/flash/easygui/properties/panels/InstancePropertiesPanel.java +++ b/src/com/jpexs/decompiler/flash/easygui/properties/panels/InstancePropertiesPanel.java @@ -732,7 +732,7 @@ public class InstancePropertiesPanel extends AbstractPropertiesPanel { DefaultComboBoxModel model = (DefaultComboBoxModel) blendingComboBox.getModel(); if (blendMode.size() > 1) { if (!model.getElementAt(0).equals("")) { - model.addAll(0, Arrays.asList("")); + model.insertElementAt("", 0); } blendingComboBox.setSelectedIndex(0); } else { @@ -758,7 +758,7 @@ public class InstancePropertiesPanel extends AbstractPropertiesPanel { if (backgroundColor.contains(null)) { if (backgroundModel.getSize() == 2) { - backgroundModel.addAll(0, Arrays.asList("")); + backgroundModel.insertElementAt("", 0); } backgroundComboBox.setSelectedIndex(0); backgroundColorPanel.setVisible(false);