org.openide.nodes.AbstractNode.getIcon()方法的使用及代码示例

x33g5p2x  于11个月前 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(28)

本文整理了Java中org.openide.nodes.AbstractNode.getIcon()方法的一些代码示例,展示了AbstractNode.getIcon()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractNode.getIcon()方法的具体详情如下:
包路径:org.openide.nodes.AbstractNode
类名称:AbstractNode
方法名:getIcon

AbstractNode.getIcon介绍

[英]Find an icon for this node. Uses an #setIconBase.
[中]查找此节点的图标。使用#setIconBase。

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-nodes

/** Get an icon for this node in the closed state.
* Uses the Bean's icon if possible.
*
* @param type constant from {@link java.beans.BeanInfo}
* @return icon to use
*/
@Override
public Image getIcon(int type) {
  Image image = beanInfo.getIcon(type);
  if (image != null) {
    return image;
  }
  return super.getIcon(type);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-core-stack

@Override
public Image getIcon(int type) {
 return icon == null ? super.getIcon(type) : icon;
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** Get an icon for this node in the closed state.
* Uses the Bean's icon if possible.
*
* @param type constant from {@link java.beans.BeanInfo}
* @return icon to use
*/
public Image getIcon (int type) {
  Image image = beanInfo.getIcon (type);
  if (image != null) return image;
  return super.getIcon(type);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

@Override
public Image getIcon(int type) {
  Image original = super.getIcon(type);
  return ImageUtilities.mergeImages(original, MakeLogicalViewProvider.brokenProjectBadge, 8, 0);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-callgraph

@Override
  public Image getIcon(int type) {
    if (call instanceof Node) {
      return ((Node)call).getIcon(type);
    }
    return super.getIcon(type);
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** Get an icon for this node in the closed state.
* Uses the Bean's icon if possible.
*
* @param type constant from {@link java.beans.BeanInfo}
* @return icon to use
*/
public Image getIcon (int type) {
  Image image = beanInfo.getIcon (type);
  if (image != null) return image;
  return super.getIcon(type);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-project

@Override
public Image getIcon(int type) {
  return annotateImage(super.getIcon(type));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-debugger-common2

@Override
public Image getIcon(int type) {
  String path = "";
  
  try {
    path = watchModel.getIconBaseWithExtension(null, v);
  } catch (UnknownTypeException ex) {
    Exceptions.printStackTrace(ex);
  }
  setIconBaseWithExtension(path);
  return super.getIcon(type);
}

代码示例来源:origin: dcaoyuan/nbscala

@Override
public Image getIcon(int type) {
  Image original = super.getIcon(type);
  if (broken || illegalState) {
    return ImageUtilities.mergeImages(original, brokenProjectBadge, 8, 0);
  } else {
    return compileOnSaveDisabled ? ImageUtilities.mergeImages(original, compileOnSaveDisabledBadge, 8, 0) : original;
  }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-insync

public Image getIcon(int type) {
  Image img = liveBean.getBeanInfo().getIcon(type);
  if (img == null) {
    img = super.getIcon(type); // Falls back to default icon.
  }
  return img;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-api-ejbmodule

public Image getIcon(int type) {
  Image image = null;
  Node imageDelegate = getImageDelegate();
  if (imageDelegate != null) {
    image = imageDelegate.getIcon(type);
  }
  if (image == null) {
    image = super.getIcon(type);
  }
  return image;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects

public @Override Image getIcon(int type) {
  Image img = super.getIcon(type);
  
  if (files != null && files.iterator().hasNext()) {
    try {
      FileObject fo = files.iterator().next();
      img = fo.getFileSystem().getStatus().annotateIcon(img, type, files);
    } catch (FileStateInvalidException e) {
      ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
    }
  }
  return img;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-javaee-project

@Override
public Image getIcon( int type ) {
  Image original = super.getIcon( type );
  if (isBroken()) {
    return ImageUtilities.mergeImages(original, ProjectProperties.ICON_BROKEN_BADGE.getImage(), 8, 0);
  } else if (deployOnSaveDisabled) {
    return DeployOnSaveUtils.badgeDisabledDeployOnSave(original);
  } else {
    return original;
  }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-docker-ui

@Override
public Image getIcon(int type) {
  Image original = super.getIcon(type);
  return badgeIcon(original, container.getDetail().getStatus());
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-jboss4

public Image getIcon(int type) {
  if (type == BeanInfo.ICON_COLOR_16x16) {
    if (isJB7x()) {
      return ImageUtilities.loadImage("org/netbeans/modules/j2ee/jboss4/resources/as7_16x16.png"); // NOI18N
    }
    return ImageUtilities.loadImage("org/netbeans/modules/j2ee/jboss4/resources/16x16.gif"); // NOI18N
  }
  return super.getIcon(type);
}

代码示例来源:origin: org.codehaus.mevenide/nb-repo-browser

@Override
public java.awt.Image getIcon(int param) {
  java.awt.Image retValue = super.getIcon(param);
  if (hasJavadoc) {
    retValue = Utilities.mergeImages(retValue,
        Utilities.loadImage("org/codehaus/mevenide/repository/DependencyJavadocIncluded.png"),//NOI18N
        12, 12);
  }
  if (hasSources) {
    retValue = Utilities.mergeImages(retValue,
        Utilities.loadImage("org/codehaus/mevenide/repository/DependencySrcIncluded.png"),//NOI18N
        12, 8);
  }
  return retValue;
}

代码示例来源:origin: org.codehaus.mevenide/nb-repo-browser

@Override
public java.awt.Image getIcon(int param) {
  java.awt.Image retValue = super.getIcon(param);
  if (hasJavadoc) {
    retValue = Utilities.mergeImages(retValue,
        Utilities.loadImage("org/codehaus/mevenide/repository/DependencyJavadocIncluded.png"),//NOI18N
        12, 12);
  }
  if (hasSources) {
    retValue = Utilities.mergeImages(retValue,
        Utilities.loadImage("org/codehaus/mevenide/repository/DependencySrcIncluded.png"),//NOI18N
        12, 8);
  }
  return retValue;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-api-ejbmodule

private Image computeIcon(boolean opened, int type) {
  Image image;
  Node iconDelegate = getIconDelegate();
  if (opened) {
    image = iconDelegate != null ? iconDelegate.getOpenedIcon(type) : super.getOpenedIcon(type);
  } else {
    image = iconDelegate != null ? iconDelegate.getIcon(type) : super.getIcon(type);
  }
  Image badge = ImageUtilities.loadImage(EJB_BADGE);
  return ImageUtilities.mergeImages(image, badge, 7, 7);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-maven-repository

@Override
public Image getIcon(int param) {
  java.awt.Image retValue = super.getIcon(param);
  if (hasJavadoc) {
    Image ann = ImageUtilities.loadImage(IconResources.JAVADOC_BADGE_ICON); //NOI18N
    ann = ImageUtilities.addToolTipToImage(ann, toolTipJavadoc);
    retValue = ImageUtilities.mergeImages(retValue, ann, 12, 0);//NOI18N
  }
  if (hasSources) {
    Image ann = ImageUtilities.loadImage(IconResources.SOURCE_BADGE_ICON); //NOI18N
    ann = ImageUtilities.addToolTipToImage(ann, toolTipSource);
    retValue = ImageUtilities.mergeImages(retValue, ann, 12, 8);//NOI18N
  }
  return retValue;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf

@Override
public Image getIcon(int type) {
  if (description.getCustomIcon() != null) {
    return ImageUtilities.icon2Image(description.getCustomIcon());
  }
  Icon icon = Icons.getElementIcon(description.getKind(), description.getModifiers());
  if (icon != null) {
    return ImageUtilities.icon2Image(icon);
  } else {
    return super.getIcon(type);
  }
}

相关文章

最新文章

更多