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


Java SpeedSearchUtil.appendFragmentsForSpeedSearch方法代码示例

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


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

示例1: renderTreeNode

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入方法依赖的package包/类
@Override
public void renderTreeNode(SimpleColoredComponent component, JTree tree) {
  SpeedSearchUtil.appendFragmentsForSpeedSearch(tree, getText(), SimpleTextAttributes.REGULAR_ATTRIBUTES, false, component);
  component.setIcon(myParameter.getIcon(0));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ParameterClassMember.java

示例2: renderTreeNode

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入方法依赖的package包/类
@Override
public void renderTreeNode(SimpleColoredComponent component, JTree tree) {
  SpeedSearchUtil.appendFragmentsForSpeedSearch(tree, getText(), getTextAttributes(tree), false, component);
  component.setIcon(myIcon);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:MemberChooserObjectBase.java

示例3: customizeCellRenderer

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入方法依赖的package包/类
@Override
protected void customizeCellRenderer(final JList list, final Object value, final int index, final boolean selected, final boolean hasFocus) {
  // Fix GTK background
  if (UIUtil.isUnderGTKLookAndFeel()){
    final Color background = selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground();
    UIUtil.changeBackGround(this, background);
  }
  Color color = UIUtil.getListForeground();
  SimpleTextAttributes attributes = null;
  String locationString = null;

  setBorder(BorderFactory.createEmptyBorder(1, 0, 1, 0)); // for separator, see below

  if (value instanceof NodeDescriptor) {
    final NodeDescriptor descriptor = (NodeDescriptor)value;
    setIcon(descriptor.getIcon());
    final Color elementColor = descriptor.getColor();

    if (elementColor != null) {
      color = elementColor;
    }

    if (descriptor instanceof AbstractTreeNode) {
      final AbstractTreeNode treeNode = (AbstractTreeNode)descriptor;
      final TextAttributesKey attributesKey = treeNode.getAttributesKey();

      if (attributesKey != null) {
        final TextAttributes textAttributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(attributesKey);

        if (textAttributes != null) attributes =  SimpleTextAttributes.fromTextAttributes(textAttributes);
      }
      locationString = treeNode.getLocationString();

      final PresentationData presentation = treeNode.getPresentation();
      if (presentation.hasSeparatorAbove() && !selected) {
        setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, GroupedElementsRenderer.POPUP_SEPARATOR_FOREGROUND),
                                                     BorderFactory.createEmptyBorder(0, 0, 1, 0)));
      }
    }
  }

  if(attributes == null) attributes = new SimpleTextAttributes(Font.PLAIN, color);
  final String text = value.toString();

  if (myCommanderPanel.isEnableSearchHighlighting()) {
    JList list1 = myCommanderPanel.getList();
    if (list1 != null) {
      SpeedSearchUtil.appendFragmentsForSpeedSearch(list1, text, attributes, selected, this);
    }
  }
  else {
    append(text != null ? text : "", attributes);
  }

  if (locationString != null && locationString.length() > 0) {
    append(" (" + locationString + ")", SimpleTextAttributes.GRAY_ATTRIBUTES);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:59,代码来源:ColoredCommanderRenderer.java

示例4: renderTreeNode

import com.intellij.ui.speedSearch.SpeedSearchUtil; //导入方法依赖的package包/类
@Override
public void renderTreeNode(SimpleColoredComponent component, JTree tree) {
  SpeedSearchUtil.appendFragmentsForSpeedSearch(tree, getText(), SimpleTextAttributes.REGULAR_ATTRIBUTES, false, component);
  component.setIcon(IconDescriptorUpdaters.getIcon(myParameter, 0));
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:6,代码来源:ParameterClassMember.java


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