This commit is contained in:
Alexey Kudravtsev
2011-12-28 13:05:53 +04:00
parent 1e0714b310
commit 881aa60d8a
4 changed files with 6 additions and 9 deletions
@@ -42,9 +42,7 @@ public class MethodCellRenderer extends DefaultListCellRenderer {
PsiFormatUtil.SHOW_TYPE);
setText(text);
final int flags = Iconable.ICON_FLAG_VISIBILITY;
Icon icon = method.getIcon(flags);
Icon icon = method.getIcon(Iconable.ICON_FLAG_VISIBILITY);
if(icon != null) setIcon(icon);
return this;
}
@@ -150,7 +150,7 @@ public abstract class ElementBase extends UserDataHolderBase implements Iconable
}
public static boolean isNativeFileType(FileType fileType) {
return (fileType instanceof INativeFileType && ((INativeFileType) fileType).useNativeIcon()) || fileType instanceof UnknownFileType;
return fileType instanceof INativeFileType && ((INativeFileType) fileType).useNativeIcon() || fileType instanceof UnknownFileType;
}
protected Icon getAdjustedBaseIcon(Icon icon, int flags) {
@@ -61,7 +61,6 @@ public class DefaultLookupItemRenderer extends LookupElementRenderer<LookupItem>
Object o = item.getObject();
int flags = Iconable.ICON_FLAG_VISIBILITY;
if (!real) {
if (item.getObject() instanceof String) {
return EmptyIcon.ICON_0;
@@ -71,7 +70,7 @@ public class DefaultLookupItemRenderer extends LookupElementRenderer<LookupItem>
}
if (o instanceof Iconable && !(o instanceof PsiElement)) {
return ((Iconable)o).getIcon(flags);
return ((Iconable)o).getIcon(Iconable.ICON_FLAG_VISIBILITY);
}
if (o instanceof LookupValueWithPsiElement) {
@@ -80,7 +79,7 @@ public class DefaultLookupItemRenderer extends LookupElementRenderer<LookupItem>
if (o instanceof PsiElement) {
final PsiElement element = (PsiElement)o;
if (element.isValid()) {
return element.getIcon(flags);
return element.getIcon(Iconable.ICON_FLAG_VISIBILITY);
}
}
return null;
@@ -24,8 +24,8 @@ public class VerticalFlowLayout extends FlowLayout implements Serializable {
public static final int TOP = 0;
private boolean myVerticalFill;
private boolean myHorizontalFill;
private int vGap;
private int hGap;
private final int vGap;
private final int hGap;
public VerticalFlowLayout() {
this(TOP, 5, 5, true, false);