Class CmsDataValue
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.category.CmsDataValue
- All Implemented Interfaces:
com.google.gwt.event.dom.client.HasClickHandlers
,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 CmsDataValue
extends com.google.gwt.user.client.ui.Composite
implements I_CmsTruncable, com.google.gwt.event.dom.client.HasClickHandlers
Widget to generate an single row of values.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
-
Field Summary
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
ConstructorDescriptionCmsDataValue
(int width, int part, String image, boolean complementPartWidth, String... parameters) Constructor to generate the DataValueWidget with image.CmsDataValue
(int width, int part, String image, String... parameters) Constructor to generate the DataValueWidget with image. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addButton
(com.google.gwt.user.client.ui.Widget... buttons) Adds buttons to the view.com.google.gwt.event.shared.HandlerRegistration
addClickHandler
(com.google.gwt.event.dom.client.ClickHandler clickHandler) getLabel()
Returns the label of this widget.com.google.gwt.user.client.ui.Label
Gets the label widget.getParameter
(int i) Returns the requested parameter.boolean
matchesFilter
(String filter, int param) Returns if the category matches the given filter.boolean
matchesFilter
(String filter, int priValue, int secValue) Returns if the category matches the given filter.void
Sets the color.void
Sets the style if the data value should be inactive.void
setSearchMatch
(boolean isSearchMatch) Enables / disables the 'search match' style for this widget.void
Makes the content of the list info box unselectable.void
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
CmsDataValue
public CmsDataValue(int width, int part, String image, boolean complementPartWidth, String... parameters) Constructor to generate the DataValueWidget with image.- Parameters:
width
- the width of this widget.part
- the part of the width that should be used for the labelimage
- the css string for the image that is shown in front of the labelcomplementPartWidth
- if true, the label has width if (part-1)/part instead of 1/part.parameters
- the values that should be shown in this widget. The first value is used for the label
-
CmsDataValue
Constructor to generate the DataValueWidget with image.- Parameters:
width
- the width of this widget.part
- the part of the width that should be used for the labelimage
- the css string for the image that is shown in front of the labelparameters
- the values that should be shown in this widget. The first value is used for the label
-
-
Method Details
-
addButton
Adds buttons to the view.- Parameters:
buttons
- the buttons that should be added
-
addClickHandler
public com.google.gwt.event.shared.HandlerRegistration addClickHandler(com.google.gwt.event.dom.client.ClickHandler clickHandler) - Specified by:
addClickHandler
in interfacecom.google.gwt.event.dom.client.HasClickHandlers
- See Also:
-
HasClickHandlers.addClickHandler(com.google.gwt.event.dom.client.ClickHandler)
-
getLabel
Returns the label of this widget.- Returns:
- the label of this widget
-
getLabelWidget
Gets the label widget.- Returns:
- the label widget
-
getParameter
Returns the requested parameter.- Parameters:
i
- the index of the parameter- Returns:
- the requested parameter
-
matchesFilter
Returns if the category matches the given filter.- Parameters:
filter
- the filter to matchparam
- the search value- Returns:
true
if the gallery matches the given filter.
-
matchesFilter
Returns if the category matches the given filter.- Parameters:
filter
- the filter to matchpriValue
- the first search valuesecValue
- the second search value- Returns:
true
if the gallery matches the given filter.
-
setColor
Sets the color.- Parameters:
color
- the color that should be set
-
setInactive
Sets the style if the data value should be inactive. -
setSearchMatch
Enables / disables the 'search match' style for this widget.- Parameters:
isSearchMatch
- true if 'search match' style should be enabled
-
setUnselectable
Makes the content of the list info box unselectable. -
truncate
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:
-