Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.Designer.cs
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.Designer.cs	(revision 8528)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.Designer.cs	(revision 8529)
@@ -35,4 +35,6 @@
       this.PictureBox = new System.Windows.Forms.PictureBox();
       this.SplitContainer = new System.Windows.Forms.SplitContainer();
+      this.CalculatingPanel = new System.Windows.Forms.Panel();
+      this.CalculatingLabel = new System.Windows.Forms.Label();
       ((System.ComponentModel.ISupportInitialize)(this.DataGridView)).BeginInit();
       ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).BeginInit();
@@ -41,4 +43,5 @@
       this.SplitContainer.Panel2.SuspendLayout();
       this.SplitContainer.SuspendLayout();
+      this.CalculatingPanel.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -55,4 +58,5 @@
       this.DataGridView.TabIndex = 0;
       this.DataGridView.VirtualMode = true;
+      this.DataGridView.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.DataGridView_CellPainting);
       this.DataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.DataGridView_CellValueNeeded);
       this.DataGridView.ColumnHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.DataGridView_ColumnHeaderMouseClick);
@@ -61,19 +65,18 @@
       // HeatMapProgressBar
       // 
-      this.HeatMapProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.HeatMapProgressBar.Location = new System.Drawing.Point(490, 6);
+      this.HeatMapProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+      this.HeatMapProgressBar.Location = new System.Drawing.Point(25, 46);
       this.HeatMapProgressBar.Name = "HeatMapProgressBar";
       this.HeatMapProgressBar.RightToLeft = System.Windows.Forms.RightToLeft.No;
-      this.HeatMapProgressBar.Size = new System.Drawing.Size(76, 21);
+      this.HeatMapProgressBar.Size = new System.Drawing.Size(154, 21);
       this.HeatMapProgressBar.TabIndex = 9;
-      this.HeatMapProgressBar.Visible = false;
       // 
       // PartitionComboBox
       // 
+      this.PartitionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
       this.PartitionComboBox.FormattingEnabled = true;
-      this.PartitionComboBox.Location = new System.Drawing.Point(348, 3);
+      this.PartitionComboBox.Location = new System.Drawing.Point(333, 3);
       this.PartitionComboBox.Name = "PartitionComboBox";
-      this.PartitionComboBox.Size = new System.Drawing.Size(124, 21);
+      this.PartitionComboBox.Size = new System.Drawing.Size(142, 21);
       this.PartitionComboBox.TabIndex = 8;
       this.PartitionComboBox.SelectedIndexChanged += new System.EventHandler(this.PartitionComboBox_SelectedIndexChanged);
@@ -90,4 +93,5 @@
       // CorrelationCalcComboBox
       // 
+      this.CorrelationCalcComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
       this.CorrelationCalcComboBox.FormattingEnabled = true;
       this.CorrelationCalcComboBox.Location = new System.Drawing.Point(110, 3);
@@ -121,5 +125,5 @@
       this.maximumLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
       this.maximumLabel.BackColor = System.Drawing.Color.Transparent;
-      this.maximumLabel.Location = new System.Drawing.Point(487, 30);
+      this.maximumLabel.Location = new System.Drawing.Point(487, 2);
       this.maximumLabel.Name = "maximumLabel";
       this.maximumLabel.Size = new System.Drawing.Size(73, 25);
@@ -134,7 +138,7 @@
       this.PictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
       this.PictureBox.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox.Image")));
-      this.PictureBox.Location = new System.Drawing.Point(507, 58);
+      this.PictureBox.Location = new System.Drawing.Point(507, 30);
       this.PictureBox.Name = "PictureBox";
-      this.PictureBox.Size = new System.Drawing.Size(35, 253);
+      this.PictureBox.Size = new System.Drawing.Size(35, 281);
       this.PictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
       this.PictureBox.TabIndex = 15;
@@ -161,4 +165,5 @@
       // SplitContainer.Panel2
       // 
+      this.SplitContainer.Panel2.Controls.Add(this.CalculatingPanel);
       this.SplitContainer.Panel2.Controls.Add(this.DataGridView);
       this.SplitContainer.Size = new System.Drawing.Size(475, 330);
@@ -166,4 +171,23 @@
       this.SplitContainer.TabIndex = 16;
       // 
+      // CalculatingPanel
+      // 
+      this.CalculatingPanel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.CalculatingPanel.Controls.Add(this.CalculatingLabel);
+      this.CalculatingPanel.Controls.Add(this.HeatMapProgressBar);
+      this.CalculatingPanel.Location = new System.Drawing.Point(138, 95);
+      this.CalculatingPanel.Name = "CalculatingPanel";
+      this.CalculatingPanel.Size = new System.Drawing.Size(200, 81);
+      this.CalculatingPanel.TabIndex = 10;
+      // 
+      // CalculatingLabel
+      // 
+      this.CalculatingLabel.AutoSize = true;
+      this.CalculatingLabel.Location = new System.Drawing.Point(42, 19);
+      this.CalculatingLabel.Name = "CalculatingLabel";
+      this.CalculatingLabel.Size = new System.Drawing.Size(120, 13);
+      this.CalculatingLabel.TabIndex = 10;
+      this.CalculatingLabel.Text = "Calculating correlation...";
+      // 
       // FeatureCorrelationView
       // 
@@ -172,5 +196,4 @@
       this.Controls.Add(this.SplitContainer);
       this.Controls.Add(this.minimumLabel);
-      this.Controls.Add(this.HeatMapProgressBar);
       this.Controls.Add(this.PictureBox);
       this.Controls.Add(this.maximumLabel);
@@ -184,4 +207,6 @@
       ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).EndInit();
       this.SplitContainer.ResumeLayout(false);
+      this.CalculatingPanel.ResumeLayout(false);
+      this.CalculatingPanel.PerformLayout();
       this.ResumeLayout(false);
 
@@ -200,4 +225,6 @@
     protected System.Windows.Forms.PictureBox PictureBox;
     protected System.Windows.Forms.SplitContainer SplitContainer;
+    protected System.Windows.Forms.Panel CalculatingPanel;
+    protected System.Windows.Forms.Label CalculatingLabel;
 
   }
Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.cs
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.cs	(revision 8528)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.cs	(revision 8529)
@@ -65,8 +65,8 @@
 
     protected void Content_ProgressCalculation(object sender, ProgressChangedEventArgs e) {
-      if (!HeatMapProgressBar.Visible && e.ProgressPercentage != HeatMapProgressBar.Maximum) {
-        HeatMapProgressBar.Show();
+      if (!CalculatingPanel.Visible && e.ProgressPercentage != HeatMapProgressBar.Maximum) {
+        CalculatingPanel.Show();
       } else if (e.ProgressPercentage == HeatMapProgressBar.Maximum) {
-        HeatMapProgressBar.Hide();
+        CalculatingPanel.Hide();
       }
       HeatMapProgressBar.Value = e.ProgressPercentage;
@@ -76,5 +76,4 @@
       base.OnContentChanged();
       if (Content != null) {
-        UpdateDataGrid();
         CorrelationCalcComboBox.DataSource = Content.CorrelationCalculators;
         PartitionComboBox.DataSource = Content.Partitions;
@@ -94,4 +93,5 @@
       string partition = (string)PartitionComboBox.SelectedItem;
       if (calc != null && partition != null) {
+        DataGridView.Columns.Clear();
         DataGridView.Enabled = false;
         Content.Recalculate(calc, partition);
@@ -144,10 +144,17 @@
     }
 
-    private void DataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) {
+    protected void DataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) {
       if (Content != null && DataGridView.Enabled && e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) {
         int rowIndex = virtualRowIndices[e.RowIndex];
         e.Value = Content[rowIndex, e.ColumnIndex];
-        DataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Style.BackColor = GetDataPointColor(Content[rowIndex, e.ColumnIndex], Content.Minimum, Content.Maximum);
-      }
+      }
+    }
+
+    protected void DataGridView_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) {
+      if (Content != null && DataGridView.Enabled && e.RowIndex >= 0 && e.ColumnIndex >= 0 && e.PaintParts.HasFlag(DataGridViewPaintParts.Background)) {
+        int rowIndex = virtualRowIndices[e.RowIndex];
+        e.CellStyle.BackColor = GetDataPointColor(Content[rowIndex, e.ColumnIndex], Content.Minimum, Content.Maximum);
+      }
+      e.Paint(e.CellBounds, e.PaintParts);
     }
 
@@ -158,9 +165,4 @@
       if (index < 0) index = 0;
       return colors[index];
-    }
-
-    protected override void OnShown(ViewShownEventArgs e) {
-      base.OnShown(e);
-      CalculateCorrelation();
     }
 
@@ -204,4 +206,5 @@
       UpdateSortGlyph();
       UpdateRowHeaders();
+      DataGridView.Invalidate();
     }
 
Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.Designer.cs
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.Designer.cs	(revision 8528)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.Designer.cs	(revision 8529)
@@ -31,15 +31,22 @@
       ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit();
       this.SplitContainer.Panel1.SuspendLayout();
+      this.SplitContainer.Panel2.SuspendLayout();
       this.SplitContainer.SuspendLayout();
+      this.CalculatingPanel.SuspendLayout();
       this.SuspendLayout();
+      // 
+      // PartitionComboBox
+      // 
+      this.PartitionComboBox.Location = new System.Drawing.Point(344, 3);
+      this.PartitionComboBox.Size = new System.Drawing.Size(131, 21);
       // 
       // maximumLabel
       // 
-      this.maximumLabel.Location = new System.Drawing.Point(487, 62);
+      this.maximumLabel.Location = new System.Drawing.Point(487, 3);
       // 
       // PictureBox
       // 
-      this.PictureBox.Location = new System.Drawing.Point(506, 91);
-      this.PictureBox.Size = new System.Drawing.Size(35, 220);
+      this.PictureBox.Location = new System.Drawing.Point(506, 31);
+      this.PictureBox.Size = new System.Drawing.Size(35, 280);
       // 
       // SplitContainer
@@ -54,4 +61,8 @@
       this.SplitContainer.SplitterDistance = 52;
       // 
+      // CalculatingPanel
+      // 
+      this.CalculatingPanel.Location = new System.Drawing.Point(138, 82);
+      // 
       // VariableSelectionLabel
       // 
@@ -65,4 +76,5 @@
       // VariableSelectionComboBox
       // 
+      this.VariableSelectionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
       this.VariableSelectionComboBox.FormattingEnabled = true;
       this.VariableSelectionComboBox.Location = new System.Drawing.Point(110, 30);
@@ -83,8 +95,9 @@
       // TimeframeComboBox
       // 
+      this.TimeframeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
       this.TimeframeComboBox.FormattingEnabled = true;
-      this.TimeframeComboBox.Location = new System.Drawing.Point(348, 30);
+      this.TimeframeComboBox.Location = new System.Drawing.Point(344, 30);
       this.TimeframeComboBox.Name = "TimeframeComboBox";
-      this.TimeframeComboBox.Size = new System.Drawing.Size(124, 21);
+      this.TimeframeComboBox.Size = new System.Drawing.Size(131, 21);
       this.TimeframeComboBox.TabIndex = 19;
       this.TimeframeComboBox.SelectedIndexChanged += new System.EventHandler(this.TimeframeComboBox_SelectedIndexChanged);
@@ -98,6 +111,9 @@
       this.SplitContainer.Panel1.ResumeLayout(false);
       this.SplitContainer.Panel1.PerformLayout();
+      this.SplitContainer.Panel2.ResumeLayout(false);
       ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).EndInit();
       this.SplitContainer.ResumeLayout(false);
+      this.CalculatingPanel.ResumeLayout(false);
+      this.CalculatingPanel.PerformLayout();
       this.ResumeLayout(false);
 
Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.cs
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.cs	(revision 8528)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.cs	(revision 8529)
@@ -59,4 +59,5 @@
       string variable = (string)VariableSelectionComboBox.SelectedItem;
       if (calc != null && partition != null && variable != null) {
+        DataGridView.Columns.Clear();
         DataGridView.Enabled = false;
         int frames = (int)TimeframeComboBox.SelectedItem;
Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 8528)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 8529)
@@ -37,5 +37,5 @@
     protected const string TrainingPartitionParameterName = "TrainingPartition";
     protected const string TestPartitionParameterName = "TestPartition";
-    protected const string DatasetHeatMapParameterName = "DatasetCorrelationHeatMap";
+    protected const string DatasetCorrelationParameterName = "Dataset Correlation";
 
     #region parameter properites
@@ -52,6 +52,6 @@
       get { return (IFixedValueParameter<IntRange>)Parameters[TestPartitionParameterName]; }
     }
-    public IFixedValueParameter<FeatureCorrelation> DatasetHeatMapParameter {
-      get { return (IFixedValueParameter<FeatureCorrelation>)Parameters[DatasetHeatMapParameterName]; }
+    public IFixedValueParameter<FeatureCorrelation> DatasetCorrelationParameter {
+      get { return (IFixedValueParameter<FeatureCorrelation>)Parameters[DatasetCorrelationParameterName]; }
     }
     #endregion
@@ -78,6 +78,6 @@
       get { return TestPartitionParameter.Value; }
     }
-    public FeatureCorrelation DatasetHeatMap {
-      get { return DatasetHeatMapParameter.Value; }
+    public FeatureCorrelation DatasetCorrelation {
+      get { return DatasetCorrelationParameter.Value; }
     }
 
@@ -119,9 +119,9 @@
       // BackwardsCompatibility3.3
       #region Backwards compatible code, remove with 3.4
-      if (!Parameters.ContainsKey(DatasetHeatMapParameterName)) {
-        Parameters.Add(new FixedValueParameter<FeatureCorrelation>(DatasetHeatMapParameterName, "", new FeatureCorrelation()));
+      if (!Parameters.ContainsKey(DatasetCorrelationParameterName)) {
+        Parameters.Add(new FixedValueParameter<FeatureCorrelation>(DatasetCorrelationParameterName, "", new FeatureCorrelation()));
       }
       #endregion
-      DatasetHeatMap.ProblemData = this;
+      DatasetCorrelation.ProblemData = this;
       RegisterEventHandlers();
     }
@@ -147,5 +147,5 @@
       Parameters.Add(new FixedValueParameter<IntRange>(TrainingPartitionParameterName, "", new IntRange(trainingPartitionStart, trainingPartitionEnd)));
       Parameters.Add(new FixedValueParameter<IntRange>(TestPartitionParameterName, "", new IntRange(testPartitionStart, testPartitionEnd)));
-      Parameters.Add(new FixedValueParameter<FeatureCorrelation>(DatasetHeatMapParameterName, "", new FeatureCorrelation(this)));
+      Parameters.Add(new FixedValueParameter<FeatureCorrelation>(DatasetCorrelationParameterName, "", new FeatureCorrelation(this)));
 
       ((ValueParameter<Dataset>)DatasetParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false;
Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation.cs
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation.cs	(revision 8528)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation.cs	(revision 8529)
@@ -65,4 +65,5 @@
 
     private BackgroundWorker bw;
+    private BackgroundWorkerInfo bwInfo;
 
     public FeatureCorrelation()
@@ -80,6 +81,4 @@
       this.rowNames = problemData.Dataset.DoubleVariables.ToList();
       sortableView = true;
-
-      CalculateElements(problemData.Dataset);
     }
     protected FeatureCorrelation(FeatureCorrelation original, Cloner cloner)
@@ -107,8 +106,6 @@
 
     private void CalculateElements(Dataset dataset, string calc, string partition, string variable = null, int frames = 0) {
-      if (bw == null || bw.IsBusy) {
-        if (bw != null) {
-          bw.CancelAsync();
-        }
+      bwInfo = new BackgroundWorkerInfo { Dataset = dataset, Calculator = calc, Partition = partition, Variable = variable, Frames = frames };
+      if (bw == null) {
         bw = new BackgroundWorker();
         bw.WorkerReportsProgress = true;
@@ -118,5 +115,9 @@
         bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BwRunWorkerCompleted);
       }
-      bw.RunWorkerAsync(new BackgroundWorkerInfo { Dataset = dataset, Calculator = calc, Partition = partition, Variable = variable, Frames = frames });
+      if (bw.IsBusy) {
+        bw.CancelAsync();
+      } else {
+        bw.RunWorkerAsync(bwInfo);
+      }
       if (calc.Equals(PearsonsR) || calc.Equals(SpearmansRank)) {
         Maximum = 1.0;
@@ -256,4 +257,6 @@
           OnCorrelationCalculationFinished();
         }
+      } else {
+        bw.RunWorkerAsync(bwInfo);
       }
     }
