com.smartgwt.client.widgets.form.fields
Class FormItemIcon

java.lang.Object
  extended by com.smartgwt.client.core.JsObject
      extended by com.smartgwt.client.core.DataClass
          extended by com.smartgwt.client.widgets.form.fields.FormItemIcon
All Implemented Interfaces:
HasHandlers, HasFormItemClickHandlers
Direct Known Subclasses:
PickerIcon

public class FormItemIcon
extends DataClass
implements HasFormItemClickHandlers

Form item icon descriptor objects used by Form Items to specify the appearance and behavior of icons displayed after the item in the page flow.


Field Summary
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
FormItemIcon()
           
FormItemIcon(JavaScriptObject jsObj)
           
 
Method Summary
 HandlerRegistration addFormItemClickHandler(FormItemClickHandler handler)
          Add a formItemClick handler.
 boolean equals(Object o)
           
 Integer getHeight()
          If set, this property determines the height of this icon in px.
 Boolean getNeverDisable()
          If icon.neverDisable is true, when this form item is disabled, the icon will remain enabled.
static FormItemIcon getOrCreateRef(JavaScriptObject jsObj)
           
 String getPrompt()
          If set, this property will be displayed as a prompt (and tooltip text) for this form item icon.
 Boolean getShowFocused()
          Should this icon's image switch to the appropriate "focused" source when the user puts focus on the form item or icon?
 Boolean getShowFocusedWithItem()
          If this icon will be updated to show focus (see showFocused, showFocusedIcons), this property governs whether the focused state should be shown when the item as a whole recieves focus or just if the icon recieves focus.
 Boolean getShowOver()
          Should this icon's image switch to the appropriate "over" source when the user rolls over or focuses on the icon?
 String getSrc()
          If set, this property determines this icon's image source.
 Integer getWidth()
          If set, this property determines the width of this icon in px.
 int hashCode()
           
 void keyPress(String keyName, char character, DynamicForm form, FormItem item, FormItemIcon icon)
          StringMethod action to fire when this icon has focus and recieves a keypress event.
 void setHeight(Integer height)
          If set, this property determines the height of this icon in px.
 void setNeverDisable(Boolean neverDisable)
          If icon.neverDisable is true, when this form item is disabled, the icon will remain enabled.
 void setPrompt(String prompt)
          If set, this property will be displayed as a prompt (and tooltip text) for this form item icon.
 void setShowFocused(Boolean showFocused)
          Should this icon's image switch to the appropriate "focused" source when the user puts focus on the form item or icon?
 void setShowFocusedWithItem(Boolean showFocusedWithItem)
          If this icon will be updated to show focus (see showFocused, showFocusedIcons), this property governs whether the focused state should be shown when the item as a whole recieves focus or just if the icon recieves focus.
 void setShowOver(Boolean showOver)
          Should this icon's image switch to the appropriate "over" source when the user rolls over or focuses on the icon?
 void setSrc(String src)
          If set, this property determines this icon's image source.
 void setWidth(Integer width)
          If set, this property determines the width of this icon in px.
 
Methods inherited from class com.smartgwt.client.core.DataClass
doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsObject, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute
 
Methods inherited from class com.smartgwt.client.core.JsObject
isCreated, setJsObj
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

FormItemIcon

public FormItemIcon()

FormItemIcon

public FormItemIcon(JavaScriptObject jsObj)
Method Detail

getOrCreateRef

public static FormItemIcon getOrCreateRef(JavaScriptObject jsObj)

setSrc

public void setSrc(String src)
If set, this property determines this icon's image source. If unset the form item's defaultIconSrc property will be used instead.
As with defaultIconSrc this URL will be modified by adding "_Over" or "_Disabled" if appropriate to show the icons over or disabled state.

Parameters:
src - src Default value is null

getSrc

public String getSrc()
If set, this property determines this icon's image source. If unset the form item's defaultIconSrc property will be used instead.
As with defaultIconSrc this URL will be modified by adding "_Over" or "_Disabled" if appropriate to show the icons over or disabled state.

Returns:
String

setShowOver

public void setShowOver(Boolean showOver)
Should this icon's image switch to the appropriate "over" source when the user rolls over or focuses on the icon?

Note : This is an advanced setting

Parameters:
showOver - showOver Default value is null

getShowOver

public Boolean getShowOver()
Should this icon's image switch to the appropriate "over" source when the user rolls over or focuses on the icon?

Returns:
Boolean

setShowFocused

public void setShowFocused(Boolean showFocused)
Should this icon's image switch to the appropriate "focused" source when the user puts focus on the form item or icon?

Note : This is an advanced setting

Parameters:
showFocused - showFocused Default value is null

getShowFocused

public Boolean getShowFocused()
Should this icon's image switch to the appropriate "focused" source when the user puts focus on the form item or icon?

Returns:
Boolean

setShowFocusedWithItem

public void setShowFocusedWithItem(Boolean showFocusedWithItem)
If this icon will be updated to show focus (see showFocused, showFocusedIcons), this property governs whether the focused state should be shown when the item as a whole recieves focus or just if the icon recieves focus. If this property is unset, default behavior is to show focused state when the item recieves focus.

Note : This is an advanced setting

Parameters:
showFocusedWithItem - showFocusedWithItem Default value is null

getShowFocusedWithItem

public Boolean getShowFocusedWithItem()
If this icon will be updated to show focus (see showFocused, showFocusedIcons), this property governs whether the focused state should be shown when the item as a whole recieves focus or just if the icon recieves focus. If this property is unset, default behavior is to show focused state when the item recieves focus.

Returns:
Boolean

setNeverDisable

public void setNeverDisable(Boolean neverDisable)
If icon.neverDisable is true, when this form item is disabled, the icon will remain enabled. Note that disabling the entire form will disable all items, together with their icons including those marked as neverDisable - this property only has an effect if the form is enabled and a specific item is disabled within it.

Note : This is an advanced setting

Parameters:
neverDisable - neverDisable Default value is null

getNeverDisable

public Boolean getNeverDisable()
If icon.neverDisable is true, when this form item is disabled, the icon will remain enabled. Note that disabling the entire form will disable all items, together with their icons including those marked as neverDisable - this property only has an effect if the form is enabled and a specific item is disabled within it.

Returns:
Boolean

setWidth

public void setWidth(Integer width)
If set, this property determines the width of this icon in px. If unset the form item's iconWidth property will be used instead.

Parameters:
width - width Default value is null

getWidth

public Integer getWidth()
If set, this property determines the width of this icon in px. If unset the form item's iconWidth property will be used instead.

Returns:
Integer

setHeight

public void setHeight(Integer height)
If set, this property determines the height of this icon in px. If unset the form item's iconHeight property will be used instead.

Parameters:
height - height Default value is null

getHeight

public Integer getHeight()
If set, this property determines the height of this icon in px. If unset the form item's iconHeight property will be used instead.

Returns:
Integer

setPrompt

public void setPrompt(String prompt)
If set, this property will be displayed as a prompt (and tooltip text) for this form item icon.

If unset the form item's iconPrompt property will be used instead.

Note : This is an advanced setting

Parameters:
prompt - prompt Default value is null

getPrompt

public String getPrompt()
If set, this property will be displayed as a prompt (and tooltip text) for this form item icon.

If unset the form item's iconPrompt property will be used instead.

Returns:
String

addFormItemClickHandler

public HandlerRegistration addFormItemClickHandler(FormItemClickHandler handler)
Add a formItemClick handler.

StringMethod action to fire when this icon is clicked If unset the form item's iconClick method will be fired instead (if specified).

Specified by:
addFormItemClickHandler in interface HasFormItemClickHandlers
Parameters:
handler - the formItemClick handler
Returns:
HandlerRegistration used to remove this handler

keyPress

public void keyPress(String keyName,
                     char character,
                     DynamicForm form,
                     FormItem item,
                     FormItemIcon icon)
StringMethod action to fire when this icon has focus and recieves a keypress event. If unset the form item's iconKeyPress method will be fired instead (if specified).

Parameters:
keyName - Name of the key pressed
character - character produced by the keypress
form - The Dynamic Form to which this icon's item belongs.
item - The Form Item containing this icon
icon - A pointer to the form item icon

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object