mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-20 12:36:07 -05:00
* Removes the FlatLaf, JIDE, MigLayout and jiconfont-swing dependencies; the runtime image no longer includes javafx.swing. * Removes the Swing channelizer developer viewers and the Swing spectrum panel; the symbol, sync and filter debug viewers are plain JavaFX windows. * ChannelMapModel is no longer a Swing list model; removes unused Swing color menu items and models. * Removes the Swing image methods from the icon classes; icons load as JavaFX images. * Themes no longer use FlatLaf: each theme stores its palette and ThemeManager styles JavaFX only. * The channel auto-start countdown, the event and message filter editor and the alias and deadlock alerts are now JavaFX. The main window only stores split pane divider positions after the user drags a divider. * Main window converted to JavaFX, with a spectrum and waterfall display that can be hidden. * A hidden spectrum and waterfall is disposed so that it uses no processing or memory. Show or hide it from the View menu, Ctrl+Shift+S, the display settings panel or the bar shown while it is hidden. * Streaming status panel converted to JavaFX with status chips, a summary, configurable columns and a shortcut to the streaming editor. * BroadcastModel is no longer a Swing table model. * Audio panel converted to JavaFX and redesigned as a prominent playback display at the top of the main window. * Mono and stereo outputs show one display per channel with the TO alias, icon and color, the FROM radio, system/site/channel, elapsed time, a level meter and per-channel mute. The master section has mute all, volume and audio device settings. * Renames JavaFxWindowManager to WindowManager and removes its standalone launcher and the remaining Swing-era comments. Co-authored-by: denny <dennis.sheirer@gmail.com>
This commit is contained in:
@@ -32,8 +32,6 @@ import javafx.util.Callback;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -46,7 +44,6 @@ public class Icon implements Comparable<Icon>
|
||||
private StringProperty mPath = new SimpleStringProperty();
|
||||
private BooleanProperty mDefaultIcon = new SimpleBooleanProperty();
|
||||
private BooleanProperty mStandardIcon = new SimpleBooleanProperty();
|
||||
private ImageIcon mImageIcon;
|
||||
private Image mFxImage;
|
||||
private boolean mFxImageLoaded = false;
|
||||
|
||||
@@ -168,40 +165,6 @@ public class Icon implements Comparable<Icon>
|
||||
mPath.set(path);
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public ImageIcon getIcon()
|
||||
{
|
||||
if(mImageIcon == null && mPath != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(!getPath().startsWith("images"))
|
||||
{
|
||||
mImageIcon = new ImageIcon(getPath());
|
||||
}
|
||||
else
|
||||
{
|
||||
URL imageURL = Icon.class.getResource(getPath());
|
||||
|
||||
if(imageURL == null && !getPath().startsWith("/"))
|
||||
{
|
||||
imageURL = (Icon.class.getResource("/" + getPath()));
|
||||
}
|
||||
|
||||
if(imageURL != null)
|
||||
{
|
||||
mImageIcon = new ImageIcon(imageURL);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
mLog.error("Error loading Icon [" + getPath() + "]", e);
|
||||
}
|
||||
}
|
||||
|
||||
return mImageIcon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lazy loads an FX image for the icon and retains it in memory.
|
||||
|
||||
Reference in New Issue
Block a user