org.cruxframework.crux.widgets.client.button
Class DownloadButton

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.Composite
              extended by org.cruxframework.crux.widgets.client.button.DownloadButton
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasEnabled, com.google.gwt.user.client.ui.HasText, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, HasSelectHandlers

public class DownloadButton
extends com.google.gwt.user.client.ui.Composite
implements com.google.gwt.user.client.ui.HasText, com.google.gwt.user.client.ui.HasEnabled, HasSelectHandlers

A cross device download button, that use touch events on touch enabled devices.

Author:
Samuel Almeida Cardoso (samuel@cruxframework.org)

Nested Class Summary
static class DownloadButton.DownloadButtonAll
           
static class DownloadButton.DownloadButtonBlob
           
static interface DownloadButton.DownloadData
          Deprecated. 
static interface DownloadButton.DownloadInfo
           
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
DownloadButton()
           
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addSelectHandler(SelectHandler handler)
           
 void fireDownload(DownloadButton.DownloadInfo downloadData)
           
 String getText()
           
 boolean isEnabled()
           
 void select()
           
 void setEnabled(boolean enabled)
           
protected  void setPreventDefaultTouchEvents(boolean preventDefaultTouchEvents)
           
 void setStyleName(String style)
           
 void setText(String text)
           
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, 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, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, 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

DownloadButton

public DownloadButton()
Method Detail

fireDownload

public void fireDownload(DownloadButton.DownloadInfo downloadData)

select

public void select()

getText

public String getText()
Specified by:
getText in interface com.google.gwt.user.client.ui.HasText

setStyleName

public void setStyleName(String style)
Overrides:
setStyleName in class com.google.gwt.user.client.ui.UIObject

setText

public void setText(String text)
Specified by:
setText in interface com.google.gwt.user.client.ui.HasText

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface com.google.gwt.user.client.ui.HasEnabled

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface com.google.gwt.user.client.ui.HasEnabled

addSelectHandler

public com.google.gwt.event.shared.HandlerRegistration addSelectHandler(SelectHandler handler)
Specified by:
addSelectHandler in interface HasSelectHandlers

setPreventDefaultTouchEvents

protected void setPreventDefaultTouchEvents(boolean preventDefaultTouchEvents)


Copyright © 2015. All rights reserved.