/** * Called by {@link AbstractFolder} to set the owner that this icon is used for. * <p> * If you are implementing {@link FolderIcon} that changes the behaviour based on the contents/properties * of the folder, store the folder object to a field and use that. * @param folder the folder. */ protected void setOwner(AbstractFolder<?> folder) { if (folder instanceof Folder) { setFolder((Folder) folder); } }
public void setIcon(FolderIcon icon) { this.icon = icon; icon.setOwner(this); }
protected String iconClassNameImageOf(String size) { String iconClassName = getIconClassName(); if (StringUtils.isNotBlank(iconClassName)) { String spec = null; if ("16x16".equals(size)) { spec = "icon-sm"; } else if ("24x24".equals(size)) { spec = "icon-md"; } else if ("32x32".equals(size)) { spec = "icon-lg"; } else if ("48x48".equals(size)) { spec = "icon-xlg"; } if (spec != null) { Icon icon = IconSet.icons.getIconByClassSpec(iconClassName + " " + spec); if (icon != null) { JellyContext ctx = new JellyContext(); ctx.setVariable("resURL", Stapler.getCurrentRequest().getContextPath() + Jenkins.RESOURCE_PATH); return icon.getQualifiedUrl(ctx); } } } return null; }
protected String iconClassNameImageOf(String size) { String iconClassName = getIconClassName(); if (StringUtils.isNotBlank(iconClassName)) { String spec = null; if ("16x16".equals(size)) { spec = "icon-sm"; } else if ("24x24".equals(size)) { spec = "icon-md"; } else if ("32x32".equals(size)) { spec = "icon-lg"; } else if ("48x48".equals(size)) { spec = "icon-xlg"; } if (spec != null) { Icon icon = IconSet.icons.getIconByClassSpec(iconClassName + " " + spec); if (icon != null) { JellyContext ctx = new JellyContext(); ctx.setVariable("resURL", Stapler.getCurrentRequest().getContextPath() + Jenkins.RESOURCE_PATH); return icon.getQualifiedUrl(ctx); } } } return null; }
public void setIcon(FolderIcon icon) { this.icon = icon; icon.setOwner(this); }
/** * Called by {@link AbstractFolder} to set the owner that this icon is used for. * <p> * If you are implementing {@link FolderIcon} that changes the behaviour based on the contents/properties * of the folder, store the folder object to a field and use that. * @param folder the folder. */ protected void setOwner(AbstractFolder<?> folder) { if (folder instanceof Folder) { setFolder((Folder) folder); } }
icon = newDefaultFolderIcon(); icon.setOwner(this);
icon = newDefaultFolderIcon(); icon.setOwner(this);