Search in sources :

Example 1 with VcsLogRefManager

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;
}
Also used : VcsLogRefManager(com.intellij.vcs.log.VcsLogRefManager) List(java.util.List) RefGroup(com.intellij.vcs.log.RefGroup)

Aggregations

RefGroup (com.intellij.vcs.log.RefGroup)1 VcsLogRefManager (com.intellij.vcs.log.VcsLogRefManager)1 List (java.util.List)1