本文整理匯總了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;
}