Class CollaborationMessageInput

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.messages.MessageInput>
com.vaadin.collaborationengine.CollaborationMessageInput
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<CollaborationMessageInput>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<CollaborationMessageInput>, com.vaadin.flow.component.FocusNotifier<CollaborationMessageInput>, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.shared.HasTooltip, Serializable

public class CollaborationMessageInput extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.messages.MessageInput> implements com.vaadin.flow.component.Focusable<CollaborationMessageInput>, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.shared.HasTooltip
Extension of the MessageInput component which integrates with the CollaborationMessageList. The user can type a message and submit it. The messages will be displayed in any CollaborationMessageList that is connected to the same topic as the list passed as the argument of this component constructor. The text area and button will be disabled while the connection to the topic is not active or the topic is set to null (see CollaborationMessageList.setTopic(String)).
Since:
3.1
Author:
Vaadin Ltd
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier

    com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier

    com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new collaboration message input component which submits messages to the provided CollaborationMessageList.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.flow.component.messages.MessageInputI18n
    Gets the internationalization object previously set for this component.
    com.vaadin.flow.component.shared.Tooltip
    Gets the tooltip handle of the component.
    void
    setI18n(com.vaadin.flow.component.messages.MessageInputI18n i18n)
    Sets the internationalization properties for this component.
    com.vaadin.flow.component.shared.Tooltip
    Sets a tooltip text for the component.

    Methods inherited from class com.vaadin.flow.component.Composite

    getChildren, getContent, getElement, initContent

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.BlurNotifier

    addBlurListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.Focusable

    addFocusShortcut, blur, focus, getTabIndex, setTabIndex

    Methods inherited from interface com.vaadin.flow.component.FocusNotifier

    addFocusListener

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.component.HasSize

    getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
  • Constructor Details

    • CollaborationMessageInput

      public CollaborationMessageInput(CollaborationMessageList list)
      Creates a new collaboration message input component which submits messages to the provided CollaborationMessageList.
      Parameters:
      list - the list which will display the submitted messages, not null
  • Method Details

    • getI18n

      public com.vaadin.flow.component.messages.MessageInputI18n getI18n()
      Gets the internationalization object previously set for this component.

      Note: updating the object content returned by this method will not update the component if not set back using MessageInput.setI18n(MessageInputI18n).

      Returns:
      the i18n object, or null if one has not been set with setI18n(MessageInputI18n)
    • setI18n

      public void setI18n(com.vaadin.flow.component.messages.MessageInputI18n i18n)
      Sets the internationalization properties for this component. It enabled you to customize and translate the language used in the message input.

      Note: updating the object properties after setting the i18n will not update the component. To make the changes effective, you need to set the updated object again.

      Parameters:
      i18n - the i18n object, not null
    • setTooltipText

      public com.vaadin.flow.component.shared.Tooltip setTooltipText(String text)
      Sets a tooltip text for the component.
      Specified by:
      setTooltipText in interface com.vaadin.flow.component.shared.HasTooltip
      Parameters:
      text - The tooltip text
      Returns:
      the tooltip handle
    • getTooltip

      public com.vaadin.flow.component.shared.Tooltip getTooltip()
      Gets the tooltip handle of the component.
      Specified by:
      getTooltip in interface com.vaadin.flow.component.shared.HasTooltip
      Returns:
      the tooltip handle