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 )

This commit is contained in:
dennis.sheirer
2014-12-06 20:20:50 +00:00
parent fb630916a9
commit 0b535d8143
41 changed files with 65 additions and 47 deletions

View File

@@ -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()