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

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

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

AbstractNode.getOpenedIcon介绍

[英]Finds an icon for this node when opened. This icon should represent the node only when it is opened (when it can have children).
[中]打开时查找此节点的图标。此图标应仅在节点打开时表示该节点(当节点可以有子节点时)。

代码示例

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

private Image getMyOpenedIcon(int type) {
  Image original = super.getOpenedIcon(type);
  //return broken || illegalState ? ImageUtilities.mergeImages(original, brokenProjectBadge, 8, 0) : original;
  return original;
}

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

/** Overrides folder icon to search for icon in UIManager table for
   * BeanInfo.ICON_COLOR_16x16 type, to allow for different icons
   * across Look and Feels.
   * Keeps possibility of icon annotations.
   */
  public Image getOpenedIcon (int type) {
    Image img = null;
    if (type == BeanInfo.ICON_COLOR_16x16) {
      // search for proper folder icon installed by core/windows module
      img = (Image)UIManager.get("Nb.Explorer.Folder.openedIcon");
    }
    if (img == null) {
      img = super.getOpenedIcon(type);
    } 
    return img;
  }
}

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

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

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

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

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

@Override
public Image getOpenedIcon(int type) {
  Image original = super.getOpenedIcon(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-j2ee-api-ejbmodule

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

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

@Override
public Image getOpenedIcon( int type ) {
  Image original = super.getOpenedIcon(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: net.sf.squirrel-sql.thirdparty-non-maven/openide-loaders

/** Get the displayed icon for this node.
* A filesystem may {@link org.openide.filesystems.FileSystem#getStatus specially alter} this.
 * Subclassers overriding this method should consider the recommendations
 * in {@link DataObject#createNodeDelegate}.
* @param type the icon type from {@link java.beans.BeanInfo}
* @return the desired icon
*/
public java.awt.Image getOpenedIcon (int type) {
  java.awt.Image img = super.getOpenedIcon(type);
  try {
    img = obj.getPrimaryFile ().getFileSystem ().getStatus ().annotateIcon (img, type, new LazyFilesSet());
  } catch (FileStateInvalidException e) {
    // no fs, do nothing
  }
  return img;
}

代码示例来源: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.codehaus.mevenide/nb-project

@Override
public Image getOpenedIcon(int type) {
  Image retValue;
  retValue = super.getOpenedIcon(type);
  if (isLocal()) {
    if (hasJavadocInRepository()) {
      retValue = Utilities.mergeImages(retValue,
          Utilities.loadImage("org/codehaus/mevenide/netbeans/DependencyJavadocIncluded.png"), //NOI18N
          12, 0);
    }
    if (hasSourceInRepository()) {
      retValue = Utilities.mergeImages(retValue,
          Utilities.loadImage("org/codehaus/mevenide/netbeans/DependencySrcIncluded.png"), //NOI18N
          12, 8);
    }
    return retValue;
  } else {
    return Utilities.mergeImages(retValue,
        Utilities.loadImage("org/codehaus/mevenide/netbeans/ResourceNotIncluded.gif"), //NOI18N
        0,0);
  }
}

相关文章

最新文章

更多