/** * Initializes the additional info. * * <p> * * @param infoBean the info bean */ protected void initAdditionalInfo(CmsListInfoBean infoBean) { // create the state info CmsResourceState state = infoBean.getResourceState(); if (state != null) { String stateKey = Messages.get().key(Messages.GUI_RESOURCE_STATE_0); String stateValue = CmsResourceStateUtil.getStateName(state); String stateStyle = CmsResourceStateUtil.getStateStyle(state); m_additionalInfo.add( new AdditionalInfoItem(new CmsAdditionalInfoBean(stateKey, stateValue, stateStyle))); ensureOpenCloseAdditionalInfo(); } // set the additional info if (infoBean.hasAdditionalInfo()) { ensureOpenCloseAdditionalInfo(); for (CmsAdditionalInfoBean additionalInfo : infoBean.getAdditionalInfo()) { m_additionalInfo.add(new AdditionalInfoItem(additionalInfo)); } } }
/** * Constructor. * * <p> * * @param infoBean bean holding the item information */ protected void init(CmsListInfoBean infoBean) { m_iconPanel.setVisible(false); m_title.setText(infoBean.getTitle()); m_subtitle.setText(infoBean.getSubTitle()); // set the resource type icon if present if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(infoBean.getResourceType())) { setIcon(CmsIconUtil.getResourceIconClasses(infoBean.getResourceType(), false)); } if (infoBean.getStateIcon() != null) { setStateIcon(infoBean.getStateIcon()); } if (infoBean.getLockIcon() != null) { setLockIcon(infoBean.getLockIcon(), infoBean.getLockIconTitle()); } initAdditionalInfo(infoBean); }