|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
com.github.gwtbootstrap.client.ui.base.ComplexWidget
com.github.gwtbootstrap.client.ui.base.IconAnchor
public class IconAnchor
An Anchor with optional image and caret.
It uses a HTML <a> tag and can contain text and child widgets. But
not both at the same time.
<b:IconAnchor icon="plane" href="www.twitter.com">Some Text</b:IconAnchor>
Here we add a second Icon:
<b:IconAnchor icon="STAR" text="There is a widget so the text goes here">
<b:Icon type="STAR" />
</b:IconAnchor>
All parameter are optional. All setters can be used as parameters.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
|---|
HasWidgets.ForIsWidget |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel |
|---|
IndexedPanel.ForIsWidget |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
IconAnchor()
Creates the widget and sets the href property to
javascript:; in order to avoid problems when clicking on it. |
|
| Method Summary | |
|---|---|
HandlerRegistration |
addClickHandler(ClickHandler handler)
|
String |
getHref()
Gets the URL of the website, the link is pointing to. |
int |
getTabIndex()
|
String |
getTargetHistoryToken()
Gets the history token this link points to |
String |
getText()
|
boolean |
isEnabled()
|
protected void |
onAttach()
|
void |
onBrowserEvent(Event event)
|
void |
setAccessKey(char key)
|
void |
setCaret(boolean visible)
Shows or hides the caret. |
void |
setEmptyHref()
Sets the hrefproperty of this element to "javascript:;" in
order to get another cursor (hand). |
void |
setEnabled(boolean enabled)
|
void |
setFocus(boolean focused)
|
void |
setHref(String href)
Sets the href property of the anchor tag. |
void |
setIcon(IconType type)
Sets the Type of the Icon. |
void |
setIconSize(IconSize size)
Sets the size of the icon. |
void |
setTabIndex(int index)
|
void |
setTargetHistoryToken(String targetHistoryToken)
Sets the href property of the anchor tag to
"#" + targetHistoryToken. |
void |
setText(String text)
|
| Methods inherited from class com.github.gwtbootstrap.client.ui.base.ComplexWidget |
|---|
add, addStyle, insert, removeStyle, setHideOn, setShowOn, setStyle |
| Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel |
|---|
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove |
| Methods inherited from class com.google.gwt.user.client.ui.Panel |
|---|
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
| 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, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
| 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 |
| Methods inherited from interface com.google.gwt.user.client.ui.HasWidgets |
|---|
clear, iterator, remove |
| Constructor Detail |
|---|
public IconAnchor()
href property to
javascript:; in order to avoid problems when clicking on it.
| Method Detail |
|---|
public void setIcon(IconType type)
setIcon in interface HasIconpublic void setIconSize(IconSize size)
Default is DEFAULT.
setIconSize in interface HasIconsize - the new size.public void setText(String text)
setText in interface HasTextpublic String getText()
getText in interface HasTextpublic void setHref(String href)
href property of the anchor tag.
Use it only to set links to another page. Links on the same page or GWT
tokens should be set with #setTargetHistoryToken(String)
setHref in interface HasHrefhref - the website URLpublic String getHref()
getHref in interface HasHrefpublic void setCaret(boolean visible)
visible - true if the caret should be shown.public void setTargetHistoryToken(String targetHistoryToken)
href property of the anchor tag to
"#" + targetHistoryToken.
setTargetHistoryToken in interface HasHreftargetHistoryToken - the history tokenpublic String getTargetHistoryToken()
getTargetHistoryToken in interface HasHrefpublic void setEmptyHref()
hrefproperty of this element to "javascript:;" in
order to get another cursor (hand).
public HandlerRegistration addClickHandler(ClickHandler handler)
addClickHandler in interface HasClickHandlerspublic boolean isEnabled()
isEnabled in interface HasEnabledpublic void setEnabled(boolean enabled)
setEnabled in interface HasEnabledpublic void onBrowserEvent(Event event)
onBrowserEvent in interface EventListeneronBrowserEvent in class Widgetpublic int getTabIndex()
getTabIndex in interface Focusablepublic void setAccessKey(char key)
setAccessKey in interface Focusablepublic void setFocus(boolean focused)
setFocus in interface Focusablepublic void setTabIndex(int index)
setTabIndex in interface Focusableprotected void onAttach()
onAttach in class Widget
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||