/** * 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); }
/** * Internal method which is called when the user has finished editing the title. * * @param box the text box which has been edited */ protected void onEditTitleTextBox(TextBox box) { if (m_titleEditHandler != null) { m_titleEditHandler.handleEdit(m_title, box); return; } String text = box.getText(); box.removeFromParent(); m_title.setText(text); m_title.setVisible(true); }
/** * Sets the subtitle suffix text, and hides or displays the subtitle suffix depending on whether * the text is null or not null. * * <p> * * @param text the text to put into the subtitle suffix */ public void setSubtitleSuffixText(String text) { if (text == null) { if (m_subtitleSuffix.getParent() != null) { m_subtitleSuffix.removeFromParent(); } } else { if (m_subtitleSuffix.getParent() == null) { m_titleRow.add(m_subtitleSuffix); } m_subtitleSuffix.setText(text); } updateTruncation(); }
/** * Sets the title label text. * * <p> * * @param label the new title to set */ public void setTitleLabel(String label) { m_title.setText(label); }
/** * Sets the subtitle label text. * * <p> * * @param label the new subtitle to set */ public void setSubtitleLabel(String label) { m_subtitle.setText(label); }