diff --git a/src/com/jpexs/decompiler/flash/gui/AdvancedSettingsDialog.java b/src/com/jpexs/decompiler/flash/gui/AdvancedSettingsDialog.java index ed916cf90..c1069e8f0 100644 --- a/src/com/jpexs/decompiler/flash/gui/AdvancedSettingsDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/AdvancedSettingsDialog.java @@ -36,6 +36,7 @@ import java.awt.RenderingHints; import java.awt.event.ActionEvent; import java.io.File; import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.ParameterizedType; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -91,11 +92,6 @@ public class AdvancedSettingsDialog extends AppDialog { private JButton resetButton; - /** - * Creates new form AdvancedSettingsDialog - * - * @param selectedCategory - */ public AdvancedSettingsDialog(String selectedCategory) { initComponents(selectedCategory); View.centerScreen(this); @@ -209,7 +205,7 @@ public class AdvancedSettingsDialog extends AppDialog { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); try { Class act = Class.forName(ss.getClassName()); - SubstanceSkin skin = (SubstanceSkin) act.newInstance(); + SubstanceSkin skin = (SubstanceSkin) act.getDeclaredConstructor().newInstance(); Color fill = skin.getColorScheme(DecorationAreaType.GENERAL, ColorSchemeAssociationKind.FILL, ComponentState.ENABLED).getBackgroundFillColor(); Color hilight = skin.getColorScheme(DecorationAreaType.GENERAL, ColorSchemeAssociationKind.FILL, ComponentState.ROLLOVER_SELECTED).getBackgroundFillColor(); Color border = skin.getColorScheme(DecorationAreaType.GENERAL, ColorSchemeAssociationKind.BORDER, ComponentState.ENABLED).getDarkColor(); @@ -220,7 +216,7 @@ public class AdvancedSettingsDialog extends AppDialog { g2.setColor(border); g2.drawOval(0, 0, 16, 16); - } catch (ClassNotFoundException | InstantiationException | IllegalAccessException ex) { + } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException ex) { //no icon } diff --git a/src/com/jpexs/decompiler/flash/gui/Main.java b/src/com/jpexs/decompiler/flash/gui/Main.java index ddc178b90..fbe4a0b48 100644 --- a/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/src/com/jpexs/decompiler/flash/gui/Main.java @@ -211,10 +211,8 @@ public class Main { return runProcess != null && !runProcessDebug; } - /** - * FIXME! - * - * @param v + /* + * FIXME! */ public static synchronized void dumpBytes(Variable v) { InCallFunction icf; diff --git a/src/com/jpexs/decompiler/flash/gui/MenuBuilder.java b/src/com/jpexs/decompiler/flash/gui/MenuBuilder.java index 85d7ad931..70a94505f 100644 --- a/src/com/jpexs/decompiler/flash/gui/MenuBuilder.java +++ b/src/com/jpexs/decompiler/flash/gui/MenuBuilder.java @@ -101,7 +101,7 @@ public interface MenuBuilder { } public int getModifier() { - return (shiftDown ? KeyEvent.SHIFT_MASK : 0) + (ctrlDown ? KeyEvent.CTRL_MASK : 0) + (altDown ? KeyEvent.ALT_MASK : 0); + return (shiftDown ? KeyEvent.SHIFT_DOWN_MASK : 0) + (ctrlDown ? KeyEvent.CTRL_DOWN_MASK : 0) + (altDown ? KeyEvent.ALT_DOWN_MASK : 0); } public HotKey(String h) { @@ -197,8 +197,8 @@ public interface MenuBuilder { * @param priority Priority * @param subloader Action which loads menu inside * @param isLeaf Has no subitems? - * @param key - * @param isOptional + * @param key Hot key + * @param isOptional Optional */ public void addMenuItem(String path, String title, String icon, ActionListener action, int priority, ActionListener subloader, boolean isLeaf, HotKey key, boolean isOptional); @@ -211,7 +211,7 @@ public interface MenuBuilder { * @param icon Icon - resource name * @param action Action for clicking * @param priority Priority - * @param key + * @param key Hot key */ public void addToggleMenuItem(String path, String title, String group, String icon, ActionListener action, int priority, HotKey key); @@ -227,7 +227,7 @@ public interface MenuBuilder { * Hotkey for menu * * @param path Menu path - * @return + * @return Hot key */ public HotKey getMenuHotkey(String path); diff --git a/src/com/jpexs/decompiler/flash/gui/SoundTagPlayer.java b/src/com/jpexs/decompiler/flash/gui/SoundTagPlayer.java index 5e7e02812..df30ab25d 100644 --- a/src/com/jpexs/decompiler/flash/gui/SoundTagPlayer.java +++ b/src/com/jpexs/decompiler/flash/gui/SoundTagPlayer.java @@ -301,6 +301,9 @@ public class SoundTagPlayer implements MediaDisplay { return null; } + /* + Finalize is deprecated, let's see how this will work without it... + @Override protected void finalize() throws Throwable { try { @@ -312,7 +315,7 @@ public class SoundTagPlayer implements MediaDisplay { } finally { super.finalize(); } - } + }*/ private void decreaseLoopCount() { // this method should be called from synchronized (playLock) block diff --git a/src/com/jpexs/decompiler/flash/gui/controls/JRepeatButton.java b/src/com/jpexs/decompiler/flash/gui/controls/JRepeatButton.java index 187695d85..dd65967cd 100644 --- a/src/com/jpexs/decompiler/flash/gui/controls/JRepeatButton.java +++ b/src/com/jpexs/decompiler/flash/gui/controls/JRepeatButton.java @@ -54,7 +54,7 @@ public class JRepeatButton extends JButton { cnt++; JRepeatButton button = JRepeatButton.this; repeatCount = cnt; - fireActionPerformed(new ActionEvent(button, ActionEvent.ACTION_PERFORMED, button.getActionCommand(), e.getWhen(), e.getModifiers())); + fireActionPerformed(new ActionEvent(button, ActionEvent.ACTION_PERFORMED, button.getActionCommand(), e.getWhen(), e.getModifiersEx())); }); } }; diff --git a/src/com/jpexs/decompiler/flash/gui/player/PlayerControls.java b/src/com/jpexs/decompiler/flash/gui/player/PlayerControls.java index 6cdf14aa3..d873e74e4 100644 --- a/src/com/jpexs/decompiler/flash/gui/player/PlayerControls.java +++ b/src/com/jpexs/decompiler/flash/gui/player/PlayerControls.java @@ -42,6 +42,7 @@ import java.awt.font.TextAttribute; import java.awt.image.BufferedImage; import java.io.IOException; import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.HashMap; import java.util.Map; import javax.swing.BoxLayout; @@ -390,7 +391,7 @@ public class PlayerControls extends JPanel implements MediaDisplayListener { if (lg < 0) { lg = 0; } - BigDecimal bd = new BigDecimal(String.valueOf(realZoom)).setScale(lg, BigDecimal.ROUND_HALF_UP); + BigDecimal bd = new BigDecimal(String.valueOf(realZoom)).setScale(lg, RoundingMode.HALF_UP); return bd.doubleValue(); }