/** @see org.opencms.gwt.client.ui.I_CmsTruncable#truncate(java.lang.String, int) */ public void truncate(String textMetricsPrefix, int widgetWidth) { m_childWidth = widgetWidth; m_tmPrefix = textMetricsPrefix; int width = widgetWidth - 4; // just to be on the save side if (m_openClose != null) { width -= 16; } if (m_iconPanel.isVisible()) { width -= 32; } if (width < 0) { // IE fails with a JS error if the width is negative width = 0; } m_title.truncate(textMetricsPrefix + TM_TITLE, width - 10); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_subtitleSuffix.getText())) { m_subtitleSuffix.truncate(textMetricsPrefix + "_STSUFFIX", 100); m_subtitle.truncate(textMetricsPrefix + TM_SUBTITLE, width - 110); } else { m_subtitle.truncate(textMetricsPrefix + TM_SUBTITLE, width - 10); } for (Widget addInfo : m_additionalInfo) { ((AdditionalInfoItem) addInfo).truncate(textMetricsPrefix, widgetWidth - 10); } }
@Override public boolean isControllerVisible() { return controller.isVisible(); }