org.gwtwidgets.client.ui
Class ImageButton

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.Image
              extended by org.gwtwidgets.client.ui.PNGImage
                  extended by org.gwtwidgets.client.ui.ImageButton
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.SourcesClickEvents, com.google.gwt.user.client.ui.SourcesLoadEvents, com.google.gwt.user.client.ui.SourcesMouseEvents, com.google.gwt.user.client.ui.SourcesMouseWheelEvents
Direct Known Subclasses:
ToggleButton

public class ImageButton
extends PNGImage

Use an image as a button. Allows for setting of on/off background color, border color, border width, and border style. The "on" colors are used on mouse over.

Author:
rhanson

Field Summary
protected static int OFF_STATE
           
protected static int ON_STATE
           
 
Constructor Summary
ImageButton(java.lang.String url, int width, int height)
           
 
Method Summary
 Color getBackgroundOffColor()
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 Color getBackgroundOnColor()
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 Color getBorderOffColor()
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 BorderStyle.BorderStyleConstant getBorderOffStyle()
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 int getBorderOffWidth()
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 Color getBorderOnColor()
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 BorderStyle.BorderStyleConstant getBorderOnStyle()
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 int getBorderOnWidth()
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 java.lang.String getOffStyle()
           
 java.lang.String getOnStyle()
           
protected  int getState()
           
protected  void init()
           
 boolean isOn()
           
 void setBackgroundOffColor(Color backgroundOffColor)
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 void setBackgroundOnColor(Color backgroundOnColor)
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 void setBorderOffColor(Color borderOffColor)
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 void setBorderOffStyle(BorderStyle.BorderStyleConstant borderOffStyle)
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 void setBorderOffWidth(int borderOffWidth)
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 void setBorderOnColor(Color borderOnColor)
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 void setBorderOnStyle(BorderStyle.BorderStyleConstant borderOnStyle)
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 void setBorderOnWidth(int borderOnWidth)
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 void setColors()
          Updates the colors of the widget based on the state and color settings.
 void setHorizontalMargin(int px)
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 void setMargin(int px)
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 void setOffStyle(java.lang.String offStyle)
           
 void setOnStyle(java.lang.String onStyle)
           
protected  void setState(int state)
           
 void setVerticleMargin(int px)
          This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.
 
Methods inherited from class org.gwtwidgets.client.ui.PNGImage
getUrl, setUrl
 
Methods inherited from class com.google.gwt.user.client.ui.Image
addClickListener, addLoadListener, addMouseListener, addMouseWheelListener, getHeight, getOriginLeft, getOriginTop, getWidth, onBrowserEvent, prefetch, removeClickListener, removeLoadListener, removeMouseListener, removeMouseWheelListener, setUrlAndVisibleRect, setVisibleRect
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setElement
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ON_STATE

protected static final int ON_STATE
See Also:
Constant Field Values

OFF_STATE

protected static final int OFF_STATE
See Also:
Constant Field Values
Constructor Detail

ImageButton

public ImageButton(java.lang.String url,
                   int width,
                   int height)
Method Detail

init

protected void init()

isOn

public boolean isOn()

setColors

public void setColors()
Updates the colors of the widget based on the state and color settings. This is usually only used after setting one or more of the colors.


setMargin

public void setMargin(int px)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


setHorizontalMargin

public void setHorizontalMargin(int px)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


setVerticleMargin

public void setVerticleMargin(int px)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


getBackgroundOffColor

public Color getBackgroundOffColor()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


setBackgroundOffColor

public void setBackgroundOffColor(Color backgroundOffColor)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


getBackgroundOnColor

public Color getBackgroundOnColor()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


setBackgroundOnColor

public void setBackgroundOnColor(Color backgroundOnColor)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


getBorderOffColor

public Color getBorderOffColor()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


setBorderOffColor

public void setBorderOffColor(Color borderOffColor)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


getBorderOffStyle

public BorderStyle.BorderStyleConstant getBorderOffStyle()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


setBorderOffStyle

public void setBorderOffStyle(BorderStyle.BorderStyleConstant borderOffStyle)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


getBorderOffWidth

public int getBorderOffWidth()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


setBorderOffWidth

public void setBorderOffWidth(int borderOffWidth)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


getBorderOnColor

public Color getBorderOnColor()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


setBorderOnColor

public void setBorderOnColor(Color borderOnColor)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


getBorderOnStyle

public BorderStyle.BorderStyleConstant getBorderOnStyle()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


setBorderOnStyle

public void setBorderOnStyle(BorderStyle.BorderStyleConstant borderOnStyle)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


getBorderOnWidth

public int getBorderOnWidth()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


setBorderOnWidth

public void setBorderOnWidth(int borderOnWidth)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com.


getState

protected int getState()

setState

protected void setState(int state)

getOffStyle

public java.lang.String getOffStyle()

setOffStyle

public void setOffStyle(java.lang.String offStyle)

getOnStyle

public java.lang.String getOnStyle()

setOnStyle

public void setOnStyle(java.lang.String onStyle)


Copyright © 2009. All Rights Reserved.