mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
@@ -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());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user