當前位置: 首頁>>代碼示例>>Java>>正文


Java AllIcons類代碼示例

本文整理匯總了Java中com.intellij.icons.AllIcons的典型用法代碼示例。如果您正苦於以下問題:Java AllIcons類的具體用法?Java AllIcons怎麽用?Java AllIcons使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AllIcons類屬於com.intellij.icons包,在下文中一共展示了AllIcons類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: showHelperProcessRunContent

import com.intellij.icons.AllIcons; //導入依賴的package包/類
public static final ConsoleView showHelperProcessRunContent(String header, OSProcessHandler runHandler, Project project, Executor defaultExecutor) {
        ProcessTerminatedListener.attach(runHandler);

        ConsoleViewImpl consoleView = new ConsoleViewImpl(project, true);
        DefaultActionGroup toolbarActions = new DefaultActionGroup();

        JPanel panel = new JPanel((LayoutManager) new BorderLayout());
        panel.add((Component) consoleView.getComponent(), "Center");
        ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("unknown", (ActionGroup) toolbarActions, false);
        toolbar.setTargetComponent(consoleView.getComponent());
        panel.add((Component) toolbar.getComponent(), "West");

        RunContentDescriptor runDescriptor = new RunContentDescriptor((ExecutionConsole) consoleView,
                (ProcessHandler) runHandler, (JComponent) panel, header, AllIcons.RunConfigurations.Application);
        AnAction[]
                consoleActions = consoleView.createConsoleActions();
        toolbarActions.addAll((AnAction[]) Arrays.copyOf(consoleActions, consoleActions.length));
        toolbarActions.add((AnAction) new StopProcessAction("Stop process", "Stop process", (ProcessHandler) runHandler));
        toolbarActions.add((AnAction) new CloseAction(defaultExecutor, runDescriptor, project));

        consoleView.attachToProcess((ProcessHandler) runHandler);
//        ExecutionManager.getInstance(environment.getProject()).getContentManager().showRunContent(environment.getExecutor(), runDescriptor);
        showConsole(project, defaultExecutor, runDescriptor);
        return (ConsoleView) consoleView;
    }
 
開發者ID:beansoftapp,項目名稱:react-native-console,代碼行數:26,代碼來源:RunnerUtil.java

示例2: getPresentation

import com.intellij.icons.AllIcons; //導入依賴的package包/類
@NotNull
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return simpleType;
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean b) {
            return AllIcons.Actions.MoveUp;
        }
    };
}
 
開發者ID:datathings,項目名稱:greycat-idea-plugin,代碼行數:24,代碼來源:GCMStructureViewParentElement.java

示例3: addCompletions

import com.intellij.icons.AllIcons; //導入依賴的package包/類
@Override
protected void addCompletions(@NotNull CompletionParameters parameters,
                              ProcessingContext context,
                              @NotNull CompletionResultSet result) {
    PsiElement position = parameters.getPosition().getOriginalElement();
    if (position == null) {
        return;
    }
    String prefix = result.getPrefixMatcher().getPrefix();

    Collection<String> moduleNames
            = FileBasedIndex.getInstance().getAllKeys(ModuleNameIndex.KEY, position.getProject());


    moduleNames.removeIf(m -> !m.startsWith(prefix));
    for (String moduleName : moduleNames) {
        result.addElement(
                LookupElementBuilder
                        .create(moduleName)
                        .withIcon(AllIcons.Modules.ModulesNode)
        );
    }
}
 
開發者ID:magento,項目名稱:magento2-phpstorm-plugin,代碼行數:24,代碼來源:ModuleNameCompletionProvider.java

示例4: initUi

import com.intellij.icons.AllIcons; //導入依賴的package包/類
private void initUi(String myName, String toolTip) {
    myNameLabel = new JBLabel(myName);
    myNameLabel.setIcon(AllIcons.General.Filter);
    JLabel arrow = new JBLabel(AllIcons.Ide.Statusbar_arrows);
    setToolTipText(toolTip);
    setDefaultForeground();
    setFocusable(true);
    setBorder(createUnfocusedBorder());

    setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
    add(myNameLabel);
    add(Box.createHorizontalStrut(GAP_BEFORE_ARROW));
    add(arrow);

    revalidate();
    repaint();
    showPopupMenuOnClick();
    indicateHovering();
    indicateFocusing();
}
 
開發者ID:JFrogDev,項目名稱:jfrog-idea-plugin,代碼行數:21,代碼來源:FilterButton.java

示例5: getElementIcon

import com.intellij.icons.AllIcons; //導入依賴的package包/類
@Override
@Nullable
protected Icon getElementIcon(final HybrisModuleDescriptor module) {
    if (this.isInConflict(module)) {
        return AllIcons.Actions.Cancel;
    }
    if (module instanceof MavenModuleDescriptor) {
        return MavenIcons.MavenLogo;
    }
    if (module instanceof EclipseModuleDescriptor) {
        return AllIcons.Providers.Eclipse;
    }
    if (module instanceof GradleModuleDescriptor) {
        return GradleIcons.Gradle;
    }

    return null;
}
 
開發者ID:AlexanderBartash,項目名稱:hybris-integration-intellij-idea-plugin,代碼行數:19,代碼來源:SelectOtherModulesToImportStep.java

示例6: addBackAndOpenButtons

import com.intellij.icons.AllIcons; //導入依賴的package包/類
public void addBackAndOpenButtons() {
  ApplicationManager.getApplication().invokeLater(() -> {
    final JPanel panel = new JPanel();
    panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

    final JButton backButton = makeGoButton("Click to go back", AllIcons.Actions.Back, -1);
    final JButton forwardButton = makeGoButton("Click to go forward", AllIcons.Actions.Forward, 1);
    final JButton openInBrowser = new JButton(AllIcons.Actions.Browser_externalJavaDoc);
    openInBrowser.addActionListener(e -> BrowserUtil.browse(myEngine.getLocation()));
    openInBrowser.setToolTipText("Click to open link in browser");
    addButtonsAvailabilityListeners(backButton, forwardButton);

    panel.setMaximumSize(new Dimension(40, getPanel().getHeight()));
    panel.add(backButton);
    panel.add(forwardButton);
    panel.add(openInBrowser);

    add(panel, BorderLayout.PAGE_START);
  });
}
 
開發者ID:medvector,項目名稱:educational-plugin,代碼行數:21,代碼來源:StudyBrowserWindow.java

示例7: CreateCourseArchivePanel

import com.intellij.icons.AllIcons; //導入依賴的package包/類
public CreateCourseArchivePanel(@NotNull final Project project, CreateCourseArchiveDialog dlg, String name) {
  setLayout(new BorderLayout());
  add(myPanel, BorderLayout.CENTER);
  myErrorIcon.setIcon(AllIcons.Actions.Lightning);
  setState(false);
  myDlg = dlg;
  String sanitizedName = FileUtil.sanitizeFileName(name);
  myNameField.setText(sanitizedName.startsWith("_") ? EduNames.COURSE : sanitizedName);
  myLocationField.setText(project.getBasePath());
  FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
  myLocationField.addBrowseFolderListener("Choose Location Folder", null, project, descriptor);
  myLocationField.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      String location = myLocationField.getText();
      File file = new File(location);
      if (!file.exists() || !file.isDirectory()) {
        myDlg.enableOKAction(false);
        setError("Invalid location");
      }
      myDlg.enableOKAction(true);
    }
  });
}
 
開發者ID:medvector,項目名稱:educational-plugin,代碼行數:25,代碼來源:CreateCourseArchivePanel.java

示例8: computeChildren

import com.intellij.icons.AllIcons; //導入依賴的package包/類
@Override
public void computeChildren(@NotNull XCompositeNode node)
{
    final XValueChildrenList children = new XValueChildrenList();
    children.add("Message Processor", new MessageProcessorInfoValue(this.session, this.muleMessageInfo.getMessageProcessorInfo()));
    children.add("Payload", new ObjectFieldDefinitionValue(this.session, this.muleMessageInfo.getPayloadDefinition(), AllIcons.Debugger.Value));
    if (exceptionThrown != null)
    {
        children.add("Exception", new ObjectFieldDefinitionValue(this.session, exceptionThrown, AllIcons.General.Error));
    }
    children.add("Flow Vars", new MapOfObjectFieldDefinitionValue(this.session, this.muleMessageInfo.getInvocationProperties(), AllIcons.Nodes.Parameter));
    children.add("Session Properties", new MapOfObjectFieldDefinitionValue(this.session, this.muleMessageInfo.getSessionProperties(), AllIcons.Nodes.Parameter));
    children.add("Inbound Properties", new MapOfObjectFieldDefinitionValue(this.session, this.muleMessageInfo.getInboundProperties(), AllIcons.Nodes.Parameter));
    children.add("OutboundProperties", new MapOfObjectFieldDefinitionValue(this.session, this.muleMessageInfo.getOutboundProperties(), AllIcons.Nodes.Parameter));
    node.addChildren(children, true);
}
 
開發者ID:machaval,項目名稱:mule-intellij-plugins,代碼行數:17,代碼來源:MuleStackFrame.java

示例9: annotateMavenDomPluginInManagement

import com.intellij.icons.AllIcons; //導入依賴的package包/類
private static void annotateMavenDomPluginInManagement(@NotNull MavenDomPlugin plugin, @NotNull AnnotationHolder holder) {
  XmlTag xmlTag = plugin.getArtifactId().getXmlTag();
  if (xmlTag == null) return;

  Collection<MavenDomPlugin> children = MavenDomProjectProcessorUtils.searchManagedPluginUsages(plugin);

  if (children.size() > 0) {
    NavigationGutterIconBuilder<MavenDomPlugin> iconBuilder =
      NavigationGutterIconBuilder.create(AllIcons.General.OverridenMethod, PluginConverter.INSTANCE);

    iconBuilder.
      setTargets(children).
      setPopupTitle(MavenDomBundle.message("navigate.parent.plugin.title")).
      setCellRenderer(MyListCellRenderer.INSTANCE).
      setTooltipText(MavenDomBundle.message("overriding.plugin.title")).
      install(holder, xmlTag);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:19,代碼來源:MavenDomGutterAnnotator.java

示例10: paintIfNeed

import com.intellij.icons.AllIcons; //導入依賴的package包/類
public void paintIfNeed(Graphics g) {
  if (myShift > 0) {
    for (int i = 0; i < dim.length; i++) {
      g.setColor(dim[i]);
      g.drawLine(0, i, myTarget.getWidth(), i);
    }
    AllIcons.General.SplitUp.paintIcon(myTarget, g, myTarget.getWidth() / 2 - AllIcons.General.SplitUp.getIconWidth() / 2, 0);
  }
  if (super.preferredLayoutSize(myTarget).height - getMaxHeight() - myShift > 0) {
    for (int i = 0; i < dim.length; i++) {
      g.setColor(dim[i]);
      g.drawLine(0, myTarget.getHeight() - i, myTarget.getWidth(),
                 myTarget.getHeight() - i);
    }
    AllIcons.General.SplitDown.paintIcon(myTarget, g, myTarget.getWidth() / 2 - AllIcons.General.SplitDown.getIconWidth() / 2,
                                         myTarget.getHeight() - AllIcons.General.SplitDown.getIconHeight());
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:19,代碼來源:JBPopupMenu.java

示例11: update

import com.intellij.icons.AllIcons; //導入依賴的package包/類
@Override
public void update(PresentationData presentation) {
  presentation.setPresentableText(getValue().getName());
  final OrderEntry orderEntry = getValue().getOrderEntry();
  Icon closedIcon = orderEntry instanceof JdkOrderEntry ? getJdkIcon((JdkOrderEntry)orderEntry) : AllIcons.Nodes.PpLibFolder;
  presentation.setIcon(closedIcon);
  if (orderEntry instanceof JdkOrderEntry) {
    final JdkOrderEntry jdkOrderEntry = (JdkOrderEntry)orderEntry;
    final Sdk projectJdk = jdkOrderEntry.getJdk();
    if (projectJdk != null) { //jdk not specified
      final String path = projectJdk.getHomePath();
      if (path != null) {
        presentation.setLocationString(FileUtil.toSystemDependentName(path));
      }
    }
    presentation.setTooltip(null);
  }
  else {
    presentation.setTooltip(StringUtil.capitalize(IdeBundle.message("node.projectview.library", ((LibraryOrderEntry)orderEntry).getLibraryLevel())));
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:22,代碼來源:NamedLibraryElementNode.java

示例12: actionPerformed

import com.intellij.icons.AllIcons; //導入依賴的package包/類
@Override
public void actionPerformed(ActionEvent e) {
  AvdManagerConnection connection = AvdManagerConnection.getDefaultAvdManagerConnection();
  AvdInfo info = getAvdInfo();
  if (info == null) {
    return;
  }
  if (connection.isAvdRunning(info)) {
    Messages.showErrorDialog((Project)null, "The selected AVD is currently running in the Emulator. " +
                                            "Please exit the emulator instance and try deleting again.", "Cannot Delete A Running AVD");
    return;
  }
  int result = Messages.showYesNoDialog((Project)null, "Do you really want to delete AVD " + info.getName() + "?", "Confirm Deletion",
                           AllIcons.General.QuestionDialog);
  if (result == Messages.YES) {
    connection.deleteAvd(info);
    refreshAvds();
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:20,代碼來源:DeleteAvdAction.java

示例13: createQuestionLabel

import com.intellij.icons.AllIcons; //導入依賴的package包/類
public static JComponent createQuestionLabel(String text) {
  HintHint hintHint = new HintHint().setTextBg(QUESTION_COLOR)
    .setTextFg(JBColor.foreground())
    .setFont(getBoldFont())
    .setAwtTooltip(true);

  HintLabel label = new HintLabel();
  label.setText(text, hintHint);
  label.setIcon(AllIcons.General.Help_small);

  if (!hintHint.isAwtTooltip()) {
    label.setBorder(createHintBorder());
    label.setForeground(JBColor.foreground());
    label.setFont(getBoldFont());
    label.setBackground(QUESTION_COLOR);
    label.setOpaque(true);
  }
  return label;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:20,代碼來源:HintUtil.java

示例14: GitCompareBranchesDialog

import com.intellij.icons.AllIcons; //導入依賴的package包/類
public GitCompareBranchesDialog(@NotNull Project project,
                                @NotNull String branchName,
                                @NotNull String currentBranchName,
                                @NotNull GitCommitCompareInfo compareInfo,
                                @NotNull GitRepository initialRepo,
                                boolean dialog) {
  myProject = project;

  String rootString;
  if (compareInfo.getRepositories().size() == 1 && GitUtil.getRepositoryManager(myProject).moreThanOneRoot()) {
    rootString = " in root " + DvcsUtil.getShortRepositoryName(initialRepo);
  }
  else {
    rootString = "";
  }
  myTitle = String.format("Comparing %s with %s%s", currentBranchName, branchName, rootString);
  myMode = dialog ? Mode.MODAL : Mode.FRAME;

  JPanel diffPanel = new GitCompareBranchesDiffPanel(myProject, branchName, currentBranchName, compareInfo);
  myLogPanel = new GitCompareBranchesLogPanel(myProject, branchName, currentBranchName, compareInfo, initialRepo);

  myTabbedPane = new TabbedPaneImpl(SwingConstants.TOP);
  myTabbedPane.addTab("Log", VcsLogIcons.Branch, myLogPanel);
  myTabbedPane.addTab("Diff", AllIcons.Actions.Diff, diffPanel);
  myTabbedPane.setKeyboardNavigation(TabbedPaneImpl.DEFAULT_PREV_NEXT_SHORTCUTS);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:27,代碼來源:GitCompareBranchesDialog.java

示例15: customize

import com.intellij.icons.AllIcons; //導入依賴的package包/類
private void customize(Object value, boolean selected) {
    if (value instanceof StringElement) {
        StringElement element = (StringElement) value;

        // TODO Change icon to each countries flags.
        setIcon(AllIcons.Modules.SourceFolder);
        setText(element.getParentDirName());

        setBorder(BorderFactory.createEmptyBorder(0, 0, 0, UIUtil.getListCellHPadding()));
        setHorizontalTextPosition(2);
        setBackground(selected ? UIUtil.getListSelectionBackground() : UIUtil.getListBackground());
        setForeground(selected ? UIUtil.getListSelectionForeground() : UIUtil.getInactiveTextColor());

        if (UIUtil.isUnderNimbusLookAndFeel()) {
            setOpaque(false);
        }
    }
}
 
開發者ID:konifar,項目名稱:android-strings-search-plugin,代碼行數:19,代碼來源:StringElementListCellRenderer.java


注:本文中的com.intellij.icons.AllIcons類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。