use of com.intellij.vcs.log.VcsLogRefManager in project intellij-community by JetBrains.
the class LabelPainter method customizePainter.
public void customizePainter(@NotNull JComponent component, @NotNull Collection<VcsRef> references, @NotNull Color background, @NotNull Color foreground, boolean isSelected, int availableWidth) {
myBackground = background;
myForeground = isSelected ? foreground : TEXT_COLOR;
FontMetrics metrics = component.getFontMetrics(getReferenceFont());
myHeight = metrics.getHeight() + TOP_TEXT_PADDING + BOTTOM_TEXT_PADDING;
VcsLogRefManager manager = getRefManager(myLogData, references);
List<RefGroup> refGroups = manager == null ? ContainerUtil.emptyList() : manager.groupForTable(references, myCompact, myShowTagNames);
myGreyBackground = calculateGreyBackground(refGroups, background, isSelected, myCompact);
Pair<List<Pair<String, LabelIcon>>, Integer> presentation = calculatePresentation(refGroups, metrics, myHeight, myGreyBackground != null ? myGreyBackground : myBackground, availableWidth, myCompact);
myLabels = presentation.first;
myWidth = presentation.second;
}
Aggregations