Package org.opencms.gwt.client.ui.input
Class CmsLabelSelectCell
- 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.gwt.client.ui.input.A_CmsSelectCell
-
- org.opencms.gwt.client.ui.input.CmsLabelSelectCell
-
- 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 CmsLabelSelectCell extends A_CmsSelectCell implements I_CmsTruncable
This class represents a single select option in the selector of the select box.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
m_value
The value of the select option.
-
Constructor Summary
Constructors Constructor Description CmsLabelSelectCell(java.lang.String value, java.lang.String text)
Creates a new select cell.CmsLabelSelectCell(java.lang.String value, java.lang.String text, java.lang.String title)
Creates a new select cell.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getOpenerText()
Gets the opener text.java.lang.String
getText()
Returns the text as which the select option should be displayed to the user.java.lang.String
getValue()
Returns the value of the select option as a string.void
setOpenerText(java.lang.String openerText)
Sets the opener text.void
setText(java.lang.String text)
Sets the text of the label.void
truncate(java.lang.String textMetricsKey, int labelWidth)
Truncates long text and sets the original text to the title attribute.-
Methods inherited from class org.opencms.gwt.client.ui.input.A_CmsSelectCell
getRequiredWidth, registerDomHandler
-
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
-
m_value
protected java.lang.String m_value
The value of the select option.
-
-
Constructor Detail
-
CmsLabelSelectCell
public CmsLabelSelectCell(java.lang.String value, java.lang.String text)
Creates a new select cell.- Parameters:
value
- the value of the select optiontext
- the text to display for the select option
-
CmsLabelSelectCell
public CmsLabelSelectCell(java.lang.String value, java.lang.String text, java.lang.String title)
Creates a new select cell.- Parameters:
value
- the value of the select optiontext
- the text to display for the select optiontitle
- the title to display on mouseover
-
-
Method Detail
-
getOpenerText
public java.lang.String getOpenerText()
Gets the opener text.- Returns:
- the opener text
-
getText
public java.lang.String getText()
Returns the text as which the select option should be displayed to the user.- Returns:
- the text of the select option
-
getValue
public java.lang.String getValue()
Description copied from class:A_CmsSelectCell
Returns the value of the select option as a string.- Specified by:
getValue
in classA_CmsSelectCell
- Returns:
- the value of the select option
- See Also:
A_CmsSelectCell.getValue()
-
setOpenerText
public void setOpenerText(java.lang.String openerText)
Sets the opener text.- Parameters:
openerText
- the new opener text
-
setText
public void setText(java.lang.String text)
Sets the text of the label.- Parameters:
text
- the new text
-
truncate
public void truncate(java.lang.String textMetricsKey, int labelWidth)
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 uselabelWidth
- the width to use in pixels- See Also:
I_CmsTruncable.truncate(java.lang.String, int)
-
-