diff --git a/build.gradle b/build.gradle index b440b02b1..d8f29e6d2 100644 --- a/build.gradle +++ b/build.gradle @@ -145,18 +145,13 @@ dependencies { implementation 'ch.qos.logback:logback-classic:1.6.6' implementation 'ch.qos.logback:logback-core:1.6.6' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.23.0' - implementation 'com.formdev:flatlaf:3.8' - implementation 'com.formdev:flatlaf-intellij-themes:3.8' //Not imported - Theme.java loads these themes by class name implementation 'com.github.jiconfont:jiconfont-font_awesome:4.7.0.1' implementation 'com.github.jiconfont:jiconfont-javafx:1.0.0' - implementation 'com.github.jiconfont:jiconfont-swing:1.0.1' implementation('com.github.wendykierp:JTransforms:3.2') { exclude group: 'junit' //JLargeArrays 1.7 declares junit as a compile dependency } implementation 'com.google.code.gson:gson:2.15.0' implementation 'com.google.guava:guava:33.8.0-jre' - implementation 'com.jidesoft:jide-oss:3.6.18' - implementation 'com.miglayout:miglayout-swing:11.5.2' implementation 'com.mpatric:mp3agic:0.9.1' implementation 'commons-io:commons-io:2.22.0' implementation 'io.github.dsheirer:jairspy:1.0.12.1' //Airspy tuners - GitHub release, see settings.gradle @@ -195,7 +190,6 @@ tasks.withType(JavaCompile).configureEach { */ def jvmArgsWindows = ['--add-exports=javafx.base/com.sun.javafx.event=ALL-UNNAMED', //Needed for controls-fx.jar - '--add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED', //windows users for JIDE '--add-modules=jdk.incubator.vector', //Project Panama vector API is still in incubator '--enable-preview', //Project Panama Vector API is still in incubator '--enable-native-access=ALL-UNNAMED', //Suppress unsafe warnings for FFM API Foreign Memory calls @@ -315,9 +309,9 @@ def configure(RuntimeZipTask rt, List jvmArgs) { //jdk.incubator.vector - needed for Project Panama foreign function and vector apis //jdk.accessibility is used with assistive technologies like screen readers //java.management for JVM resource monitoring - //java.base, java.logging, java.net.http, java.prefs, javafx.controls, javafx.swing - required by sdrtrunk (jdeps) + //java.base, java.desktop, java.logging, java.net.http, java.prefs, javafx.controls - required by sdrtrunk (jdeps) rt.extension.addModules('jdk.charsets', 'jdk.crypto.ec', 'jdk.incubator.vector', 'jdk.accessibility', 'java.management', - 'java.base', 'java.logging', 'java.net.http', 'java.prefs', 'javafx.controls', 'javafx.swing') + 'java.base', 'java.desktop', 'java.logging', 'java.net.http', 'java.prefs', 'javafx.controls') //Use only the modules listed above. The runtime plugin's module auto-detection uses a bundled ASM library that //can't read Java 27 class files and logs a 'Failed to scan' error for each sdrtrunk class. The jdeps module check diff --git a/src/main/java/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java b/src/main/java/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java deleted file mode 100644 index 8603623a4..000000000 --- a/src/main/java/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * ***************************************************************************** - * Copyright (C) 2014-2026 Dennis Sheirer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * **************************************************************************** - */ - -package com.sun.java.swing.plaf.windows; - -import javax.swing.LookAndFeel; -import javax.swing.UIDefaults; - -/** - * No-op stub for the JDK's Windows look-and-feel. - * - *

JIDE 3.6.18's {@code LookAndFeelFactory} contains compile-time - * {@code instanceof com.sun.java.swing.plaf.windows.WindowsLookAndFeel} checks throughout its - * dispatch logic. On Linux and macOS JDK builds that class is genuinely absent from - * {@code java.desktop}, so the JVM throws {@link NoClassDefFoundError} the first time JIDE's - * dispatch code executes the {@code instanceof} bytecode. That happens during - * {@link com.jidesoft.swing.JideSplitPane#updateUI()} on every LAF change. - * - *

This stub lives in the classpath so the class reference resolves on non-Windows JDKs. - * On Windows JDK builds the real {@code WindowsLookAndFeel} is loaded from the - * {@code java.desktop} module via the boot class loader and shadows this class. - * - *

The stub reports itself as not native and not supported - JIDE never instantiates this - * class, it only uses it for {@code instanceof} comparisons against the active LAF. Since - * sdrtrunk never installs this LAF, the {@code instanceof} check always returns false and - * JIDE proceeds to its next branch. - */ -public class WindowsLookAndFeel extends LookAndFeel -{ - @Override - public String getName() - { - return "Windows (stub)"; - } - - @Override - public String getID() - { - return "WindowsStub"; - } - - @Override - public String getDescription() - { - return "Compatibility stub for JIDE's instanceof checks on non-Windows JDKs."; - } - - @Override - public boolean isNativeLookAndFeel() - { - return false; - } - - @Override - public boolean isSupportedLookAndFeel() - { - return false; - } - - @Override - public UIDefaults getDefaults() - { - return new UIDefaults(); - } -} diff --git a/src/main/java/io/github/dsheirer/alias/action/RecurringAction.java b/src/main/java/io/github/dsheirer/alias/action/RecurringAction.java index 7a5391e97..c48318224 100644 --- a/src/main/java/io/github/dsheirer/alias/action/RecurringAction.java +++ b/src/main/java/io/github/dsheirer/alias/action/RecurringAction.java @@ -19,14 +19,16 @@ package io.github.dsheirer.alias.action; +import io.github.dsheirer.gui.FxToolkit; +import javafx.application.Platform; +import javafx.scene.control.Alert; + import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import io.github.dsheirer.alias.Alias; import io.github.dsheirer.message.IMessage; import io.github.dsheirer.util.ThreadPool; -import javax.swing.*; -import java.awt.*; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; @@ -62,23 +64,28 @@ public abstract class RecurringAction extends AliasAction mPerpetualAction = ThreadPool.SCHEDULED.scheduleAtFixedRate( new PerformActionTask(alias, message), 0, mPeriod, TimeUnit.SECONDS); - StringBuilder sb = new StringBuilder(); - sb.append("

Alias ["); - sb.append(alias.getName()); - sb.append("] is active in message ["); - sb.append(message.toString()); - sb.append("]
"); - - final String text = sb.toString(); - - EventQueue.invokeLater(() -> { - JOptionPane.showMessageDialog(null, text, - "Alias Alert", JOptionPane.INFORMATION_MESSAGE); + String text = "Alias [" + alias.getName() + "] is active in message [" + message + "]"; + Runnable dismissed = () -> { dismiss(false); - ThreadPool.SCHEDULED.schedule(new ResetTask(), 15, TimeUnit.SECONDS); - }); + }; + + if(FxToolkit.isStarted()) + { + //The action repeats until the user closes the alert + Platform.runLater(() -> { + Alert alert = new Alert(Alert.AlertType.INFORMATION, text); + alert.setTitle("Alias Alert"); + alert.setHeaderText(null); + alert.setOnHidden(event -> dismissed.run()); + alert.show(); + }); + } + else + { + dismissed.run(); + } break; default: } diff --git a/src/main/java/io/github/dsheirer/audio/broadcast/BroadcastModel.java b/src/main/java/io/github/dsheirer/audio/broadcast/BroadcastModel.java index 9100d2657..ed798a6f6 100644 --- a/src/main/java/io/github/dsheirer/audio/broadcast/BroadcastModel.java +++ b/src/main/java/io/github/dsheirer/audio/broadcast/BroadcastModel.java @@ -46,9 +46,8 @@ import javafx.collections.ObservableList; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.swing.table.AbstractTableModel; -public class BroadcastModel extends AbstractTableModel implements Listener +public class BroadcastModel implements Listener { private final static Logger mLog = LoggerFactory.getLogger(BroadcastModel.class); @@ -57,18 +56,6 @@ public class BroadcastModel extends AbstractTableModel implements Listener