org.rcfaces.core.component
Class ImageButtonComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UICommand
              extended by org.rcfaces.core.internal.component.CameliaCommandComponent
                  extended by org.rcfaces.core.component.AbstractCommandComponent
                      extended by org.rcfaces.core.component.ButtonComponent
                          extended by org.rcfaces.core.component.ImageButtonComponent
All Implemented Interfaces:
ActionSource, ActionSource2, StateHolder, IAccessKeyCapability, IAlternateTextCapability, IBorderCapability, IBorderTypeCapability, IClientDataCapability, IDisabledCapability, IErrorEventCapability, IFocusBlurEventCapability, IFocusStyleClassCapability, IFontCapability, IForegroundBackgroundColorCapability, IHeightCapability, IHelpCapability, IHiddenModeCapability, IHorizontalTextPositionCapability, IImageCapability, IImageSizeCapability, IImmediateCapability, IInitEventCapability, ILayoutPositionCapability, ILookAndFeelCapability, IMarginCapability, IMouseEventCapability, IPartialRenderingCapability, IPositionCapability, IPropertyChangeEventCapability, IReadOnlyCapability, ISelectionEventCapability, IServerDataCapability, ISizeCapability, IStatesImageCapability, IStyleClassCapability, ITabIndexCapability, ITextAlignmentCapability, ITextCapability, ITextDirectionCapability, ITextPositionCapability, IToolTipCapability, IUnlockedClientAttributesCapability, IUserEventCapability, IValidationEventCapability, IVisibilityCapability, IWAIRoleCapability, IWidthCapability, IImageButtonFamilly, org.rcfaces.core.internal.capability.IComponentLifeCycle, org.rcfaces.core.internal.capability.IImageAccessorsCapability, org.rcfaces.core.internal.capability.IRCFacesComponent, org.rcfaces.core.internal.manager.IClientDataManager, org.rcfaces.core.internal.manager.IContainerManager, org.rcfaces.core.internal.manager.IServerDataManager, org.rcfaces.core.internal.manager.ITransientAttributesManager
Direct Known Subclasses:
HelpButtonComponent, ImagePagerButtonComponent, ImageResetButtonComponent, ImageSubmitButtonComponent, TextEditorImageButtonComponent

public class ImageButtonComponent
extends ButtonComponent
implements IImageButtonFamilly, org.rcfaces.core.internal.capability.IImageAccessorsCapability

The imageButton Component is a button Component that can show an image.

The imageButton Component has the following capabilities :

The default imageButton renderer is linked to the f_imageButton javascript class. f_imageButton extends f_component, fa_readOnly, fa_disabled, fa_tabIndex, fa_borderType, fa_images, fa_immediate, fa_value, fa_aria

Table of component style classes:

Style Name Description
f_imageButton Defines styles for the wrapper IMG element
f_imageButton_text Defines styles for the wrapper SPAN element for text
f_imageButton_image Defines styles for the wrapper IMG element


Field Summary
protected static Set CAMELIA_ATTRIBUTES
           
static String COMPONENT_TYPE
           
 
Fields inherited from class org.rcfaces.core.internal.component.CameliaCommandComponent
engine
 
Fields inherited from class javax.faces.component.UICommand
COMPONENT_FAMILY
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Fields inherited from interface org.rcfaces.core.component.capability.IBorderTypeCapability
NONE_BORDER_TYPE_NAME
 
Fields inherited from interface org.rcfaces.core.component.capability.ITextPositionCapability
BOTTOM_POSITION, TOP_POSITION
 
Fields inherited from interface org.rcfaces.core.component.capability.IHorizontalTextPositionCapability
CENTER_POSITION, DEFAULT_POSITION, LEFT_POSITION, RIGHT_POSITION, UNKNOWN_POSITION
 
Fields inherited from interface org.rcfaces.core.component.capability.ITextDirectionCapability
DEFAULT_TEXT_DIRECTION, LEFT_TO_RIGHT_TEXT_DIRECTION, RIGHT_LEFT_TEXT_DIRECTION
 
Fields inherited from interface org.rcfaces.core.component.capability.IHiddenModeCapability
CLIENT_HIDDEN_MODE, DEFAULT_HIDDEN_MODE, IGNORE_HIDDEN_MODE, PHANTOM_HIDDEN_MODE, SERVER_HIDDEN_MODE
 
Constructor Summary
ImageButtonComponent()
           
ImageButtonComponent(String componentId)
           
 
Method Summary
 String getBorderType()
          Returns a string that indicates the type of border the component should show.
 String getBorderType(FacesContext facesContext)
          See getBorderType() for more details
protected  Set getCameliaFields()
           
 String getDisabledImageURL()
          Returns an url string pointing to the image used for the disabled state.
 String getDisabledImageURL(FacesContext facesContext)
          See getDisabledImageURL() for more details
 String getHoverImageURL()
          Returns an url string pointing to the image used chen the pointer hover the component.
 String getHoverImageURL(FacesContext facesContext)
          See getHoverImageURL() for more details
 IContentAccessors getImageAccessors()
          Returns ImageAccessors associated to the url.
 IContentAccessors getImageAccessors(FacesContext facesContext)
           
 int getImageHeight()
          Returns an int value specifying the height (in pixels) to use for the image shown.
 int getImageHeight(FacesContext facesContext)
          See getImageHeight() for more details
 String getImageURL()
          Returns the URL of the image.
 String getImageURL(FacesContext facesContext)
          See getImageURL() for more details
 int getImageWidth()
          Returns an int value specifying the width (in pixels) to use for the image shown.
 int getImageWidth(FacesContext facesContext)
          See getImageWidth() for more details
 String getSelectedImageURL()
          Returns an url string pointing to the image used when the component is selected.
 String getSelectedImageURL(FacesContext facesContext)
          See getSelectedImageURL() for more details
 int getTextPosition()
          Returns an int value specifying the position of the text in the component.
 int getTextPosition(FacesContext facesContext)
          See getTextPosition() for more details
protected  Converter getTextPositionConverter()
           
 boolean isBorder()
          Returns a boolean value that indicates if the component should show a border or not.
 boolean isBorder(FacesContext facesContext)
          See isBorder() for more details
 boolean isBorderSetted()
          Returns true if the attribute "border" is set.
 boolean isBorderTypeSetted()
          Returns true if the attribute "borderType" is set.
 boolean isDisabledImageURLSetted()
          Returns true if the attribute "disabledImageURL" is set.
 boolean isHoverImageURLSetted()
          Returns true if the attribute "hoverImageURL" is set.
 boolean isImageHeightSetted()
          Returns true if the attribute "imageHeight" is set.
 boolean isImageURLSetted()
          Returns true if the attribute "imageURL" is set.
 boolean isImageWidthSetted()
          Returns true if the attribute "imageWidth" is set.
 boolean isSelectedImageURLSetted()
          Returns true if the attribute "selectedImageURL" is set.
 boolean isTextPositionSetted()
          Returns true if the attribute "textPosition" is set.
 void setBorder(boolean border)
          Sets a boolean value that indicates if the component should show a border or not.
 void setBorderType(String borderType)
          Sets a string that indicates the type of border the component should show.
 void setDisabledImageURL(String disabledImageURL)
          Sets an url string pointing to the image used for the disabled state.
 void setHoverImageURL(String hoverImageURL)
          Sets an url string pointing to the image used chen the pointer hover the component.
 void setImageHeight(int imageHeight)
          Sets an int value specifying the height (in pixels) to use for the image shown.
 void setImageURL(String imageURL)
          Specify the URL of the image.
 void setImageWidth(int imageWidth)
          Sets an int value specifying the width (in pixels) to use for the image shown.
 void setSelectedImageURL(String selectedImageURL)
          Sets an url string pointing to the image used when the component is selected.
 void setTextPosition(int textPosition)
          Sets an int value specifying the position of the text in the component.
 void setTextPosition(String textPosition)
           
 
Methods inherited from class org.rcfaces.core.component.ButtonComponent
addSelectionListener, getAlternateText, getAlternateText, getFocusStyleClass, getFocusStyleClass, getText, getText, getTextDirection, getTextDirection, isAlternateTextSetted, isFocusStyleClassSetted, isReadOnly, isReadOnly, isReadOnlySetted, isTextDirectionSetted, isTextSetted, listSelectionListeners, removeSelectionListener, setAlternateText, setFocusStyleClass, setReadOnly, setText, setTextDirection
 
Methods inherited from class org.rcfaces.core.component.AbstractCommandComponent
addBlurListener, addErrorListener, addFocusListener, addInitListener, addMouseOutListener, addMouseOverListener, addPropertyChangeListener, addUserEventListener, addValidationListener, getAccessKey, getAccessKey, getAriaLabel, getAriaLabel, getAriaLevel, getAriaLevel, getBackgroundColor, getBackgroundColor, getBottom, getBottom, getClientData, getClientData, getClientDataCount, getClientDataMap, getClientDataMap, getFontBold, getFontBold, getFontItalic, getFontItalic, getFontName, getFontName, getFontSize, getFontSize, getFontUnderline, getFontUnderline, getForegroundColor, getForegroundColor, getHeight, getHeight, getHelpMessage, getHelpMessage, getHelpURL, getHelpURL, getHiddenMode, getHiddenMode, getLeft, getLeft, getLookId, getLookId, getMarginBottom, getMarginBottom, getMarginLeft, getMarginLeft, getMarginRight, getMarginRight, getMarginTop, getMarginTop, getRight, getRight, getServerData, getServerData, getServerDataCount, getServerDataMap, getServerDataMap, getStyleClass, getStyleClass, getTabIndex, getTabIndex, getTextAlignment, getTextAlignment, getToolTipText, getToolTipText, getTop, getTop, getUnlockedClientAttributeNames, getUnlockedClientAttributeNames, getVisibleState, getVisibleState, getWaiRole, getWaiRole, getWidth, getWidth, getX, getX, getY, getY, isAccessKeySetted, isAriaLabelSetted, isAriaLevelSetted, isBackgroundColorSetted, isBottomSetted, isDisabled, isDisabled, isDisabledSetted, isFontBoldSetted, isFontItalicSetted, isFontNameSetted, isFontSizeSetted, isFontUnderlineSetted, isForegroundColorSetted, isHeightSetted, isHelpMessageSetted, isHelpURLSetted, isHiddenModeSetted, isLeftSetted, isLookIdSetted, isMarginBottomSetted, isMarginLeftSetted, isMarginRightSetted, isMarginTopSetted, isPartialRendering, isPartialRendering, isPartialRenderingSetted, isRightSetted, isStyleClassSetted, isTabIndexSetted, isTextAlignmentSetted, isToolTipTextSetted, isTopSetted, isUnlockedClientAttributeNamesSetted, isVisible, isVisible, isVisibleSetted, isWaiRoleSetted, isWidthSetted, isXSetted, isYSetted, listBlurListeners, listClientDataKeys, listClientDataKeys, listErrorListeners, listFocusListeners, listInitListeners, listMouseOutListeners, listMouseOverListeners, listPropertyChangeListeners, listServerDataKeys, listServerDataKeys, listUserEventListeners, listValidationListeners, removeBlurListener, removeClientData, removeErrorListener, removeFocusListener, removeInitListener, removeMouseOutListener, removeMouseOverListener, removePropertyChangeListener, removeServerData, removeUserEventListener, removeValidationListener, setAccessKey, setAriaLabel, setAriaLevel, setBackgroundColor, setBottom, setClientData, setClientData, setDisabled, setFontBold, setFontItalic, setFontName, setFontSize, setFontUnderline, setForegroundColor, setHeight, setHelpMessage, setHelpURL, setHiddenMode, setHiddenMode, setLeft, setLookId, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setPartialRendering, setRight, setServerData, setServerData, setStyleClass, setTabIndex, setTextAlignment, setToolTipText, setTop, setUnlockedClientAttributeNames, setVisible, setWaiRole, setWidth, setX, setY
 
Methods inherited from class org.rcfaces.core.internal.component.CameliaCommandComponent
broadcast, clearListeners, confirmListenerAppend, constructPhase, constructTemplate, decodePhase, encodeBegin, encodeChildren, encodeEnd, getAsyncRenderer, getCameliaValueAlias, getChildren, getChildrenListState, getFamily, getRendererType, getTransientAttribute, getValueExpression, hasDefaultProperties, initializeComponent, initializePhase, isClientRendered, isRendered, isTemplateComponent, processDecodes, processEngineUpdates, processEngineValidators, processUpdates, processValidators, queueEvent, renderPhase, restoreState, saveState, setDefaultProperties, setRendered, setTransientAttribute, setValueExpression, toString, updatePhase, validationPhase, verifyAsyncDecode
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, getAction, getActionExpression, getActionListener, getActionListeners, getValue, isImmediate, removeActionListener, setAction, setActionExpression, setActionListener, setImmediate, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, decode, findComponent, getAttributes, getChildCount, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendersChildren, getValueBinding, invokeOnComponent, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.rcfaces.core.component.familly.IImageButtonFamilly
getTabIndex, getText, isDisabled, isReadOnly
 
Methods inherited from interface org.rcfaces.core.component.capability.ITextCapability
getText, setText
 
Methods inherited from interface org.rcfaces.core.component.capability.ISelectionEventCapability
addSelectionListener, listSelectionListeners, removeSelectionListener
 
Methods inherited from interface org.rcfaces.core.component.capability.IReadOnlyCapability
isReadOnly, setReadOnly
 
Methods inherited from interface org.rcfaces.core.component.capability.IDisabledCapability
isDisabled, setDisabled
 
Methods inherited from interface org.rcfaces.core.component.capability.ITabIndexCapability
getTabIndex, setTabIndex
 
Methods inherited from interface org.rcfaces.core.component.capability.IImmediateCapability
isImmediate, setImmediate
 
Methods inherited from interface org.rcfaces.core.internal.manager.IContainerManager
getChildCount
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

CAMELIA_ATTRIBUTES

protected static final Set CAMELIA_ATTRIBUTES
Constructor Detail

ImageButtonComponent

public ImageButtonComponent()

ImageButtonComponent

public ImageButtonComponent(String componentId)
Method Detail

getImageAccessors

public IContentAccessors getImageAccessors(FacesContext facesContext)
Specified by:
getImageAccessors in interface IImageButtonFamilly
Specified by:
getImageAccessors in interface org.rcfaces.core.internal.capability.IImageAccessorsCapability

getTextPositionConverter

protected Converter getTextPositionConverter()

setTextPosition

public void setTextPosition(String textPosition)

getImageURL

public String getImageURL()
Description copied from interface: IImageCapability
Returns the URL of the image.

Specified by:
getImageURL in interface IImageCapability

getImageURL

public String getImageURL(FacesContext facesContext)
See getImageURL() for more details

Specified by:
getImageURL in interface IImageButtonFamilly

isImageURLSetted

public final boolean isImageURLSetted()
Returns true if the attribute "imageURL" is set.

Returns:
true if the attribute is set.

setImageURL

public void setImageURL(String imageURL)
Description copied from interface: IImageCapability
Specify the URL of the image.

Specified by:
setImageURL in interface IImageCapability

getDisabledImageURL

public String getDisabledImageURL()
Description copied from interface: IStatesImageCapability
Returns an url string pointing to the image used for the disabled state.

Specified by:
getDisabledImageURL in interface IStatesImageCapability
Returns:
url

getDisabledImageURL

public String getDisabledImageURL(FacesContext facesContext)
See getDisabledImageURL() for more details

Specified by:
getDisabledImageURL in interface IImageButtonFamilly

isDisabledImageURLSetted

public final boolean isDisabledImageURLSetted()
Returns true if the attribute "disabledImageURL" is set.

Returns:
true if the attribute is set.

setDisabledImageURL

public void setDisabledImageURL(String disabledImageURL)
Description copied from interface: IStatesImageCapability
Sets an url string pointing to the image used for the disabled state.

Specified by:
setDisabledImageURL in interface IStatesImageCapability
Parameters:
disabledImageURL - url

getHoverImageURL

public String getHoverImageURL()
Description copied from interface: IStatesImageCapability
Returns an url string pointing to the image used chen the pointer hover the component.

Specified by:
getHoverImageURL in interface IStatesImageCapability
Returns:
url

getHoverImageURL

public String getHoverImageURL(FacesContext facesContext)
See getHoverImageURL() for more details

Specified by:
getHoverImageURL in interface IImageButtonFamilly

isHoverImageURLSetted

public final boolean isHoverImageURLSetted()
Returns true if the attribute "hoverImageURL" is set.

Returns:
true if the attribute is set.

setHoverImageURL

public void setHoverImageURL(String hoverImageURL)
Description copied from interface: IStatesImageCapability
Sets an url string pointing to the image used chen the pointer hover the component.

Specified by:
setHoverImageURL in interface IStatesImageCapability
Parameters:
hoverImageURL - url

getSelectedImageURL

public String getSelectedImageURL()
Description copied from interface: IStatesImageCapability
Returns an url string pointing to the image used when the component is selected.

Specified by:
getSelectedImageURL in interface IStatesImageCapability
Returns:
url

getSelectedImageURL

public String getSelectedImageURL(FacesContext facesContext)
See getSelectedImageURL() for more details

Specified by:
getSelectedImageURL in interface IImageButtonFamilly

isSelectedImageURLSetted

public final boolean isSelectedImageURLSetted()
Returns true if the attribute "selectedImageURL" is set.

Returns:
true if the attribute is set.

setSelectedImageURL

public void setSelectedImageURL(String selectedImageURL)
Description copied from interface: IStatesImageCapability
Sets an url string pointing to the image used when the component is selected.

Specified by:
setSelectedImageURL in interface IStatesImageCapability
Parameters:
selectedImageURL - url

isBorder

public boolean isBorder()
Description copied from interface: IBorderCapability
Returns a boolean value that indicates if the component should show a border or not.

Specified by:
isBorder in interface IBorderCapability
Returns:
border

isBorder

public boolean isBorder(FacesContext facesContext)
See isBorder() for more details

Specified by:
isBorder in interface IImageButtonFamilly

isBorderSetted

public final boolean isBorderSetted()
Returns true if the attribute "border" is set.

Returns:
true if the attribute is set.

setBorder

public void setBorder(boolean border)
Description copied from interface: IBorderCapability
Sets a boolean value that indicates if the component should show a border or not.

Specified by:
setBorder in interface IBorderCapability
Parameters:
border - boolean

getBorderType

public String getBorderType()
Description copied from interface: IBorderTypeCapability
Returns a string that indicates the type of border the component should show.

Specified by:
getBorderType in interface IBorderTypeCapability
Returns:
none|solid|relief|flat|rounded

getBorderType

public String getBorderType(FacesContext facesContext)
See getBorderType() for more details

Specified by:
getBorderType in interface IImageButtonFamilly

isBorderTypeSetted

public final boolean isBorderTypeSetted()
Returns true if the attribute "borderType" is set.

Returns:
true if the attribute is set.

setBorderType

public void setBorderType(String borderType)
Description copied from interface: IBorderTypeCapability
Sets a string that indicates the type of border the component should show.

Specified by:
setBorderType in interface IBorderTypeCapability
Parameters:
borderType - none|solid|relief|flat|rounded

getTextPosition

public int getTextPosition()
Description copied from interface: IHorizontalTextPositionCapability
Returns an int value specifying the position of the text in the component.

Specified by:
getTextPosition in interface IHorizontalTextPositionCapability
Returns:
0x08:right|0x10:left

getTextPosition

public int getTextPosition(FacesContext facesContext)
See getTextPosition() for more details

Specified by:
getTextPosition in interface IImageButtonFamilly

isTextPositionSetted

public final boolean isTextPositionSetted()
Returns true if the attribute "textPosition" is set.

Returns:
true if the attribute is set.

setTextPosition

public void setTextPosition(int textPosition)
Description copied from interface: IHorizontalTextPositionCapability
Sets an int value specifying the position of the text in the component.

Specified by:
setTextPosition in interface IHorizontalTextPositionCapability
Parameters:
textPosition - 0x00:right|0x10:left

getImageHeight

public int getImageHeight()
Description copied from interface: IImageSizeCapability
Returns an int value specifying the height (in pixels) to use for the image shown.

Specified by:
getImageHeight in interface IImageSizeCapability
Returns:
image height in pixels

getImageHeight

public int getImageHeight(FacesContext facesContext)
See getImageHeight() for more details

Specified by:
getImageHeight in interface IImageButtonFamilly

isImageHeightSetted

public final boolean isImageHeightSetted()
Returns true if the attribute "imageHeight" is set.

Returns:
true if the attribute is set.

setImageHeight

public void setImageHeight(int imageHeight)
Description copied from interface: IImageSizeCapability
Sets an int value specifying the height (in pixels) to use for the image shown.

Specified by:
setImageHeight in interface IImageSizeCapability
Parameters:
imageHeight - image height in pixels

getImageWidth

public int getImageWidth()
Description copied from interface: IImageSizeCapability
Returns an int value specifying the width (in pixels) to use for the image shown.

Specified by:
getImageWidth in interface IImageSizeCapability
Returns:
image width in pixels

getImageWidth

public int getImageWidth(FacesContext facesContext)
See getImageWidth() for more details

Specified by:
getImageWidth in interface IImageButtonFamilly

isImageWidthSetted

public final boolean isImageWidthSetted()
Returns true if the attribute "imageWidth" is set.

Returns:
true if the attribute is set.

setImageWidth

public void setImageWidth(int imageWidth)
Description copied from interface: IImageSizeCapability
Sets an int value specifying the width (in pixels) to use for the image shown.

Specified by:
setImageWidth in interface IImageSizeCapability
Parameters:
imageWidth - image width in pixels

getImageAccessors

public IContentAccessors getImageAccessors()
Description copied from interface: IImageCapability
Returns ImageAccessors associated to the url. (or java.awt.Image binding)

Specified by:
getImageAccessors in interface IImageCapability
Returns:
IImageAccessors object.

getCameliaFields

protected Set getCameliaFields()
Overrides:
getCameliaFields in class ButtonComponent


Copyright © 2006-2011 Vedana. All Rights Reserved.