Class CmsListTab
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Composite
-
- org.opencms.ade.sitemap.client.toolbar.CmsListTab
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.IsRenderable
,com.google.gwt.user.client.ui.IsWidget
,I_CmsTruncable
public class CmsListTab extends com.google.gwt.user.client.ui.Composite implements I_CmsTruncable
Tab widget to display a CmsList.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TM_LITST_MENU
Text metrics key for truncation.
-
Constructor Summary
Constructors Constructor Description CmsListTab(CmsList<? extends I_CmsListItem> list)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addClearListButton(com.google.gwt.event.dom.client.ClickHandler clickHandler)
Adds a clear list button to the tab.int
getRequiredHeight()
Returns the required height.CmsScrollPanel
getScrollPanel()
Returns the scroll panel.void
setClearButtonEnabled(boolean enabled)
Sets the clear list button enabled.void
truncate(java.lang.String textMetricsKey, int clientWidth)
Truncates long text and sets the original text to the title attribute.-
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
-
-
-
Field Detail
-
TM_LITST_MENU
public static final java.lang.String TM_LITST_MENU
Text metrics key for truncation.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsListTab
public CmsListTab(CmsList<? extends I_CmsListItem> list)
Constructor.- Parameters:
list
- the list
-
-
Method Detail
-
addClearListButton
public void addClearListButton(com.google.gwt.event.dom.client.ClickHandler clickHandler)
Adds a clear list button to the tab.- Parameters:
clickHandler
- the button click handler
-
getRequiredHeight
public int getRequiredHeight()
Returns the required height.- Returns:
- the height
-
getScrollPanel
public CmsScrollPanel getScrollPanel()
Returns the scroll panel.- Returns:
- the scroll panel
-
setClearButtonEnabled
public void setClearButtonEnabled(boolean enabled)
Sets the clear list button enabled.- Parameters:
enabled
-true
to enable the button
-
truncate
public void truncate(java.lang.String textMetricsKey, int clientWidth)
Description copied from interface:I_CmsTruncable
Truncates long text and sets the original text to the title attribute.- Specified by:
truncate
in interfaceI_CmsTruncable
- Parameters:
textMetricsKey
- the key identifying the text metrics to useclientWidth
- the width to use in pixels- See Also:
I_CmsTruncable.truncate(java.lang.String, int)
-
-