mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Updates alias list to provide a list of aliases for an identifier so that (#474)
we can account for multi-alias identifiers like patch groups and ensure that patch group alias intentions are carried throughout the system for recording, streaming, etc. Updates all consumers of alias list data to ensure it can operate with a list of aliases versus an assumed single alias. Refactors APCO25 unit/user status identifiers from a base status class so that alias list can support status identifiers.
This commit is contained in:
@@ -32,6 +32,7 @@ import java.awt.Color;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.RenderingHints;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class PlottableEntityRenderer
|
||||
@@ -58,7 +59,10 @@ public class PlottableEntityRenderer
|
||||
graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
}
|
||||
|
||||
Alias alias = getAlias(entity);
|
||||
List<Alias> aliases = getAliases(entity);
|
||||
|
||||
Alias alias = aliases.isEmpty() ? null : aliases.get(0);
|
||||
|
||||
/**
|
||||
* Use the entity's preferred color for lines and labels
|
||||
*/
|
||||
@@ -99,16 +103,16 @@ public class PlottableEntityRenderer
|
||||
/**
|
||||
* Optional alias that matches the identifier for the entity history
|
||||
*/
|
||||
private Alias getAlias(PlottableEntityHistory entityHistory)
|
||||
private List<Alias> getAliases(PlottableEntityHistory entityHistory)
|
||||
{
|
||||
AliasList aliasList = mAliasModel.getAliasList(entityHistory.getIdentifierCollection());
|
||||
|
||||
if(aliasList != null)
|
||||
{
|
||||
return aliasList.getAlias(entityHistory.getIdentifier());
|
||||
return aliasList.getAliases(entityHistory.getIdentifier());
|
||||
}
|
||||
|
||||
return null;
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
|
||||
private ImageIcon getIcon(Alias alias)
|
||||
|
||||
Reference in New Issue
Block a user