cvs commit: jakarta-jmeter/src/core/org/apache/jmeter/gui/tree JMeterCellRenderer.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

cvs commit: jakarta-jmeter/src/core/org/apache/jmeter/gui/tree JMeterCellRenderer.java

sebb-3
sebb        2005/06/14 17:08:10

  Modified:    src/core/org/apache/jmeter/gui/tree JMeterCellRenderer.java
  Log:
  Set a disabledIcon if available.
 
  Revision  Changes    Path
  1.8       +22 -5     jakarta-jmeter/src/core/org/apache/jmeter/gui/tree/JMeterCellRenderer.java
 
  Index: JMeterCellRenderer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/gui/tree/JMeterCellRenderer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JMeterCellRenderer.java 17 May 2005 22:58:38 -0000 1.7
  +++ JMeterCellRenderer.java 15 Jun 2005 00:08:10 -0000 1.8
  @@ -50,12 +50,29 @@
               leaf,
               row,
               p_hasFocus);
  -        this.setEnabled(((JMeterTreeNode)value).isEnabled());
  -        ImageIcon ic = ((JMeterTreeNode)value).getIcon();
  +        boolean enabled=((JMeterTreeNode)value).isEnabled();
  +        ImageIcon ic = ((JMeterTreeNode)value).getIcon(enabled);
           if (ic != null)
           {
  -            setIcon(ic);
  +            if (enabled)
  +            {
  +                setIcon(ic);
  +            }
  +            else
  +            {
  +                setDisabledIcon(ic);
  +            }
           }
  +        else
  +        {
  +            if (!enabled)// i.e. no disabled icon found
  +            {
  +                // Must therefore set the enabled icon so there is at least some icon
  +                ic = ((JMeterTreeNode)value).getIcon();
  +                if (ic != null) setIcon(ic);
  +            }
  +        }
  +        this.setEnabled(enabled);
           return this;
       }
   }
 
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]