package org.helioviewer.plugins.eveplugin.view.linedataselector.cellrenderer;

import java.awt.Component;

import javax.swing.JProgressBar;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;

import org.helioviewer.plugins.eveplugin.view.linedataselector.LineDataSelectorElement;

public class LoadingCellRenderer extends DefaultTableCellRenderer {

    private static final long serialVersionUID = 2173458369966852891L;

    private final JProgressBar downloadProgressBar = new JProgressBar();

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        LineDataSelectorElement element = (LineDataSelectorElement) value;
        downloadProgressBar.setIndeterminate(true);
        downloadProgressBar.setVisible(element.isDownloading());
        return downloadProgressBar;
    }
}

@@ -208,24 +208,65 @@
 lRenderer;%0A%0A
+import org.helioviewer.base.logging.Log;%0A
 import org.h
@@ -786,16 +786,133 @@
  value;%0A
+        Log.debug(%22element is downloading : %22 + element.isDownloading());%0A        if (element.isDownloading()) %7B%0A    
         
@@ -955,16 +955,20 @@
 (true);%0A
+    
         
@@ -1032,16 +1032,20 @@
         
+ 
+   
 return d
@@ -1064,16 +1064,68 @@
 essBar;%0A
+        %7D else %7B%0A            return null;%0A        %7D%0A
     %7D%0A%7D%0A

Remove progress bar if element if not loading anymore