当前位置: 首页>>代码示例>>Java>>正文


Java LayeredIcon.create方法代码示例

本文整理汇总了Java中com.intellij.ui.LayeredIcon.create方法的典型用法代码示例。如果您正苦于以下问题:Java LayeredIcon.create方法的具体用法?Java LayeredIcon.create怎么用?Java LayeredIcon.create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.ui.LayeredIcon的用法示例。


在下文中一共展示了LayeredIcon.create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: patchIcon

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
protected Icon patchIcon(Icon original, VirtualFile file) {
  Icon icon = original;

  final Bookmark bookmarkAtFile = BookmarkManager.getInstance(myProject).findFileBookmark(file);
  if (bookmarkAtFile != null) {
    final RowIcon composite = new RowIcon(2, RowIcon.Alignment.CENTER);
    composite.setIcon(icon, 0);
    composite.setIcon(bookmarkAtFile.getIcon(), 1);
    icon = composite;
  }

  if (!file.isWritable()) {
    icon = LayeredIcon.create(icon, PlatformIcons.LOCKED_ICON);
  }

  if (file.is(VFileProperty.SYMLINK)) {
    icon = LayeredIcon.create(icon, PlatformIcons.SYMLINK_ICON);
  }

  return icon;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:PsiDirectoryNode.java

示例2: patchIcon

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
protected Icon patchIcon(Icon original, VirtualFile file) {
  Icon icon = original;

  final Bookmark bookmarkAtFile = BookmarkManager.getInstance(myProject).findFileBookmark(file);
  if (bookmarkAtFile != null) {
    final RowIcon composite = new RowIcon(2, RowIcon.Alignment.CENTER);
    composite.setIcon(icon, 0);
    composite.setIcon(bookmarkAtFile.getIcon(), 1);
    icon = composite;
  }

  if (!file.isWritable()) {
    icon = LayeredIcon.create(icon, AllIcons.Nodes.Locked);
  }

  if (file.is(VFileProperty.SYMLINK)) {
    icon = LayeredIcon.create(icon, AllIcons.Nodes.Symlink);
  }

  return icon;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:22,代码来源:PsiDirectoryNode.java

示例3: getIcon

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
@Override
public Icon getIcon() {
    return LayeredIcon.create(
            PythonUltimateIcons.Django.Django,
            AllIcons.Nodes.RunnableMark
    );
}
 
开发者ID:chornsby,项目名称:django-migrations-pycharm-plugin,代码行数:8,代码来源:MigrationRunConfigurationType.java

示例4: setIcon

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
@Override
public void setIcon(Icon icon) {
  Icon oldValue = getIcon();
  myIcon = icon;
  myLayeredIcon = LayeredIcon.create(myIcon, AllIcons.Nodes.PinToolWindow);
  myChangeSupport.firePropertyChange(PROP_ICON, oldValue, getIcon());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ContentImpl.java

示例5: CompoundRunConfigurationType

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
public CompoundRunConfigurationType() {
  super("CompoundRunConfigurationType",
        "Compound",
        "It runs batch of run configurations at once",
        LayeredIcon.create(AllIcons.Nodes.Folder, AllIcons.Nodes.RunnableMark));
  addFactory(new ConfigurationFactory(this) {
    @Override
    public RunConfiguration createTemplateConfiguration(Project project) {
      return new CompoundRunConfiguration(project, CompoundRunConfigurationType.this, "Compound Run Configuration");
    }

    @Override
    public String getName() {
      return "Compound Run Configuration";
    }

    @Override
    public boolean isConfigurationSingletonByDefault() {
      return true;
    }

    @Override
    public boolean canConfigurationBeSingleton() {
      return false;
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:CompoundRunConfigurationType.java

示例6: getConfigurationIcon

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
public static Icon getConfigurationIcon(final RunnerAndConfigurationSettings settings,
                                        final boolean invalid) {
  Icon icon = getRawIcon(settings);

  final Icon configurationIcon = settings.isTemporary() ?  getTemporaryIcon(icon): icon;
  if (invalid) {
    return LayeredIcon.create(configurationIcon, AllIcons.RunConfigurations.InvalidConfigurationLayer);
  }

  return configurationIcon;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ProgramRunnerUtil.java

示例7: updateImpl

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
public void updateImpl(PresentationData presentationData) {
  super.updateImpl(presentationData);
  final PsiFile[] psiFiles = myInstance.getAssociationsFor(getValue());

  Icon icon = XsltSupport.createXsltIcon(presentationData.getIcon(false));
  if (psiFiles.length > 0) {
    icon = LayeredIcon.create(icon, XpathIcons.Association_small);
  }
  presentationData.setIcon(icon);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:XsltTreeStructureProvider.java

示例8: getConfigurationIcon

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
public static Icon getConfigurationIcon(final RunnerAndConfigurationSettings settings,
                                        final boolean invalid,
                                        boolean isTemporary) {
  RunConfiguration configuration = settings.getConfiguration();
  ConfigurationFactory factory = settings.getFactory();
  Icon icon =  factory != null ? factory.getIcon(configuration) : null;
  if (icon == null) icon = AllIcons.RunConfigurations.Unknown;

  final Icon configurationIcon = isTemporary ? IconLoader.getTransparentIcon(icon, 0.3f) : icon;
  if (invalid) {
    return LayeredIcon.create(configurationIcon, AllIcons.RunConfigurations.InvalidConfigurationLayer);
  }

  return configurationIcon;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:ProgramRunnerUtil.java

示例9: updateImpl

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
public void updateImpl(PresentationData presentationData) {
  super.updateImpl(presentationData);
  final PsiFile[] psiFiles = myInstance.getAssociationsFor(getValue());

  Icon icon = XsltSupport.createXsltIcon(presentationData.getIcon(false));
  if (psiFiles.length > 0) {
    icon = LayeredIcon.create(icon, XsltIcons.Association_small);
  }
  presentationData.setIcon(icon);
}
 
开发者ID:consulo,项目名称:consulo-xslt,代码行数:11,代码来源:XsltTreeStructureProvider.java

示例10: getIcon

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
@Override
public Icon getIcon() {
  return LayeredIcon.create(super.getIcon(), AllIcons.Actions.Scratch); // todo
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JavaScratchConfigurationType.java

示例11: ShowRunningListAction

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
public ShowRunningListAction() {
  super(ExecutionBundle.message("show.running.list.action.name"), ExecutionBundle.message("show.running.list.action.description"),
        LayeredIcon.create(AllIcons.RunConfigurations.Variables, AllIcons.Nodes.RunnableMark));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ShowRunningListAction.java

示例12: substituteIcon

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
@Nullable
@Override
public Icon substituteIcon(@NotNull Project project, @NotNull VirtualFile file) {
  Icon icon = ObjectUtils.chooseNotNull(super.substituteIcon(project, file), ScratchFileType.INSTANCE.getIcon());
  return LayeredIcon.create(icon, AllIcons.Actions.Scratch);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:ScratchRootType.java

示例13: createXsltIcon

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
public static Icon createXsltIcon(Icon icon) {
  return LayeredIcon.create(icon, XpathIcons.Xslt_filetype_overlay);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:XsltSupport.java

示例14: substituteIcon

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
@Nullable
@Override
public Icon substituteIcon(@Nonnull Project project, @Nonnull VirtualFile file) {
  Icon icon = ObjectUtils.chooseNotNull(super.substituteIcon(project, file), ScratchFileType.INSTANCE.getIcon());
  return LayeredIcon.create(icon, AllIcons.Actions.Scratch);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:7,代码来源:ScratchRootType.java

示例15: createXsltIcon

import com.intellij.ui.LayeredIcon; //导入方法依赖的package包/类
public static Icon createXsltIcon(Icon icon) {
    return LayeredIcon.create(icon, XsltIcons.Xslt_filetype_overlay);
}
 
开发者ID:consulo,项目名称:consulo-xslt,代码行数:4,代码来源:XsltSupport.java


注:本文中的com.intellij.ui.LayeredIcon.create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。