use of com.intellij.codeHighlighting.HighlightDisplayLevel.ColoredIcon in project intellij-community by JetBrains.
the class MultiScopeSeverityIcon method paintIcon.
@Override
public void paintIcon(final Component c, final Graphics g, final int i, final int j) {
final int partWidth = getIconWidth() / myScopeToAverageSeverityMap.size();
final Collection<HighlightDisplayLevel> values = myScopeToAverageSeverityMap.values();
int idx = 0;
for (final HighlightDisplayLevel level : values) {
final Icon icon = level.getIcon();
g.setColor(icon instanceof ColoredIcon ? ((ColoredIcon) icon).getColor() : getMixedSeverityColor());
final int x = i + partWidth * idx;
g.fillRect(x, j, partWidth, getIconHeight());
idx++;
}
}
Aggregations