use of com.intellij.ui.RowIcon in project kotlin by JetBrains.
the class KotlinDescriptorIconProvider method getIcon.
@NotNull
public static Icon getIcon(@NotNull DeclarationDescriptor descriptor, @Nullable PsiElement declaration, @Iconable.IconFlags int flags) {
if (declaration != null && !(declaration instanceof KtElement)) {
return declaration.getIcon(flags);
}
Icon result = getBaseIcon(descriptor);
if ((flags & Iconable.ICON_FLAG_VISIBILITY) > 0) {
RowIcon rowIcon = new RowIcon(2);
rowIcon.setIcon(result, 0);
rowIcon.setIcon(getVisibilityIcon(descriptor), 1);
result = rowIcon;
}
return result;
}
use of com.intellij.ui.RowIcon in project intellij-elixir by KronicDeth.
the class PresentationData method icon.
@NotNull
public static Icon icon(final boolean callback, final boolean overridable, final boolean override, @NotNull final Timed.Time time, @Nullable final Visible.Visibility visibility) {
int layers = 3;
if (callback) {
layers++;
}
if (overridable) {
layers++;
}
if (override) {
layers++;
}
RowIcon rowIcon = new RowIcon(layers);
int layer = 0;
if (callback) {
rowIcon.setIcon(ElixirIcons.CALLBACK, layer++);
}
Icon timeIcon = ElixirIcons.Time.from(time);
rowIcon.setIcon(timeIcon, layer++);
Icon visibilityIcon = ElixirIcons.Visibility.from(visibility);
rowIcon.setIcon(visibilityIcon, layer++);
rowIcon.setIcon(ElixirIcons.CALL_DEFINITION, layer++);
if (overridable) {
rowIcon.setIcon(ElixirIcons.OVERRIDABLE, layer++);
}
if (override) {
rowIcon.setIcon(ElixirIcons.OVERRIDE, layer);
}
return rowIcon;
}
use of com.intellij.ui.RowIcon in project intellij-elixir by KronicDeth.
the class Quote method getIcon.
/**
* Returns the icon representing the object.
*
* @param unused Used to mean if open/close icons for tree renderer. No longer in use. The parameter is only there for API compatibility reason.
*/
@Nullable
@Override
public Icon getIcon(boolean unused) {
RowIcon rowIcon = new RowIcon(2);
rowIcon.setIcon(ElixirIcons.Time.COMPILE, 0);
rowIcon.setIcon(PlatformIcons.ANONYMOUS_CLASS_ICON, 1);
return rowIcon;
}
use of com.intellij.ui.RowIcon in project intellij-elixir by KronicDeth.
the class Quote method getIcon.
/**
* Returns the icon representing the object.
*
* @param unused Used to mean if open/close icons for tree renderer. No longer in use. The parameter is only there for API compatibility reason.
*/
@Nullable
@Override
public Icon getIcon(boolean unused) {
RowIcon rowIcon = new RowIcon(2);
rowIcon.setIcon(ElixirIcons.MODULE, 0);
rowIcon.setIcon(PlatformIcons.ANONYMOUS_CLASS_ICON, 1);
return rowIcon;
}
Aggregations