public class VCaption extends com.google.gwt.user.client.ui.HTML implements HasErrorIndicatorElement
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Modifier and Type | Field and Description |
|---|---|
static String |
CLASSNAME |
| Constructor and Description |
|---|
VCaption(ApplicationConnection client)
Deprecated.
all captions should be associated with a paintable widget and
be updated from shared state, not UIDL
|
VCaption(ComponentConnector component,
ApplicationConnection client)
Creates a caption for a
ComponentConnector. |
| Modifier and Type | Method and Description |
|---|---|
static String |
getCaptionOwnerPid(com.google.gwt.dom.client.Element e) |
com.google.gwt.dom.client.Element |
getErrorIndicatorElement()
Gets the error indicator element.
|
int |
getHeight() |
ComponentConnector |
getOwner()
Returns Paintable for which this Caption belongs to.
|
static String |
getOwnerPid(com.google.gwt.dom.client.Element el) |
int |
getRenderedWidth() |
int |
getRequiredWidth() |
protected com.google.gwt.user.client.Element |
getTextElement() |
TooltipInfo |
getTooltipInfo()
Returns the tooltip that should be shown for the caption.
|
boolean |
isCaptionAsHtml()
Checks whether captions are rendered as HTML.
|
static boolean |
isNeeded(ComponentConnector connector) |
static boolean |
mightChange(StateChangeEvent event)
Checks whether anything in a given state change might cause the caption
to change.
|
protected void |
onAttach() |
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
protected void |
onDetach() |
void |
setAlignment(String alignment) |
void |
setCaptionAsHtml(boolean captionAsHtml)
Sets whether the caption is rendered as HTML.
|
static void |
setCaptionText(com.google.gwt.dom.client.Element captionElement,
AbstractComponentState state)
Sets the text of the given caption element to the caption found in the
state.
|
static void |
setCaptionText(com.google.gwt.user.client.ui.HasHTML widget,
AbstractComponentState state)
Sets the text of the given widget to the caption found in the state.
|
void |
setErrorIndicatorElementVisible(boolean visible)
Sets the visibility of the error indicator element.
|
void |
setMaxWidth(int maxWidth) |
void |
setTooltipInfo(TooltipInfo tooltipInfo)
Sets the tooltip that should be shown for the caption.
|
boolean |
shouldBePlacedAfterComponent() |
boolean |
updateCaption()
Updates the caption from UIDL.
|
boolean |
updateCaptionWithoutOwner(String caption,
boolean disabled,
boolean hasDescription,
boolean hasError,
ErrorLevel errorLevel,
String iconURL,
String iconAltText)
Deprecated.
|
boolean |
updateCaptionWithoutOwner(String caption,
boolean disabled,
boolean hasDescription,
boolean hasError,
String iconURL)
Deprecated.
|
boolean |
updateCaptionWithoutOwner(String caption,
boolean disabled,
boolean hasDescription,
boolean hasError,
String iconURL,
String iconAltText)
Deprecated.
|
getHTML, getTextOrHtml, setHTML, setHTML, setHTML, setHTML, wrapaddClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, asEditor, getDirection, getText, getTextDirection, removeClickListener, removeMouseListener, removeMouseWheelListener, setDirection, setText, setTextgetAutoHorizontalAlignment, getDirectionEstimator, getHorizontalAlignment, getWordWrap, setAutoHorizontalAlignment, setDirectionEstimator, setDirectionEstimator, setHorizontalAlignment, setWordWrap, updateHorizontalAlignmentaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final String CLASSNAME
@Deprecated public VCaption(ApplicationConnection client)
ComponentConnector.
When using this constructor, getOwner() returns null.client - ApplicationConnectionpublic VCaption(ComponentConnector component, ApplicationConnection client)
ComponentConnector.component - owner of caption, not nullclient - ApplicationConnectionprotected void onAttach()
onAttach in class com.google.gwt.user.client.ui.Widgetprotected void onDetach()
onDetach in class com.google.gwt.user.client.ui.Widgetpublic boolean updateCaption()
#updateCaptionWithoutOwner(UIDL, String, boolean, boolean).@Deprecated public boolean updateCaptionWithoutOwner(String caption, boolean disabled, boolean hasDescription, boolean hasError, String iconURL)
@Deprecated public boolean updateCaptionWithoutOwner(String caption, boolean disabled, boolean hasDescription, boolean hasError, String iconURL, String iconAltText)
@Deprecated public boolean updateCaptionWithoutOwner(String caption, boolean disabled, boolean hasDescription, boolean hasError, ErrorLevel errorLevel, String iconURL, String iconAltText)
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent in interface com.google.gwt.user.client.EventListeneronBrowserEvent in class com.google.gwt.user.client.ui.Widgetpublic static boolean isNeeded(ComponentConnector connector)
public static boolean mightChange(StateChangeEvent event)
event - the state change event to checktrue if the caption might have changed; otherwise
falsepublic ComponentConnector getOwner()
public boolean shouldBePlacedAfterComponent()
public int getRenderedWidth()
public int getRequiredWidth()
public int getHeight()
public void setAlignment(String alignment)
public void setMaxWidth(int maxWidth)
public void setTooltipInfo(TooltipInfo tooltipInfo)
tooltipInfo - The tooltip that should be shown or null if no tooltip should
be shownpublic TooltipInfo getTooltipInfo()
protected com.google.gwt.user.client.Element getTextElement()
public static String getCaptionOwnerPid(com.google.gwt.dom.client.Element e)
public static String getOwnerPid(com.google.gwt.dom.client.Element el)
public void setCaptionAsHtml(boolean captionAsHtml)
Default is false
captionAsHtml - true if the captions are rendered as HTML, false if rendered
as plain textpublic boolean isCaptionAsHtml()
Default is false
public static void setCaptionText(com.google.gwt.dom.client.Element captionElement,
AbstractComponentState state)
Uses AbstractComponentState.captionAsHtml to determine whether to
set the caption as html or plain text
captionElement - the target elementstate - the state from which to read the caption text and modepublic static void setCaptionText(com.google.gwt.user.client.ui.HasHTML widget,
AbstractComponentState state)
Uses AbstractComponentState.captionAsHtml to determine whether to
set the caption as html or plain text
widget - the target widgetstate - the state from which to read the caption text and modepublic com.google.gwt.dom.client.Element getErrorIndicatorElement()
HasErrorIndicatorElementgetErrorIndicatorElement in interface HasErrorIndicatorElementpublic void setErrorIndicatorElementVisible(boolean visible)
HasErrorIndicatorElementsetErrorIndicatorElementVisible in interface HasErrorIndicatorElementvisible - true to show the error indicator element,
false to hide itCopyright © 2021 Vaadin Ltd. All rights reserved.