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


Java IconUtil.getEditIcon方法代码示例

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


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

示例1: getIcon

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
public Icon getIcon() {
  switch (this) {
    case ADD:    return IconUtil.getAddIcon();
    case EDIT:    return IconUtil.getEditIcon();
    case REMOVE: return IconUtil.getRemoveIcon();
    case UP:     return IconUtil.getMoveUpIcon();
    case DOWN:   return IconUtil.getMoveDownIcon();
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:CommonActionsPanel.java

示例2: initToolbarActions

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
private void initToolbarActions() {
    //Add
    actionAdd = new BaseAction(Localizer.get("tooltip.Create"), Localizer.get("description.CreateNewPackageTemplate"), IconUtil.getAddIcon()) {
        @Override
        public void actionPerformed(AnActionEvent e) {
            presenter.onAddAction();
        }
    };

    //Edit
    actionEdit = new BaseAction(Localizer.get("tooltip.Edit"), Localizer.get("description.EditExistingPackageTemplate"), IconUtil.getEditIcon()) {
        @Override
        public void actionPerformed(AnActionEvent e) {
            if (FileValidator.isValidTemplatePath(getSelectedPath())) {
                presenter.onEditAction(getSelectedPath());
            } else {
                Messages.showErrorDialog(project, Localizer.get("warning.select.packageTemplate"), Localizer.get("title.SystemMessage"));
            }
        }
    };

    // Settings
    actionSettings = new BaseAction(Localizer.get("tooltip.Settings"), Localizer.get("description.EditGeneralSettings"), PlatformIcons.SHOW_SETTINGS_ICON) {
        @Override
        public void actionPerformed(AnActionEvent e) {
            presenter.onSettingsAction();
        }
    };

    // Export
    actionExport = new BaseAction(Localizer.get("tooltip.Export"), Localizer.get("description.ExportPackageTemplate") ,PlatformIcons.EXPORT_ICON) {
        @Override
        public void actionPerformed(AnActionEvent e) {
            if (FileValidator.isValidTemplatePath(getSelectedPath())) {
                presenter.onExportAction(getSelectedPath());
            } else {
                Messages.showErrorDialog(project, Localizer.get("warning.select.packageTemplate"), Localizer.get("title.SystemMessage"));
            }
        }
    };

    // Import
    actionImport = new BaseAction(Localizer.get("tooltip.Import"), Localizer.get("description.ImportPackageTemplate"), PlatformIcons.IMPORT_ICON) {
        @Override
        public void actionPerformed(AnActionEvent e) {
            presenter.onImportAction();
        }
    };

    // Add to Favourite
    actionAddToFavourites = new BaseAction(Localizer.get("tooltip.Favourite"), Localizer.get("description.AddRemoveFromFavourites"), AllIcons.Toolwindows.ToolWindowFavorites) {
        @Override
        public void actionPerformed(AnActionEvent e) {
            String path = getSelectedPath();
            switch (templateSourceType) {
                case FAVOURITE:
                    presenter.removeFavourite(path);
                    break;
                case PATH:
                    if (!FileValidator.isValidTemplatePath(path)) {
                        Messages.showErrorDialog(project, Localizer.get("warning.select.packageTemplate"), Localizer.get("title.SystemMessage"));
                        return;
                    }

                    presenter.addFavourite(path);
                    break;
            }
        }
    };

    // AutoImport
    actionAutoImport = new BaseAction(Localizer.get("tooltip.Auto"), Localizer.get("description.EditAutoImportSettings"), PluginIcons.AUTO_IMPORT) {
        @Override
        public void actionPerformed(AnActionEvent e) {
            presenter.onAutoImportAction();
        }
    };

}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:80,代码来源:SelectPackageTemplateDialog.java

示例3: RenameAction

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
private RenameAction() {
  super("Rename", "", IconUtil.getEditIcon()); // todo
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ProjectLayoutPanel.java


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