int (int row) { GraphCommitCell cell = getValue(myGraphTable.getModel().getValueAt(row, Commit.INSTANCE)); if (cell.getRefsToThisCommit().isEmpty()) return getColumnWidth() / 2; prepareTemplateComponent(row, cell); int referencesWidth = myTemplateComponent.getReferencesWidth(); if (myTemplateComponent.getReferencePainter().isLeftAligned()) { return myTemplateComponent.getGraphWidth() + referencesWidth / 2; } return getColumnWidth() - referencesWidth / 2; }