Class 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

      Constructors 
      Constructor Description
      CmsDataValue​(int width, int part, java.lang.String image, boolean complementPartWidth, java.lang.String... parameters)
      Constructor to generate the DataValueWidget with image.
      CmsDataValue​(int width, int part, java.lang.String image, java.lang.String... parameters)
      Constructor to generate the DataValueWidget with image.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void 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)  
      java.lang.String getLabel()
      Returns the label of this widget.
      com.google.gwt.user.client.ui.Label getLabelWidget()
      Gets the label widget.
      java.lang.String getParameter​(int i)
      Returns the requested parameter.
      boolean matchesFilter​(java.lang.String filter, int param)
      Returns if the category matches the given filter.
      boolean matchesFilter​(java.lang.String filter, int priValue, int secValue)
      Returns if the category matches the given filter.
      void setColor​(java.lang.String color)
      Sets the color.
      void setInactive()
      Sets the style if the data value should be inactive.
      void setSearchMatch​(boolean isSearchMatch)
      Enables / disables the 'search match' style for this widget.
      void setUnselectable()
      Makes the content of the list info box unselectable.
      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
      • 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 Detail

      • CmsDataValue

        public CmsDataValue​(int width,
                            int part,
                            java.lang.String image,
                            boolean complementPartWidth,
                            java.lang.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 label
        image - the css string for the image that is shown in front of the label
        complementPartWidth - 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

        public CmsDataValue​(int width,
                            int part,
                            java.lang.String image,
                            java.lang.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 label
        image - the css string for the image that is shown in front of the label
        parameters - the values that should be shown in this widget. The first value is used for the label
    • Method Detail

      • addButton

        public void addButton​(com.google.gwt.user.client.ui.Widget... buttons)
        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 interface com.google.gwt.event.dom.client.HasClickHandlers
        See Also:
        HasClickHandlers.addClickHandler(com.google.gwt.event.dom.client.ClickHandler)
      • getLabel

        public java.lang.String getLabel()
        Returns the label of this widget.

        Returns:
        the label of this widget
      • getLabelWidget

        public com.google.gwt.user.client.ui.Label getLabelWidget()
        Gets the label widget.

        Returns:
        the label widget
      • getParameter

        public java.lang.String getParameter​(int i)
        Returns the requested parameter.

        Parameters:
        i - the index of the parameter
        Returns:
        the requested parameter
      • matchesFilter

        public boolean matchesFilter​(java.lang.String filter,
                                     int param)
        Returns if the category matches the given filter.

        Parameters:
        filter - the filter to match
        param - the search value
        Returns:
        true if the gallery matches the given filter.

      • matchesFilter

        public boolean matchesFilter​(java.lang.String filter,
                                     int priValue,
                                     int secValue)
        Returns if the category matches the given filter.

        Parameters:
        filter - the filter to match
        priValue - the first search value
        secValue - the second search value
        Returns:
        true if the gallery matches the given filter.

      • setColor

        public void setColor​(java.lang.String color)
        Sets the color.

        Parameters:
        color - the color that should be set
      • setInactive

        public void setInactive()
        Sets the style if the data value should be inactive.

      • setSearchMatch

        public void setSearchMatch​(boolean isSearchMatch)
        Enables / disables the 'search match' style for this widget.

        Parameters:
        isSearchMatch - true if 'search match' style should be enabled
      • setUnselectable

        public void setUnselectable()
        Makes the content of the list info box unselectable.