handling some java deprecations and javadoc problems

This commit is contained in:
Jindra Petřík
2021-02-10 19:07:39 +01:00
parent add1c7ef1e
commit 3d3f31de7f
6 changed files with 17 additions and 19 deletions

View File

@@ -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
}