本文整理汇总了Java中com.intellij.util.PlatformIcons.WEB_ICON属性的典型用法代码示例。如果您正苦于以下问题:Java PlatformIcons.WEB_ICON属性的具体用法?Java PlatformIcons.WEB_ICON怎么用?Java PlatformIcons.WEB_ICON使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.util.PlatformIcons
的用法示例。
在下文中一共展示了PlatformIcons.WEB_ICON属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIconForRoot
private static Icon getIconForRoot(Object projectRoot) {
if (projectRoot instanceof VirtualFile) {
VirtualFile file = (VirtualFile)projectRoot;
if (!file.isValid()) {
return AllIcons.Nodes.PpInvalid;
}
else if (file.getFileSystem() instanceof HttpFileSystem) {
return PlatformIcons.WEB_ICON;
}
else if (isJarFile(file)) {
return PlatformIcons.JAR_ICON;
}
return PlatformIcons.FILE_ICON;
}
return AllIcons.Nodes.EmptyNode;
}
示例2: getIconForUrl
private static Icon getIconForUrl(final String url, final boolean isValid, final boolean isJarDirectory) {
final Icon icon;
if (isValid) {
VirtualFile presentableFile;
if (isJarFileRoot(url)) {
presentableFile = LocalFileSystem.getInstance().findFileByPath(getPresentablePath(url));
}
else {
presentableFile = VirtualFileManager.getInstance().findFileByUrl(url);
}
if (presentableFile != null && presentableFile.isValid()) {
if (presentableFile.getFileSystem() instanceof HttpFileSystem) {
icon = PlatformIcons.WEB_ICON;
}
else {
if (presentableFile.isDirectory()) {
if (isJarDirectory) {
icon = AllIcons.Nodes.JarDirectory;
}
else {
icon = PlatformIcons.DIRECTORY_CLOSED_ICON;
}
}
else {
icon = IconUtilEx.getIcon(presentableFile, 0, null);
}
}
}
else {
icon = AllIcons.Nodes.PpInvalid;
}
}
else {
icon = AllIcons.Nodes.PpInvalid;
}
return icon;
}
示例3: getIcon
@Override
public Icon getIcon(int flags) {
return PlatformIcons.WEB_ICON;
}
示例4: getIcon
@Override
protected Icon getIcon() {
return PlatformIcons.WEB_ICON;
}
示例5: OpenLinkInBrowser
private OpenLinkInBrowser(@NotNull String url) {
super("Open Link in Browser", null, PlatformIcons.WEB_ICON);
myUrl = url;
}