diff --git a/gradle.properties b/gradle.properties index 4f497033..f1055edb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,12 +28,12 @@ projectRepositoriesPasswordKey=ossrhPassword ########################### # gradle-plugins versions # ########################### -gradlePluginVersionsVersion=0.48.0 +gradlePluginVersionsVersion=0.50.0 licenseGradlePluginVersion=0.16.1 -gradlePluginLombokVersion=8.3 +gradlePluginLombokVersion=8.4 gradleIzpackPluginVersion=3.2 -grgitGradlePluginVersion=5.2.0 -spotlessGradlePluginVersion=6.21.0 +grgitGradlePluginVersion=5.2.1 +spotlessGradlePluginVersion=6.22.0 ############################ # IzPackInstaller property # ############################ @@ -45,35 +45,35 @@ izpackVersion=5.2.0 lombokVersion=1.18.30 modelDataVersion=3.1 swingComponentsVersion=9 -swingBaseComponentsVersion=4.1 +swingBaseComponentsVersion=4.2 swingTreeComponentVersion=3.1 swingRendererVersion=3.1 swingTableComponentsVersion=3.1 swingSplashscreenVersion=2 -menuActionVersion=3.3 +menuActionVersion=3.4 swingWorkerVersion=1.1 swingLayoutVersion=1.0.3 swingxAllVersion=1.6.5-1 -miglayoutSwingVersion=11.1 +miglayoutSwingVersion=11.2 jxlayerVersion=3.0.4 javahelpVersion=2.0.05 -jobjCoreVersion=8 +jobjCoreVersion=8.1 xstreamVersion=1.4.20 throwableVersion=2.3 -cryptApiVersion=8.6 +cryptApiVersion=8.7 cryptDataVersion=8.5 mysticCryptVersion=8.1 bouncycastleVersion=1.70 checksumUpVersion=2.2 xmlExtensionsVersion=8.2 -guavaVersion=32.1.2-jre -fileWorkerVersion=17 +guavaVersion=32.1.3-jre +fileWorkerVersion=17.1 sillyCollectionVersion=27 sillyBeanVersion=2 -randomizerVersion=10.1 +randomizerVersion=10.2 gsonExtensionsVersion=2.1 jsonExtensionsVersion=2.4 -jacksonVersion=2.15.2 +jacksonVersion=2.16.0 tangoIconThemeVersion=0.8.90 silkIconThemeVersion=1 pf4jVersion=3.10.0 @@ -85,21 +85,21 @@ iconImgExtensionsVersion=3.2 jremixIconVersion=1.1 batikVersion=1.17 imgscalrLibVersion=4.2 -sqliteJdbcVersion=3.43.0.0 +sqliteJdbcVersion=3.44.0.0 commonsLang3Version=3.13.0 -sillyIoVersion=2.2 +sillyIoVersion=3 designPatternObserverVersion=6 designPatternStateVersion=6 designPatternEventbusVersion=6 designVisitorPatternsVersion=6 -jobjCopyVersion=4.1 +jobjCopyVersion=4.2 gsonVersion=2.10.1 dataApiVersion=4.1 idGenerateVersion=1.1 componentModelVersion=2 resourcebundleCoreVersion=5 resourceViewmodelVersion=6 -jobjClonerVersion=2 +jobjClonerVersion=2.1 lGoodDatePickerVersion=11.2.1 autoBrowserVersion=2.0.6 awtExtensionsVersion=1.1 @@ -110,7 +110,7 @@ swingMenuPf4jPluginVersion=1.0.0-SNAPSHOT # test dependencies versions # ############################## keePassJava2Version=2.2.1 -testObjectVersion=7.2 +testObjectVersion=8.2 junitJupiterExtensionsVersion=1.1 assertjSwingVersion=3.17.1 junitJupiterVersion=5.10.1 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3fd2fa06..94927e71 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ #Mon May 11 15:57:08 CEST 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-rc-3-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/src/main/java/io/github/astrapi69/mystic/crypt/DesktopMenu.java b/src/main/java/io/github/astrapi69/mystic/crypt/DesktopMenu.java index 6a99c808..0e49eebe 100644 --- a/src/main/java/io/github/astrapi69/mystic/crypt/DesktopMenu.java +++ b/src/main/java/io/github/astrapi69/mystic/crypt/DesktopMenu.java @@ -100,58 +100,40 @@ protected JMenu newEditMenu() { // @formatter:on final JMenu editMenu = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text(Messages.getString(BaseMenuId.EDIT.propertiesKey())) - .mnemonic(MenuExtensions.toMnemonic('E')).name(BaseMenuId.EDIT.propertiesKey()) - .build()) - .build().toJMenu(); + .text(Messages.getString(BaseMenuId.EDIT.propertiesKey())) + .mnemonic(MenuExtensions.toMnemonic('E')).name(BaseMenuId.EDIT.propertiesKey()).build() + .toJMenu(); JMenuItem verifyChecksum = MenuItemInfo.builder() - - .menuInfo( - MenuInfo.builder().text(Messages.getString(MenuId.VERIFY_CHECKSUM.propertiesKey())) - .name(MenuId.VERIFY_CHECKSUM.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('V')) - .keyStrokeInfo(KeyStrokeInfo.toKeyStrokeInfo( - KeyStroke.getKeyStroke(KeyEvent.VK_F3, InputEvent.ALT_DOWN_MASK))) - .build()) + .text(Messages.getString(MenuId.VERIFY_CHECKSUM.propertiesKey())) + .name(MenuId.VERIFY_CHECKSUM.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('V')) + .keyStrokeInfo(KeyStrokeInfo + .toKeyStrokeInfo(KeyStroke.getKeyStroke(KeyEvent.VK_F3, InputEvent.ALT_DOWN_MASK))) .actionListener(new NewChecksumFrameAction("ChecksumVerifier")) .build().toJMenuItem(); final JMenu viewModeMenu = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text(Messages.getString(MenuId.VIEW_MODE.propertiesKey())) - .name(MenuId.VIEW_MODE.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('W')) - .build()) - - .build().toJMenu(); + .text(Messages.getString(MenuId.VIEW_MODE.propertiesKey())) + .name(MenuId.VIEW_MODE.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('W')).build() + .toJMenu(); editMenu.add(viewModeMenu); JMenuItem switchDesktopMode = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder() - .text(Messages.getString(MenuId.VIEW_DESKTOP_MODE.propertiesKey())) - .name(MenuId.VIEW_DESKTOP_MODE.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('M')) - .keyStrokeInfo(KeyStrokeInfo.toKeyStrokeInfo( - KeyStroke.getKeyStroke(KeyEvent.VK_F6, InputEvent.ALT_DOWN_MASK))) - .build()) + .text(Messages.getString(MenuId.VIEW_DESKTOP_MODE.propertiesKey())) + .name(MenuId.VIEW_DESKTOP_MODE.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('M')) + .keyStrokeInfo(KeyStrokeInfo + .toKeyStrokeInfo(KeyStroke.getKeyStroke(KeyEvent.VK_F6, InputEvent.ALT_DOWN_MASK))) .actionListener(event -> { MysticCryptApplicationFrame.getInstance().switchToDesktopPane(); }).build().toJMenuItem(); viewModeMenu.add(switchDesktopMode); JMenuItem switchPanelMode = MenuItemInfo.builder() - - .menuInfo( - MenuInfo.builder().text(Messages.getString(MenuId.VIEW_PANEL_MODE.propertiesKey())) - .name(MenuId.VIEW_PANEL_MODE.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('Q')) - .keyStrokeInfo(KeyStrokeInfo.toKeyStrokeInfo( - KeyStroke.getKeyStroke(KeyEvent.VK_F7, InputEvent.ALT_DOWN_MASK))) - .build()) - + .text(Messages.getString(MenuId.VIEW_PANEL_MODE.propertiesKey())) + .name(MenuId.VIEW_PANEL_MODE.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('Q')) + .keyStrokeInfo(KeyStrokeInfo + .toKeyStrokeInfo(KeyStroke.getKeyStroke(KeyEvent.VK_F7, InputEvent.ALT_DOWN_MASK))) .actionListener(event -> { MysticCryptApplicationFrame.getInstance().switchToApplicationPanel(); }).build().toJMenuItem(); @@ -171,34 +153,24 @@ protected JMenu newFileMenu() { // @formatter:on // File - final JMenu fileMenu = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text("File").name(BaseMenuId.FILE.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('F')).build()) - - .build().toJMenu(); + final JMenu fileMenu = MenuItemInfo.builder().text("File") + .name(BaseMenuId.FILE.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('F')).build() + .toJMenu(); // Open Database - JMenuItem openDatabaseMenuItem = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text("Open Database") - .name(MenuId.OPEN_DATABASE.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('D')) - .keyStrokeInfo(KeyStrokeInfo - .toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed D"))) - .build()) - + JMenuItem openDatabaseMenuItem = MenuItemInfo.builder().text("Open Database") + .name(MenuId.OPEN_DATABASE.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('D')) + .keyStrokeInfo( + KeyStrokeInfo.toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed D"))) .actionListener(new OpenDatabaseTreeFrameAction("Open Database")).build().toJMenuItem(); fileMenu.add(openDatabaseMenuItem); // Save application file - JMenuItem saveApplicationFileMenuItem = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text("Save") - .name(MenuId.SAVE_APPLICATION_FILE.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('S')) - .keyStrokeInfo(KeyStrokeInfo - .toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed S"))) - .build()) + JMenuItem saveApplicationFileMenuItem = MenuItemInfo.builder().text("Save") + .name(MenuId.SAVE_APPLICATION_FILE.propertiesKey()) + .mnemonic(MenuExtensions.toMnemonic('S')) + .keyStrokeInfo( + KeyStrokeInfo.toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed S"))) .actionListener(new SaveApplicationFileAction("Save")).build().toJMenuItem(); fileMenu.add(saveApplicationFileMenuItem); @@ -206,37 +178,25 @@ protected JMenu newFileMenu() // @formatter:off // Main secret key menu // @formatter:on - final JMenu keyMenu = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text("Secret key").name(MenuId.SECRET_KEY.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('K')).build()) - + final JMenu keyMenu = MenuItemInfo.builder().text("Secret key") + .name(MenuId.SECRET_KEY.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('K')) .build().toJMenu(); fileMenu.add(keyMenu); // @formatter:off // @formatter:on // New key generation - JMenuItem newSecretKeyJMenuItem = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text("New key generation") - .name(MenuId.SECRET_KEY_NEW.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('K')) - .keyStrokeInfo(KeyStrokeInfo - .toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed K"))) - .build()) - + JMenuItem newSecretKeyJMenuItem = MenuItemInfo.builder().text("New key generation") + .name(MenuId.SECRET_KEY_NEW.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('K')) + .keyStrokeInfo( + KeyStrokeInfo.toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed K"))) .actionListener(new NewKeyGenerationInternalFrameAction("New key generation")).build() .toJMenuItem(); keyMenu.add(newSecretKeyJMenuItem); // Open private key - JMenuItem openPrivateKeyMenuItem = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text("Open private key") - .name(MenuId.OPEN_PRIVATE_KEY.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('P')) - .keyStrokeInfo(KeyStrokeInfo - .toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed P"))) - .build()) + JMenuItem openPrivateKeyMenuItem = MenuItemInfo.builder().text("Open private key") + .name(MenuId.OPEN_PRIVATE_KEY.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('P')) + .keyStrokeInfo( + KeyStrokeInfo.toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed P"))) .actionListener(new OpenPrivateKeyAction("Open private key", getApplicationFrame())) .build().toJMenuItem(); @@ -244,40 +204,27 @@ protected JMenu newFileMenu() // Separator fileMenu.addSeparator(); - final JMenu obfuscationMenu = MenuItemInfo.builder() - - .menuInfo( - MenuInfo.builder().text("Obfuscation").name(MenuId.OBFUSCATION.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('O')).build()) - + final JMenu obfuscationMenu = MenuItemInfo.builder().text("Obfuscation") + .name(MenuId.OBFUSCATION.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('O')) .build().toJMenu(); fileMenu.add(obfuscationMenu); // New simple obfuscation - JMenuItem simpleObfuscationMenuItem = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text("Simple obfuscation") - .name(MenuId.SIMPLE_OBFUSCATION.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('Y')) - .keyStrokeInfo(KeyStrokeInfo - .toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed Y"))) - .build()) - + JMenuItem simpleObfuscationMenuItem = MenuItemInfo.builder().text("Simple obfuscation") + .name(MenuId.SIMPLE_OBFUSCATION.propertiesKey()) + .mnemonic(MenuExtensions.toMnemonic('Y')) + .keyStrokeInfo( + KeyStrokeInfo.toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed Y"))) .actionListener(new NewObfuscationInternalFrameAction("Simple Obfuscation")).build() .toJMenuItem(); obfuscationMenu.add(simpleObfuscationMenuItem); // New operated obfuscation - JMenuItem operatedObfuscationMenuItem = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text("Operated obfuscation") - .name(MenuId.OPERATED_OBFUSCATION.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('N')) - .keyStrokeInfo(KeyStrokeInfo - .toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed N"))) - .build()) - - + JMenuItem operatedObfuscationMenuItem = MenuItemInfo.builder().text("Operated obfuscation") + .name(MenuId.OPERATED_OBFUSCATION.propertiesKey()) + .mnemonic(MenuExtensions.toMnemonic('N')) + .keyStrokeInfo( + KeyStrokeInfo.toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed N"))) .actionListener(new NewObfuscationInternalFrameAction("Operated Obfuscation")).build() .toJMenuItem(); obfuscationMenu.add(operatedObfuscationMenuItem); @@ -285,15 +232,10 @@ protected JMenu newFileMenu() // Separator fileMenu.addSeparator(); // Convert der to pem file - JMenuItem convertMenuItem = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text("Convert...").name(MenuId.CONVERT.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('C')) - .keyStrokeInfo(KeyStrokeInfo - .toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed C"))) - .build()) - - + JMenuItem convertMenuItem = MenuItemInfo.builder().text("Convert...") + .name(MenuId.CONVERT.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('C')) + .keyStrokeInfo( + KeyStrokeInfo.toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("ctrl pressed C"))) .actionListener( new NewFileConversionInternalFrameAction("Convert *.der-file to *.pem-file")) .build().toJMenuItem(); @@ -301,15 +243,11 @@ protected JMenu newFileMenu() fileMenu.add(convertMenuItem); // Fullscreen - JMenuItem toggleFullscreenMenuItem = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text("Toggle Fullscreen") - .name(BaseMenuId.TOGGLE_FULLSCREEN.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('T')) - .keyStrokeInfo(KeyStrokeInfo - .toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("alt pressed F11"))) - .build()) - + JMenuItem toggleFullscreenMenuItem = MenuItemInfo.builder().text("Toggle Fullscreen") + .name(BaseMenuId.TOGGLE_FULLSCREEN.propertiesKey()) + .mnemonic(MenuExtensions.toMnemonic('T')) + .keyStrokeInfo( + KeyStrokeInfo.toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("alt pressed F11"))) .actionListener(new ApplicationToggleFullScreenAction("Fullscreen", MysticCryptApplicationFrame.getInstance())) @@ -317,28 +255,18 @@ protected JMenu newFileMenu() fileMenu.add(toggleFullscreenMenuItem); // Console - JMenuItem consoleMenuItem = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text("Console").name(MenuId.CONSOLE.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('L')) - .keyStrokeInfo(KeyStrokeInfo - .toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("alt pressed L"))) - .build()) - - + JMenuItem consoleMenuItem = MenuItemInfo.builder().text("Console") + .name(MenuId.CONSOLE.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('L')) + .keyStrokeInfo( + KeyStrokeInfo.toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("alt pressed L"))) .actionListener(new OpenConsoleFrameAction("Console")).build().toJMenuItem(); fileMenu.add(consoleMenuItem); // Exit - JMenuItem exitMenuItem = MenuItemInfo.builder() - - .menuInfo(MenuInfo.builder().text("Exit").name(BaseMenuId.EXIT.propertiesKey()) - .mnemonic(MenuExtensions.toMnemonic('E')) - .keyStrokeInfo(KeyStrokeInfo - .toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("alt pressed F4"))) - .build()) - - + JMenuItem exitMenuItem = MenuItemInfo.builder().text("Exit") + .name(BaseMenuId.EXIT.propertiesKey()).mnemonic(MenuExtensions.toMnemonic('E')) + .keyStrokeInfo( + KeyStrokeInfo.toKeyStrokeInfo(KeyStrokeExtensions.getKeyStroke("alt pressed F4"))) .actionListener(new ExitApplicationAction("Exit")).build().toJMenuItem(); fileMenu.add(exitMenuItem); // @formatter:off diff --git a/src/test/java/io/github/astrapi69/mystic/crypt/panel/dbtree/TestBaseTreeNodeFactory.java b/src/test/java/io/github/astrapi69/mystic/crypt/panel/dbtree/TestBaseTreeNodeFactory.java index 17d6cd8a..65606377 100644 --- a/src/test/java/io/github/astrapi69/mystic/crypt/panel/dbtree/TestBaseTreeNodeFactory.java +++ b/src/test/java/io/github/astrapi69/mystic/crypt/panel/dbtree/TestBaseTreeNodeFactory.java @@ -34,7 +34,7 @@ import io.github.astrapi69.swing.tree.factory.BaseTreeNodeFactory; import io.github.astrapi69.swing.renderer.tree.GenericTreeElement; import io.github.astrapi69.swing.tree.model.TreeElement; -import io.github.astrapi69.test.instance.TestPermissionFactory; +import io.github.astrapi69.test.object.factory.TestPermissionFactory; import io.github.astrapi69.test.object.Permission; public class TestBaseTreeNodeFactory