mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
#961 Resolves issue where invoking channel actions from Swing thread causes error on JavaFX GUI thread. Removes the Start/Disable/Delete commands from the Swing menu options and replaces with a single View/Edit call to the JavaFX channel editor. Although this reduces ease/functionality, it sidesteps code complications until the main GUI can be recreated in JavaFX. (#964)
Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
@@ -126,8 +126,6 @@ public class Channel extends Configuration implements Listener<SourceEvent>
|
||||
mChannelID = UNIQUE_ID++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Creates a (new) deep copy of this channel
|
||||
*/
|
||||
@@ -183,6 +181,69 @@ public class Channel extends Configuration implements Listener<SourceEvent>
|
||||
return channel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a short title containing the system, site and channel name where each value is constrained to
|
||||
* ten characters each.
|
||||
* @return short title
|
||||
*/
|
||||
public String getShortTitle()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if(getSystem() != null)
|
||||
{
|
||||
if(getSystem().length() > 10)
|
||||
{
|
||||
sb.append(getSystem().substring(0, 10)).append("..");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append(getSystem());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append("No System");
|
||||
}
|
||||
|
||||
sb.append("/");
|
||||
|
||||
if(getSite() != null)
|
||||
{
|
||||
if(getSite().length() > 10)
|
||||
{
|
||||
sb.append(getSite().substring(0, 10)).append("..");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append(getSite());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append("No Site");
|
||||
}
|
||||
sb.append("/");
|
||||
|
||||
if(getName() != null)
|
||||
{
|
||||
if(getName().length() > 10)
|
||||
{
|
||||
sb.append(getName().substring(0, 10)).append("..");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append(getName());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append("No Channel");
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the frequencies property as the source configuration changes or is initialized.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user