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


Java IconUtil.getAddIcon方法代码示例

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


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

示例1: initTextInjectionAddButton

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
private void initTextInjectionAddButton() {
    if(getMode() == ViewMode.USAGE){
        return;
    }

    JButton btnAdd = new JButton(Localizer.get("action.AddTextInjection"), IconUtil.getAddIcon());
    btnAdd.addMouseListener(new ClickListener() {
        @Override
        public void mouseClicked(MouseEvent e) {
            createTextInjection();
        }
    });
    panel.add(btnAdd, new CC().wrap());
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:15,代码来源:PackageTemplateWrapper.java

示例2: getAddButton

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
private JButton getAddButton() {
    JButton btnAdd = new JButton(Localizer.get("action.Add"), IconUtil.getAddIcon());
    btnAdd.addMouseListener(new ClickListener() {
        @Override
        public void mouseClicked(MouseEvent e) {
            createSearchAction(null);
        }
    });
    return btnAdd;
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:11,代码来源:CustomPathDialog.java

示例3: 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

示例4: createAddAction

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
@NotNull
private AnAction createAddAction() {
  AndroidNewModuleAction action = new AndroidNewModuleAction("New Module", null, IconUtil.getAddIcon());
  Keymap active = KeymapManager.getInstance().getActiveKeymap();
  if (active != null) {
    Shortcut[] shortcuts = active.getShortcuts("NewElement");
    action.registerCustomShortcutSet(new CustomShortcutSet(shortcuts), this);
  }
  return action;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:AndroidProjectStructureConfigurable.java

示例5: 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

示例6: buildAutoImportBlock

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
private void buildAutoImportBlock() {
    panel.add(new SeparatorComponent(10), new CC().pushX().growX().wrap().spanX());
    panel.add(new JLabel(Localizer.get("settings.AutoImport"), JLabel.CENTER), new CC().wrap().growX().pushX().spanX());

    //Type
    ArrayList<WriteRules> actionTypes = new ArrayList<>();
    actionTypes.add(WriteRules.USE_EXISTING);
    actionTypes.add(WriteRules.ASK_ME);
    actionTypes.add(WriteRules.OVERWRITE);

    comboBoxRules = new ComboBox(actionTypes.toArray());
    comboBoxRules.setRenderer(new WriteRulesCellRenderer());

    panel.add(comboBoxRules, new CC().pushX().growX().spanX().gapY("10","10"));

    paths = new ArrayList<>();
    lvAutoImport = new ListView<String>(paths) {
        @Nullable
        @Override
        public CollectDataFromUI onBuildView(String item, int pos) {
            TextFieldWithBrowseButton btnPath = new TextFieldWithBrowseButton();
            btnPath.setText(item);
            btnPath.addBrowseFolderListener(Localizer.get("SelectDirectoryToImport"), "", project, FileReaderUtil.getDirectoryDescriptor());

            JButton btnDelete = new JButton(IconUtil.getRemoveIcon());
            btnDelete.addMouseListener(new ClickListener() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    lvAutoImport.collectDataFromUI();
                    presenter.removeImportPath(paths, pos);
                }
            });

            add(btnDelete, new CC().split(2).spanX());
            add(btnPath, new CC().pushX().growX());
            return () -> list.set(pos, btnPath.getText());
        }
    };
    panel.add(lvAutoImport, new CC().spanX().pushX().growX().wrap());

    JButton btnAdd = new JButton(Localizer.get("action.AddPath"), IconUtil.getAddIcon());
    btnAdd.addMouseListener(new ClickListener() {
        @Override
        public void mouseClicked(MouseEvent e) {
            lvAutoImport.collectDataFromUI();
            presenter.addImportPath(paths);
        }
    });
    panel.add(btnAdd, new CC().wrap());

    presenter.loadAutoImport();
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:53,代码来源:SettingsDialog.java

示例7: getAddButtonIcon

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
@Override
protected Icon getAddButtonIcon() {
  return IconUtil.getAddIcon();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:InstanceFilterEditor.java

示例8: AbstractAddGroup

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
public AbstractAddGroup(String text) {
  this(text, IconUtil.getAddIcon());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:BaseStructureConfigurable.java

示例9: AddRemoteServerGroup

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
private AddRemoteServerGroup() {
  super("Add", "", IconUtil.getAddIcon());
  registerCustomShortcutSet(CommonShortcuts.INSERT, myTree);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:RemoteServerListConfigurable.java

示例10: AddAction

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
public AddAction() {
    super("Add", "Add", IconUtil.getAddIcon());
    registerCustomShortcutSet(CommonShortcuts.INSERT, myTree);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:NamedItemsListEditor.java

示例11: getIconForAddAction

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
public Icon getIconForAddAction() {
  return IconUtil.getAddIcon();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:SdkType.java

示例12: MyAddFilterAction

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
private MyAddFilterAction() {
  super(CommonBundle.message("button.add"),
        AndroidBundle.message("android.logcat.add.logcat.filter.button"),
        IconUtil.getAddIcon());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:EditLogFilterDialog.java

示例13: AddAction

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
public AddAction() {
  super(AntBundle.message("add.ant.file.action.name"), AntBundle.message("add.ant.file.action.description"), IconUtil.getAddIcon());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:AntExplorer.java

示例14: GroovyDocAddPackageAction

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
public GroovyDocAddPackageAction(final DefaultListModel dataModel) {
  super("Add package", "Add package", IconUtil.getAddIcon());
  myDataModel = dataModel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GroovyDocAddPackageAction.java

示例15: AddAssociationAction

import com.intellij.util.IconUtil; //导入方法依赖的package包/类
public AddAssociationAction(FileAssociationsManager manager) {
    super("Add...", "Add File Association", IconUtil.getAddIcon());
    myManager = manager;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AddAssociationAction.java


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