org.gwtbootstrap3.client.ui
Class ImageAnchor

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.ComplexPanel
                  extended by org.gwtbootstrap3.client.ui.base.ComplexWidget
                      extended by org.gwtbootstrap3.client.ui.Anchor
                          extended by org.gwtbootstrap3.client.ui.ImageAnchor
All Implemented Interfaces:
HasClickHandlers, HasDoubleClickHandlers, HasAttachHandlers, HasHandlers, EventListener, Focusable, HasEnabled, HasHTML, HasText, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, IsWidget, Iterable<Widget>, HasDataParent, HasDataTarget, HasDataToggle, HasHref, HasIcon, HasIconPosition, HasId, HasInlineStyle, HasPull, HasResponsiveness, HasTarget, HasTargetHistoryToken, HasType<ImageType>

public class ImageAnchor
extends Anchor
implements HasType<ImageType>

An anchor that contains an image as the click action, used in Media Objects

Author:
Joshua Godi
See Also:
MediaList

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.IndexedPanel
IndexedPanel.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
HasWidgets.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Fields inherited from interface org.gwtbootstrap3.client.ui.base.HasHref
EMPTY_HREF, HREF
 
Fields inherited from interface org.gwtbootstrap3.client.ui.base.HasTarget
BLANK
 
Constructor Summary
ImageAnchor()
          Creates the base anchor with the image
 
Method Summary
 String getAlt()
          Gets the alt text of the image
 ImageType getType()
          Gets the type of the widget
 String getUrl()
          Gets the URL of the image
 void setAlt(String alt)
          Sets the alt text of the image
 void setAsMediaObject(boolean asMediaObject)
          Set the image as a media object
 void setResponsive(boolean responsive)
          Set the image as responsive
 void setType(ImageType type)
          Sets the type on the widget
 void setUrl(String url)
          Set the URL of the image
 
Methods inherited from class org.gwtbootstrap3.client.ui.Anchor
addClickHandler, addDoubleClickHandler, getDataParent, getDataTarget, getDataToggle, getHref, getHTML, getIcon, getIconFlip, getIconPosition, getIconRotate, getIconSize, getPull, getTabIndex, getTarget, getTargetHistoryToken, getText, isEnabled, isIconBordered, isIconFixedWidth, isIconLight, isIconMuted, isIconSpin, onAttach, onBrowserEvent, setAccessKey, setDataParent, setDataTarget, setDataTargetWidget, setDataTargetWidgets, setDataToggle, setEnabled, setFocus, setHref, setHTML, setIcon, setIconBordered, setIconFixedWidth, setIconFlip, setIconLight, setIconMuted, setIconPosition, setIconRotate, setIconSize, setIconSpin, setPull, setTabIndex, setTarget, setTargetHistoryToken, setText
 
Methods inherited from class org.gwtbootstrap3.client.ui.base.ComplexWidget
add, getId, insert, setColor, setHiddenOn, setId, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setVisibleOn
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, 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, clear, 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, unsinkEvents
 
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
 
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
 

Constructor Detail

ImageAnchor

public ImageAnchor()
Creates the base anchor with the image

Method Detail

setType

public void setType(ImageType type)
Sets the type on the widget

Specified by:
setType in interface HasType<ImageType>
Parameters:
type - T type

getType

public ImageType getType()
Gets the type of the widget

Specified by:
getType in interface HasType<ImageType>
Returns:
type of the widget

setResponsive

public void setResponsive(boolean responsive)
Set the image as responsive

Parameters:
responsive - boolean, whether or not the image has the responsive styles

setAsMediaObject

public void setAsMediaObject(boolean asMediaObject)
Set the image as a media object

Parameters:
asMediaObject - boolean, whether or not the image has the media object styles

setUrl

public void setUrl(String url)
Set the URL of the image

Parameters:
url - String image url

getUrl

public String getUrl()
Gets the URL of the image

Returns:
String image url

setAlt

public void setAlt(String alt)
Sets the alt text of the image

Parameters:
alt - String image alt text

getAlt

public String getAlt()
Gets the alt text of the image

Returns:
String image alt text


Copyright © 2015. All rights reserved.