Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
BasLeijdekkers committed Dec 13, 2020
1 parent 29b999d commit d223ef2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/com/sixrr/metrics/ui/metricdisplay/MetricsDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ private static void setupTable(JTable table, Project project) {

public void setMetricsResults(MetricDisplaySpecification displaySpecification, MetricsRun run) {
final MetricCategory[] categories = MetricCategory.values();
for (final MetricCategory category : categories) {
for (MetricCategory category : categories) {
final JTable table = tables.get(category);
final String type = MetricsCategoryNameUtil.getShortNameForCategory(category);
final MetricTableSpecification tableSpecification = displaySpecification.getSpecification(category);
final MetricsResult results = run.getResultsForCategory(category);
final MetricTableModel model = new MetricTableModel(results, type, tableSpecification);
final TableModel model = new MetricTableModel(results, type, tableSpecification);
table.setModel(model);
final Container tab = table.getParent().getParent();
if (model.getRowCount() == 0) {
Expand All @@ -129,7 +129,7 @@ public void setMetricsResults(MetricDisplaySpecification displaySpecification, M

public void updateMetricsResults(MetricsRun run, MetricDisplaySpecification displaySpecification) {
final MetricCategory[] categories = MetricCategory.values();
for (final MetricCategory category : categories) {
for (MetricCategory category : categories) {
final JTable table = tables.get(category);
final MetricTableModel model = (MetricTableModel) table.getModel();
model.setResults(run.getResultsForCategory(category));
Expand All @@ -142,7 +142,7 @@ public void updateMetricsResults(MetricsRun run, MetricDisplaySpecification disp

public void updateMetricsResultsWithDiff(MetricsRun results, MetricDisplaySpecification displaySpecification) {
final MetricCategory[] categories = MetricCategory.values();
for (final MetricCategory category : categories) {
for (MetricCategory category : categories) {
final JTable table = tables.get(category);
final MetricTableModel model = (MetricTableModel) table.getModel();
final MetricsResult prevResults = model.getResults();
Expand All @@ -166,7 +166,7 @@ public void updateMetricsResultsWithDiff(MetricsRun results, MetricDisplaySpecif

public void overlayWithDiff(MetricsRun prevRun, MetricDisplaySpecification displaySpecification) {
final MetricCategory[] categories = MetricCategory.values();
for (final MetricCategory category : categories) {
for (MetricCategory category : categories) {
final JTable table = tables.get(category);
final MetricTableModel model = (MetricTableModel) table.getModel();
model.setPrevResults(prevRun.getResultsForCategory(category));
Expand All @@ -187,7 +187,7 @@ public void overlayWithDiff(MetricsRun prevRun, MetricDisplaySpecification displ

public void removeDiffOverlay(MetricDisplaySpecification displaySpecification) {
final MetricCategory[] categories = MetricCategory.values();
for (final MetricCategory category : categories) {
for (MetricCategory category : categories) {
final JTable table = tables.get(category);
final MetricTableModel model = (MetricTableModel) table.getModel();
model.setPrevResults(null);
Expand Down

0 comments on commit d223ef2

Please sign in to comment.