public class Anchor extends ComplexWidget implements HasEnabled, HasClickHandlers, HasDoubleClickHandlers, HasHref, HasDataToggle, HasDataParent, HasTargetHistoryToken, HasHTML, HasIcon, HasIconPosition, Focusable, HasDataTarget, HasTarget, HasPull, HasBadge
<a>
element with text and optional icon.UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
IndexedPanel.ForIsWidget
HasWidgets.ForIsWidget
DEBUG_ID_PREFIX
EMPTY_HREF, HREF
Constructor and Description |
---|
Anchor()
Creates a default anchor with a default href
|
Anchor(String href)
Creates an anchor widget with the desired HREF
|
Anchor(String text,
String href)
Creates an achor widget with the desired HREF and text
|
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addClickHandler(ClickHandler handler) |
HandlerRegistration |
addDoubleClickHandler(DoubleClickHandler handler) |
BadgePosition |
getBadgePosition() |
String |
getBadgeText() |
String |
getDataParent() |
String |
getDataTarget()
Gets the data target of the widget
|
Toggle |
getDataToggle()
Gets the data-toggle attribute on the widget
|
String |
getHref()
Get the HREF of the widget
|
String |
getHTML() |
IconType |
getIcon() |
IconFlip |
getIconFlip() |
IconPosition |
getIconPosition() |
IconRotate |
getIconRotate() |
IconSize |
getIconSize() |
Pull |
getPull() |
int |
getTabIndex() |
String |
getTarget()
Get the target attribute of the object
|
String |
getTargetHistoryToken()
Get the target history token for the widget
|
String |
getText() |
boolean |
isEnabled() |
boolean |
isIconBordered() |
boolean |
isIconFixedWidth() |
boolean |
isIconInverse() |
boolean |
isIconPulse() |
boolean |
isIconSpin() |
protected void |
onAttach() |
void |
onBrowserEvent(Event event)
|
void |
setAccessKey(char key) |
void |
setBadgePosition(BadgePosition badgePosition) |
void |
setBadgeText(String badgeText) |
void |
setDataParent(String dataParent) |
void |
setDataTarget(String dataTarget)
Sets the data target for the widget
|
void |
setDataTargetWidget(Widget widget) |
void |
setDataTargetWidgets(List<Widget> widgets) |
void |
setDataToggle(Toggle toggle)
Sets the attribute data-toggle on the widget
|
void |
setEnabled(boolean enabled) |
void |
setFocus(boolean focused) |
void |
setHref(String href)
Set's the HREF of the widget
|
void |
setHTML(String html) |
void |
setIcon(IconType iconType) |
void |
setIconBordered(boolean iconBordered) |
void |
setIconFixedWidth(boolean iconFixedWidth) |
void |
setIconFlip(IconFlip iconFlip) |
void |
setIconInverse(boolean iconInverse) |
void |
setIconPosition(IconPosition iconPosition) |
void |
setIconPulse(boolean iconPulse) |
void |
setIconRotate(IconRotate iconRotate) |
void |
setIconSize(IconSize iconSize) |
void |
setIconSpin(boolean iconSpin) |
void |
setPull(Pull pull) |
void |
setTabIndex(int index) |
void |
setTarget(String target)
Set the target attribute of the object
|
void |
setTargetHistoryToken(String targetHistoryToken)
Set the target history token for the widget
|
void |
setText(String text) |
add, getId, insert, insert, remove, setColor, setHiddenOn, setId, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setVisibleOn
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, remove
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, 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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fireEvent
forEach, spliterator
public Anchor(String href)
href
- href for the anchorpublic Anchor(String text, String href)
text
- text for the anchorhref
- href for the anchorpublic Anchor()
public HandlerRegistration addClickHandler(ClickHandler handler)
addClickHandler
in interface HasClickHandlers
public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler)
addDoubleClickHandler
in interface HasDoubleClickHandlers
public void setIconPosition(IconPosition iconPosition)
setIconPosition
in interface HasIconPosition
public IconPosition getIconPosition()
getIconPosition
in interface HasIconPosition
public void setIconSize(IconSize iconSize)
setIconSize
in interface HasIcon
public IconSize getIconSize()
getIconSize
in interface HasIcon
public void setIconFlip(IconFlip iconFlip)
setIconFlip
in interface HasIcon
public IconFlip getIconFlip()
getIconFlip
in interface HasIcon
public void setIconRotate(IconRotate iconRotate)
setIconRotate
in interface HasIcon
public IconRotate getIconRotate()
getIconRotate
in interface HasIcon
public void setIconBordered(boolean iconBordered)
setIconBordered
in interface HasIcon
public boolean isIconBordered()
isIconBordered
in interface HasIcon
public void setIconInverse(boolean iconInverse)
setIconInverse
in interface HasIcon
public boolean isIconInverse()
isIconInverse
in interface HasIcon
public void setIconSpin(boolean iconSpin)
setIconSpin
in interface HasIcon
public boolean isIconSpin()
isIconSpin
in interface HasIcon
public void setIconPulse(boolean iconPulse)
setIconPulse
in interface HasIcon
public boolean isIconPulse()
isIconPulse
in interface HasIcon
public void setIconFixedWidth(boolean iconFixedWidth)
setIconFixedWidth
in interface HasIcon
public boolean isIconFixedWidth()
isIconFixedWidth
in interface HasIcon
public void setTargetHistoryToken(String targetHistoryToken)
setTargetHistoryToken
in interface HasTargetHistoryToken
targetHistoryToken
- String target history token of the widgetpublic String getTargetHistoryToken()
getTargetHistoryToken
in interface HasTargetHistoryToken
public void setDataParent(String dataParent)
setDataParent
in interface HasDataParent
public String getDataParent()
getDataParent
in interface HasDataParent
public void setDataToggle(Toggle toggle)
setDataToggle
in interface HasDataToggle
toggle
- Toggle toggle attributepublic Toggle getDataToggle()
getDataToggle
in interface HasDataToggle
public int getTabIndex()
getTabIndex
in interface Focusable
public void setTabIndex(int index)
setTabIndex
in interface Focusable
public void setAccessKey(char key)
setAccessKey
in interface Focusable
public void setDataTargetWidgets(List<Widget> widgets)
setDataTargetWidgets
in interface HasDataTarget
public void setDataTargetWidget(Widget widget)
setDataTargetWidget
in interface HasDataTarget
public void setDataTarget(String dataTarget)
setDataTarget
in interface HasDataTarget
dataTarget
- data target stringpublic String getDataTarget()
getDataTarget
in interface HasDataTarget
public void setPull(Pull pull)
setPull
in interface HasPull
setPull
in class ComplexWidget
public Pull getPull()
getPull
in interface HasPull
getPull
in class ComplexWidget
public boolean isEnabled()
isEnabled
in interface HasEnabled
public void setEnabled(boolean enabled)
setEnabled
in interface HasEnabled
public void setBadgeText(String badgeText)
setBadgeText
in interface HasBadge
public String getBadgeText()
getBadgeText
in interface HasBadge
public void setBadgePosition(BadgePosition badgePosition)
setBadgePosition
in interface HasBadge
public BadgePosition getBadgePosition()
getBadgePosition
in interface HasBadge
public void onBrowserEvent(Event event)
onBrowserEvent
in interface EventListener
onBrowserEvent
in class Widget
event
- dom eventCopyright © 2017. All rights reserved.