public Component getTreeCellRendererComponent(JTree tree, Object value,
      boolean selected, boolean expanded, boolean leaf, int row,
      boolean hasFocus) {

    Component returnValue = null;
    if ((value != null) && (value instanceof DefaultMutableTreeNode)) {
      Object userObject = ((DefaultMutableTreeNode) value).getUserObject();
      if (userObject instanceof Actions) {
        Actions action = (Actions) userObject;
        label.setText(action.getDescription());

        if (selected) {
          renderer.setBackground(backgroundSelectionColor);
        } else {
          renderer.setBackground(backgroundNonSelectionColor);
        }

        if (action.getClass().equals(StartAction.class)) {
          label.setForeground(Color.RED);
        } else if (action.getClass().equals(CheckColour.class)) {
          label.setForeground(Color.BLUE);
        } else {
          label.setForeground(Color.BLACK);
        }

        renderer.setEnabled(tree.isEnabled());
        returnValue = renderer;
      }
    }
    if (returnValue == null) {
      returnValue = defaultRenderer.getTreeCellRendererComponent(tree, value,
          selected, expanded, leaf, row, hasFocus);
    }
    return returnValue;

  }