Decoder icon updates. Changed from colorized icons to a standard set of decoder icons and will now color the text of the channel node to reflect the status (green - processing, red - no tuner, no color - disabled )
BIN
images/acars.png
Normal file
|
After Width: | Height: | Size: 498 B |
BIN
images/ais.png
Normal file
|
After Width: | Height: | Size: 495 B |
BIN
images/am.png
Normal file
|
After Width: | Height: | Size: 456 B |
BIN
images/aprs.png
Normal file
|
After Width: | Height: | Size: 504 B |
BIN
images/dmr.png
Normal file
|
After Width: | Height: | Size: 520 B |
BIN
images/fm.png
|
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 378 B |
|
Before Width: | Height: | Size: 558 B |
|
Before Width: | Height: | Size: 571 B |
|
Before Width: | Height: | Size: 566 B |
BIN
images/ltr.png
Normal file
|
After Width: | Height: | Size: 379 B |
|
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 379 B |
|
Before Width: | Height: | Size: 687 B |
|
Before Width: | Height: | Size: 692 B |
|
Before Width: | Height: | Size: 691 B |
|
Before Width: | Height: | Size: 371 B |
|
Before Width: | Height: | Size: 532 B |
|
Before Width: | Height: | Size: 528 B |
|
Before Width: | Height: | Size: 532 B |
BIN
images/motorola_type_2.png
Normal file
|
After Width: | Height: | Size: 405 B |
|
Before Width: | Height: | Size: 657 B After Width: | Height: | Size: 435 B |
|
Before Width: | Height: | Size: 829 B |
|
Before Width: | Height: | Size: 842 B |
|
Before Width: | Height: | Size: 859 B |
BIN
images/nxdn.png
Normal file
|
After Width: | Height: | Size: 470 B |
BIN
images/p25_1.png
Normal file
|
After Width: | Height: | Size: 493 B |
BIN
images/p25_2.png
Normal file
|
After Width: | Height: | Size: 462 B |
|
Before Width: | Height: | Size: 649 B After Width: | Height: | Size: 443 B |
|
Before Width: | Height: | Size: 802 B |
|
Before Width: | Height: | Size: 806 B |
|
Before Width: | Height: | Size: 815 B |
|
Before Width: | Height: | Size: 712 B |
|
Before Width: | Height: | Size: 723 B |
|
Before Width: | Height: | Size: 673 B |
|
Before Width: | Height: | Size: 983 B |
|
Before Width: | Height: | Size: 1003 B |
|
Before Width: | Height: | Size: 900 B |
@@ -17,6 +17,7 @@
|
||||
******************************************************************************/
|
||||
package controller;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -57,6 +58,11 @@ public class BaseNode extends DefaultMutableTreeNode
|
||||
return null;
|
||||
}
|
||||
|
||||
public Color getForegroundColor()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
if( getUserObject() != null )
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
******************************************************************************/
|
||||
package controller;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Image;
|
||||
import java.util.HashMap;
|
||||
@@ -25,6 +26,8 @@ import javax.swing.ImageIcon;
|
||||
import javax.swing.JTree;
|
||||
import javax.swing.tree.DefaultTreeCellRenderer;
|
||||
|
||||
import controller.channel.ChannelNode;
|
||||
|
||||
public class ControllerTreeCellRenderer extends DefaultTreeCellRenderer
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -46,18 +49,17 @@ public class ControllerTreeCellRenderer extends DefaultTreeCellRenderer
|
||||
|
||||
if( value instanceof BaseNode )
|
||||
{
|
||||
ImageIcon icon = getIcon( (BaseNode)value );
|
||||
BaseNode node = (BaseNode)value;
|
||||
|
||||
if( icon != null )
|
||||
ImageIcon icon = getIcon( node );
|
||||
|
||||
setIcon( icon );
|
||||
|
||||
Color foreground = node.getForegroundColor();
|
||||
|
||||
if( foreground != null )
|
||||
{
|
||||
if( icon.getIconHeight() > 16 )
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
setIcon( icon );
|
||||
}
|
||||
setForeground( foreground );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
******************************************************************************/
|
||||
package controller.channel;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
@@ -98,21 +99,27 @@ public class ChannelNode extends ConfigurableNode implements ChannelEventListene
|
||||
@Override
|
||||
public String getIconPath()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
Channel channel = getChannel();
|
||||
|
||||
sb.append( channel.getDecodeConfiguration().getDecoderType().getIconPrefix() );
|
||||
|
||||
if( channel.getEnabled() )
|
||||
return getChannel().getDecodeConfiguration().getDecoderType()
|
||||
.getIconFilename();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color getForegroundColor()
|
||||
{
|
||||
if( getChannel().getEnabled() )
|
||||
{
|
||||
sb.append( channel.isProcessing() ? "_green" : "_red" );
|
||||
if( getChannel().isProcessing() )
|
||||
{
|
||||
return Color.GREEN;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Color.RED;
|
||||
}
|
||||
}
|
||||
|
||||
sb.append( ".png" );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JPanel getEditor()
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
package controller.site;
|
||||
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.Enumeration;
|
||||
@@ -59,27 +60,27 @@ public class SiteNode extends ConfigurableNode
|
||||
|
||||
public String getIconPath()
|
||||
{
|
||||
String retVal = "images/site.png";
|
||||
|
||||
return "images/site.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color getForegroundColor()
|
||||
{
|
||||
@SuppressWarnings( "unchecked" )
|
||||
Enumeration<DefaultMutableTreeNode> nodes = children();
|
||||
|
||||
while( nodes.hasMoreElements() )
|
||||
{
|
||||
ChannelNode child = (ChannelNode)nodes.nextElement();
|
||||
|
||||
if( child.getIconPath().contains( "green.png" ) )
|
||||
|
||||
if( child.getForegroundColor() != null )
|
||||
{
|
||||
return "images/site_green.png";
|
||||
}
|
||||
else if( child.getIconPath().contains( "red.png" ) )
|
||||
{
|
||||
retVal = "images/site_red.png";
|
||||
return Color.BLUE;
|
||||
}
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JPanel getEditor()
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
package controller.system;
|
||||
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.Enumeration;
|
||||
@@ -29,6 +30,7 @@ import javax.swing.JSeparator;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
|
||||
import controller.ConfigurableNode;
|
||||
import controller.channel.ChannelNode;
|
||||
import controller.site.Site;
|
||||
import controller.site.SiteNode;
|
||||
|
||||
@@ -58,28 +60,28 @@ public class SystemNode extends ConfigurableNode
|
||||
@Override
|
||||
public String getIconPath()
|
||||
{
|
||||
String retVal = "images/system.png";
|
||||
|
||||
return "images/system.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color getForegroundColor()
|
||||
{
|
||||
@SuppressWarnings( "unchecked" )
|
||||
Enumeration<DefaultMutableTreeNode> nodes = children();
|
||||
|
||||
while( nodes.hasMoreElements() )
|
||||
{
|
||||
SiteNode child = (SiteNode)nodes.nextElement();
|
||||
|
||||
if( child.getIconPath().contains( "green.png" ) )
|
||||
|
||||
if( child.getForegroundColor() != null )
|
||||
{
|
||||
return "images/system_green.png";
|
||||
}
|
||||
else if( child.getIconPath().contains( "red.png" ) )
|
||||
{
|
||||
retVal = "images/system_red.png";
|
||||
return Color.BLUE;
|
||||
}
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JPanel getEditor()
|
||||
{
|
||||
|
||||