do not show column header for series (PY-21763)

Series are 1-dimensional array, so column header is useless for them
This commit is contained in:
Liana.Bakradze
2017-06-05 18:29:35 +03:00
parent ced6560dcd
commit 5cc4d2d3fe
2 changed files with 10 additions and 0 deletions
@@ -41,6 +41,10 @@ public abstract class DataViewStrategy {
@NotNull
public abstract String getTypeName();
public boolean showColumnHeader() {
return true;
}
/**
* @return null if no strategy for this type
*/
@@ -60,5 +64,10 @@ public abstract class DataViewStrategy {
public String getTypeName() {
return "Series";
}
@Override
public boolean showColumnHeader() {
return false;
}
}
}
@@ -205,6 +205,7 @@ public class PyDataViewerPanel extends JPanel {
if (myTable.getColumnCount() > 0) {
myTable.setDefaultRenderer(myTable.getColumnClass(0), cellRenderer);
}
myTable.setShowColumns(strategy.showColumnHeader());
});
}