Class InlineLabel

    • Constructor Detail

      • InlineLabel

        public InlineLabel()
        Creates an empty label.
      • InlineLabel

        public InlineLabel​(java.lang.String text)
        Creates a label with the specified text.
        Parameters:
        text - the new label's text
      • InlineLabel

        public InlineLabel​(java.lang.String text,
                           HasDirection.Direction dir)
        Creates a label with the specified text and direction.
        Parameters:
        text - the new label's text
        dir - the text's direction. Note: Direction.DEFAULT means direction should be inherited from the widget's parent element.
      • InlineLabel

        public InlineLabel​(java.lang.String text,
                           DirectionEstimator directionEstimator)
        Creates a label with the specified text and a default direction estimator.
        Parameters:
        text - the new label's text
        directionEstimator - A DirectionEstimator object used for automatic direction adjustment. For convenience, Label.DEFAULT_DIRECTION_ESTIMATOR can be used.
      • InlineLabel

        protected InlineLabel​(Element element)
        This constructor may be used by subclasses to explicitly use an existing element. This element must be either a <div> <span> element.
        Parameters:
        element - the element to be used
    • Method Detail

      • wrap

        public static InlineLabel wrap​(Element element)
        Creates a InlineLabel widget that wraps an existing <div> or <span> element. This element must already be attached to the document. If the element is removed from the document, you must call RootPanel.detachNow(Widget).
        Parameters:
        element - the element to be wrapped