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
ConstructorsConstructorDescriptionCmsDataValue(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 TypeMethodDescriptionvoidaddButton(com.google.gwt.user.client.ui.Widget... buttons) Adds buttons to the view.com.google.gwt.event.shared.HandlerRegistrationaddClickHandler(com.google.gwt.event.dom.client.ClickHandler clickHandler) getLabel()Returns the label of this widget.com.google.gwt.user.client.ui.LabelGets the label widget.getParameter(int i) Returns the requested parameter.booleanmatchesFilter(String filter, int param) Returns if the category matches the given filter.booleanmatchesFilter(String filter, int priValue, int secValue) Returns if the category matches the given filter.voidSets the color.voidSets the style if the data value should be inactive.voidsetSearchMatch(boolean isSearchMatch) Enables / disables the 'search match' style for this widget.voidMakes the content of the list info box unselectable.voidTruncates 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, setWidgetMethods 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, unsinkEventsMethods 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
addClickHandlerin interfacecom.google.gwt.event.dom.client.HasClickHandlers- See Also:
-
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:
trueif 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:
trueif 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_CmsTruncableTruncates long text and sets the original text to the title attribute.- Specified by:
truncatein interfaceI_CmsTruncable- Parameters:
textMetricsKey- the key identifying the text metrics to useclientWidth- the width to use in pixels- See Also:
-