@Override public String getDisplayName() { if(sourceGroup != null) { return sourceGroup.getDisplayName(); } return displayName; }
@Override public String getDisplayName() { return group.getDisplayName(); }
@Override public String getDisplayName() { return g.getDisplayName(); }
public String getDisplayName() { return g.getDisplayName(); }
public @Override String getDisplayName() { return g.getDisplayName(); }
@Override public boolean equals(Object obj) { if (!(obj instanceof SourceGroupKey)) { return false; } else { SourceGroupKey otherKey = (SourceGroupKey) obj; String thisDisplayName = this.group.getDisplayName(); String otherDisplayName = otherKey.group.getDisplayName(); // XXX what is the operator binding order supposed to be here?? return fileObject.equals(otherKey.fileObject) && thisDisplayName == null ? otherDisplayName == null : thisDisplayName.equals(otherDisplayName); } }
public @Override boolean equals(Object obj) { if (!(obj instanceof RootChildNode)) { return false; } else { RootChildNode otherKey = (RootChildNode) obj; if (libraryNode || otherKey.libraryNode) { return libraryNode && otherKey.libraryNode; } String thisDisplayName = group == null ? null : group.getDisplayName(); String otherDisplayName = otherKey.group == null ? null : otherKey.group.getDisplayName(); // XXX what is the operator binding order supposed to be here?? return fileObject.equals(otherKey.fileObject) && (thisDisplayName == null ? otherDisplayName == null : thisDisplayName.equals(otherDisplayName)); } }
public @Override boolean equals(Object obj) { if (!(obj instanceof RootChildNode)) { return false; } else { RootChildNode otherKey = (RootChildNode) obj; if (libraryNode || otherKey.libraryNode) { return libraryNode && otherKey.libraryNode; } String thisDisplayName = group == null ? null : group.getDisplayName(); String otherDisplayName = otherKey.group == null ? null : otherKey.group.getDisplayName(); // XXX what is the operator binding order supposed to be here?? return fileObject.equals(otherKey.fileObject) && (thisDisplayName == null ? otherDisplayName == null : thisDisplayName.equals(otherDisplayName)); } }
@Override public int hashCode() { int hash = 5; String disp = this.group.getDisplayName(); hash = 79 * hash + (fileObject != null ? fileObject.hashCode() : 0); hash = 79 * hash + (disp != null ? disp.hashCode() : 0); return hash; }
/** */ private static String getSrcGrpDisp(SourceGroup srcGroup) { if (srcGroup == null) { return ""; //NOI18N } else { String srcGroupName = srcGroup.getDisplayName(); return new StringBuffer(srcGroupName.length() + 3) .append(' ') .append('(').append(srcGroupName).append(')') .toString(); } }
public static String getLocationText(Object location) { String text = location instanceof SourceGroup ? ((SourceGroup) location).getDisplayName() : location instanceof FileObject ? FileUtil.getFileDisplayName((FileObject) location) : location.toString(); return text; }
@Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { if (value != null) { // apple jdk bug SourceGroup g = (SourceGroup) value; super.getListCellRendererComponent(list, g.getDisplayName(), index, isSelected, cellHasFocus); setIcon(g.getIcon(false)); } return this; }
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { SourceGroup g = (SourceGroup) value; super.getListCellRendererComponent(list, g.getDisplayName(), index, isSelected, cellHasFocus); setIcon(g.getIcon(false)); return this; }
/** */ private static NamedObject[] createNamedItems(final Object[] srcRoots) { //PENDING - should not the source groups be sorted (alphabetically)? NamedObject[] items = new NamedObject[srcRoots.length]; for (int i = 0; i < srcRoots.length; i++) { String name = (srcRoots[i] instanceof SourceGroup) ? ((SourceGroup) srcRoots[i]).getDisplayName() : (srcRoots[i] instanceof FileObject) ? FileUtil.getFileDisplayName((FileObject) srcRoots[i]) : srcRoots[i].toString(); items[i] = new NamedObject(srcRoots[i], name); } return items; }
@Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String name; Icon icon; if (value == null) { name = ""; //NOI18N icon = null; } else { assert value instanceof SourceGroup; SourceGroup g = (SourceGroup) value; name = g.getDisplayName(); icon = g.getIcon(false); } super.getListCellRendererComponent(list, name, index, isSelected, cellHasFocus); setIcon(icon); return this; }
public String getDisplayName() { if ( isProjectDir ) { return pi.getDisplayName(); } else { return MessageFormat.format( GROUP_NAME_PATTERN, new Object[] { group.getDisplayName(), pi.getDisplayName(), getOriginal().getDisplayName() } ); } }
@Override public String getDisplayName() { if (isProjectDir) { return pi.getDisplayName(); } else { return MessageFormat.format(GROUP_NAME_PATTERN, new Object[]{group.getDisplayName(), pi.getDisplayName(), getOriginal().getDisplayName() }); } }
SourceGroupTreeElement(SourceGroup sg) { this.sg = new WeakReference<SourceGroup>(sg); dir = sg.getRootFolder(); icon = sg.getIcon(false); if ( icon == null ) { try { Image image = DataObject.find(sg.getRootFolder()).getNodeDelegate().getIcon(BeanInfo.ICON_COLOR_16x16); image = ImageUtilities.mergeImages( image, ImageUtilities.loadImage(PACKAGE_BADGE), 7, 7 ); icon = new ImageIcon(image); } catch (DataObjectNotFoundException d) { } } displayName = sg.getDisplayName(); }
@Override public Node node(SourceGroup key) { Node node = null; if (key != null) { FileObject rootFolder = key.getRootFolder(); DataFolder folder = getFolder(rootFolder); if (folder != null) { boolean isTest = !folder.getPrimaryFile().equals(ProjectPropertiesSupport.getSourcesDirectory(project)); node = new SrcNode(project, folder, new PhpSourcesFilter(project, rootFolder), key.getDisplayName(), isTest); } } return node; } }
private PackageRootNode( SourceGroup group, Children ch) { super(ch, new ProxyLookup(createLookup(group), Lookups.singleton( SearchInfoDefinitionFactory.createSearchInfoBySubnodes(ch)))); this.group = group; file = group.getRootFolder(); files = Collections.singleton(file); try { FileSystem fs = file.getFileSystem(); fileSystemListener = FileUtil.weakFileStatusListener(this, fs); fs.addFileStatusListener(fileSystemListener); } catch (FileStateInvalidException e) { Exceptions.printStackTrace(Exceptions.attachMessage(e,"Can not get " + file + " filesystem, ignoring...")); //NOI18N } setName( group.getName() ); setDisplayName( group.getDisplayName() ); // setIconBase("org/netbeans/modules/java/j2seproject/ui/resources/packageRoot"); }