com.sas.servlet.tbeans
Class BaseButton

com.sas.servlet.tbeans.BaseButton
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, AlternateTextInterface, DisabledImageInterface, com.sas.servlet.tbeans.DisabledImageKeyInterface, EnabledInterface, ImageInterface, com.sas.servlet.tbeans.ImageKeyInterface, ImagePositionInterface, LabelInterface, RenderableInterface, com.sas.servlet.tbeans.ScriptActivatedInterface, com.sas.servlet.tbeans.TitleInterface, TransformationInterface, URLInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable
Direct Known Subclasses:
BaseMenuItem, Button

public abstract class BaseButton
implements AlternateTextInterface, LabelInterface, ImageInterface, com.sas.servlet.tbeans.ImageKeyInterface, DisabledImageInterface, com.sas.servlet.tbeans.DisabledImageKeyInterface, URLInterface, EnabledInterface, ImagePositionInterface, com.sas.servlet.tbeans.TitleInterface, com.sas.servlet.tbeans.ScriptActivatedInterface

The BaseButton is an abstract TransformationBean™ used to create different types of button looks using images and a label.

Note that subclasses of this bean actually provide the markup rendering used in/with Servlet and JavaServer Pages technologies. If you need to add support for a markup language that is not explicitly provided with AppDev Studio, then you must extend this class.

For More Information:

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

See Also:
Serialized Form

Field Summary
static int BOTTOM
          Dynamic button area values - BOTTOM
static int BOTTOM_ALL
          Dynamic button area values - BOTTOM_ALL
static int BOTTOM_LEFT
          Dynamic button area values - BOTTOM_LEFT
static int BOTTOM_RIGHT
          Dynamic button area values - BOTTOM_RIGHT
static int CENTER_ALL
          Dynamic button area values - CENTER_ALL
static java.lang.String DEFAULT_DYNAMIC_BUTTON_ROOT_KEY
           
static java.lang.String DEFAULT_DYNAMIC_BUTTON_ROOT_NAME
           
protected  java.lang.String imageLocation
           
static int LEFT
          Dynamic button area values - LEFT
static int NONE
          Dynamic button area values - NONE
static int RIGHT
          Dynamic button area values - RIGHT
static int TOP
          Dynamic button area values - TOP
static int TOP_ALL
          Dynamic button area values - TOP_ALL
static int TOP_LEFT
          Dynamic button area values - TOP_LEFT
static int TOP_RIGHT
          Dynamic button area values - TOP_RIGHT
 
Constructor Summary
BaseButton()
           
 
Method Summary
 java.lang.String getAccessKey()
          Gets the accesskey.
 java.lang.String getAlternateText()
          Returns the ALT attribute to provide tooltip text when hovering over the image.
 java.lang.String getBottomImage()
          Returns the image displayed on the bottom of the button
 java.lang.String getBottomLeftImage()
          Returns the image displayed on the left bottom side of the button
 java.lang.String getBottomRightImage()
          Returns the image displayed on the bottom right side of the button
 java.lang.String getDisabledAlternateText()
          Returns the ALT attribute to provide tooltip text when hovering over the disabled image.
 java.lang.String getDisabledImage()
          Returns the image displayed on the button when the button is disabled
 int getDynamicButtonArea()
          Returns the dynamicButtonArea
 java.lang.String getDynamicRootName()
          Returns the dynamicRootName name for the button
 int getHeight()
          Gets the height of the Button in pixels.
 int getHeightPercentage()
          Gets the height of the Button as a percentage
 java.lang.String getImage()
          Returns the image displayed on the button
 java.lang.String getImageLocation()
          Returns the image location used for the dynamic button area.
 int getImagePosition()
          Returns the position of the button image set by setImage().
 java.lang.String getLabel()
          Returns the label of the button
 java.lang.String getLeftImage()
          Returns the image displayed on the left side of the button
 java.lang.String getOnBlur()
          Gets the onBlur value.
 java.lang.String getOnClick()
          Gets the onClick value.
 java.lang.String getOnFocus()
          Gets the onFocus value.
 java.lang.String getOnKeyDown()
          Gets the onkeydown value.
 java.lang.String getOnKeyPress()
          Gets the onKeyPress value.
 java.lang.String getOnKeyUp()
          Gets the onkeyup value.
 java.lang.String getOnMouseDown()
          Gets the onMouseDown value.
 java.lang.String getOnMouseOut()
          Gets the onMouseOut value.
 java.lang.String getOnMouseOver()
          Gets the onMouseOver value.
 java.lang.String getOnMouseUp()
          Gets the onmouseup value.
 java.lang.String getRightImage()
          Returns the image displayed on the right side of the button
 java.lang.String getRolloverImage()
          Returns the rollover/mouseOver image of this button
 int getTabIndex()
          Gets the tabindex.
 java.lang.String getTarget()
          getTarget returns the value of the TARGET= argument used on the anchor tags generated.
 java.lang.String getTitle()
          Gets the title of the href.
 java.lang.String getTopImage()
          Returns the image displayed on the top of the button
 java.lang.String getTopLeftImage()
          Returns the image displayed on the top left side of the button
 java.lang.String getTopRightImage()
          Returns the image displayed on the top right side of the button
 java.lang.String getURL()
          Returns the url associated with the button
 int getWidth()
          Gets the width of the Button in pixels.
 int getWidthPercentage()
          Gets the width of the Button as a percentage
 boolean isActive()
          Returns the status of the button.
 boolean isEnabled()
          Returns the enabled state of the button.
 boolean isFocused()
          Returns the focus state of the button
 boolean isVerifyEnabled()
          Returns a boolean value indicating that the additional verification flag is turned on.
 boolean isWrapped()
          Returns whether the label is wrapped or not.
 void setAccessKey(java.lang.String value)
          Sets the accesskey.
 void setActive(boolean value)
          Sets the status of the button.
 void setAlternateText(java.lang.String value)
          Sets the ALT attribute to provide tooltip text
 void setBottomImage(java.lang.String image)
          Sets the image displayed on the bottom of the button
 void setBottomLeftImage(java.lang.String image)
          Sets the image displayed on the bottom left side of the button
 void setBottomRightImage(java.lang.String image)
          Sets the image displayed on the bottom right side of the button
 void setDisabledAlternateText(java.lang.String value)
          Sets the ALT attribute to provide tooltip text when hovering over the disabled image
 void setDisabledImage(java.lang.String image)
          Sets the image displayed in the button when the button is in disabled state
 void setDynamicButtonArea(int area)
          If dynamicButtonArea is not NONE, the images and styles of the button will be updated based on the state of the button.
 void setDynamicRootName(java.lang.String value)
          The dynamicRootName is the used as a prefix for the nine images used in this button when rollover the button or when the button is disabled dynamically.
 void setEnabled(boolean enabled)
          Sets the enable state of the button
 void setFocus(boolean value)
          Sets the focus state of the Button.
 void setHeight(int value)
          Sets the height of the Button in pixels.
 void setHeightPercentage(int value)
          Sets the height of the Button as a percentage
 void setImage(java.lang.String image)
          Sets the image displayed in the button
 void setImage(java.lang.String image, int width, int height)
          Sets the image displayed on the button
 void setImageLocation(java.lang.String value)
          The image location used for a dynamic button (dynamicButtonArea is not NONE).
 void setImagePosition(int position)
          Sets the image position of the image set by setImage
 void setLabel(java.lang.String label)
          Sets the label of the button
 void setLeftImage(java.lang.String image)
          Sets the image displayed on the left side of the button
 void setOnBlur(java.lang.String onblur)
          Sets the onBlur event value.
 void setOnClick(java.lang.String onclick)
          Sets the onClick event value.
 void setOnFocus(java.lang.String onfocus)
          Sets the onFocus event value.
 void setOnKeyDown(java.lang.String onkeydown)
          Sets the onKeyDown value
 void setOnKeyPress(java.lang.String onkeypress)
          Sets the onKeyPress value
 void setOnKeyUp(java.lang.String onkeyup)
          Sets the onKeyUp value
 void setOnMouseDown(java.lang.String mousedown)
          Sets the onmouseDown event value.
 void setOnMouseOut(java.lang.String mouseout)
          Sets the onMouseOut event value.
 void setOnMouseOver(java.lang.String mouseover)
          Sets the onMouseOver event value for the button
 void setOnMouseUp(java.lang.String mouseup)
          Sets the onmouseup event value.
 void setRightImage(java.lang.String image)
          Sets the image displayed on the right side of the button
 void setRolloverImage(java.lang.String image)
          Sets the rollover image for this image.
 void setTabIndex(int value)
          Sets the tabindex.
 void setTarget(java.lang.String value)
          Sets the value of the TARGET= argument used on the anchor tags generated.
 void setTitle(java.lang.String value)
          Sets the title for the href.
 void setTopImage(java.lang.String image)
          Sets the image displayed on the top of the button
 void setTopLeftImage(java.lang.String image)
          Sets the image displayed on the top left side of the button
 void setTopRightImage(java.lang.String image)
          Sets the image displayed on the top right side of the button
 void setURL(java.lang.String url)
          Sets the url associated with the button
 void setVerifyEnabled(boolean value)
          Sets a flag indicating that additional verification is needed to determine if the button is in disabled or enabled state.
 void setWidth(int value)
          Sets the width of the Button in pixels.
 void setWidthPercentage(int value)
          Sets the width of the Button as a percentage
 void setWrap(boolean wrap)
          Sets true or false to determine whether the label in the <td> tag is wrapped.
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCleanUpResourcesOn, setCustomAttributes, setDescription, setId, setInputTransform, setLocale, setLocaleDependentProperties, setName, setObjectData, setObjectDataProperty, setOutputTransform, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, toString, write, write, write, write
 

Field Detail

imageLocation

protected java.lang.String imageLocation

DEFAULT_DYNAMIC_BUTTON_ROOT_KEY

public static final java.lang.String DEFAULT_DYNAMIC_BUTTON_ROOT_KEY
See Also:
Constant Field Values

DEFAULT_DYNAMIC_BUTTON_ROOT_NAME

public static final java.lang.String DEFAULT_DYNAMIC_BUTTON_ROOT_NAME
See Also:
Constant Field Values

NONE

public static final int NONE
Dynamic button area values - NONE

See Also:
Constant Field Values

TOP_RIGHT

public static final int TOP_RIGHT
Dynamic button area values - TOP_RIGHT

See Also:
Constant Field Values

TOP

public static final int TOP
Dynamic button area values - TOP

See Also:
Constant Field Values

TOP_LEFT

public static final int TOP_LEFT
Dynamic button area values - TOP_LEFT

See Also:
Constant Field Values

LEFT

public static final int LEFT
Dynamic button area values - LEFT

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
Dynamic button area values - RIGHT

See Also:
Constant Field Values

BOTTOM_LEFT

public static final int BOTTOM_LEFT
Dynamic button area values - BOTTOM_LEFT

See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
Dynamic button area values - BOTTOM

See Also:
Constant Field Values

BOTTOM_RIGHT

public static final int BOTTOM_RIGHT
Dynamic button area values - BOTTOM_RIGHT

See Also:
Constant Field Values

TOP_ALL

public static final int TOP_ALL
Dynamic button area values - TOP_ALL

See Also:
Constant Field Values

BOTTOM_ALL

public static final int BOTTOM_ALL
Dynamic button area values - BOTTOM_ALL

See Also:
Constant Field Values

CENTER_ALL

public static final int CENTER_ALL
Dynamic button area values - CENTER_ALL

See Also:
Constant Field Values
Constructor Detail

BaseButton

public BaseButton()
Method Detail

setImage

public void setImage(java.lang.String image,
                     int width,
                     int height)
Sets the image displayed on the button

Parameters:
image - the name of the image
width - the width of the image
height - the height of the image
See Also:
getImage()

setLeftImage

public void setLeftImage(java.lang.String image)
Sets the image displayed on the left side of the button

Parameters:
image - the name of the image
See Also:
getLeftImage()

getLeftImage

public java.lang.String getLeftImage()
Returns the image displayed on the left side of the button

Returns:
the name of the image displayed on the left side of the button
See Also:
setLeftImage(String)

setRightImage

public void setRightImage(java.lang.String image)
Sets the image displayed on the right side of the button

Parameters:
image - the name of the image
See Also:
getRightImage()

getRightImage

public java.lang.String getRightImage()
Returns the image displayed on the right side of the button

Returns:
the name of the image displayed on the right side of the button
See Also:
setRightImage(String)

setTopLeftImage

public void setTopLeftImage(java.lang.String image)
Sets the image displayed on the top left side of the button

Parameters:
image - the name of the image
See Also:
getTopLeftImage()

getTopLeftImage

public java.lang.String getTopLeftImage()
Returns the image displayed on the top left side of the button

Returns:
image of the top left side
See Also:
setTopLeftImage(String)

setTopRightImage

public void setTopRightImage(java.lang.String image)
Sets the image displayed on the top right side of the button

Parameters:
image - the name of the image
See Also:
getTopRightImage()

getTopRightImage

public java.lang.String getTopRightImage()
Returns the image displayed on the top right side of the button

Returns:
image of the top right side
See Also:
setTopRightImage(String)

setBottomLeftImage

public void setBottomLeftImage(java.lang.String image)
Sets the image displayed on the bottom left side of the button

Parameters:
image - the name of the image
See Also:
getBottomLeftImage()

getBottomLeftImage

public java.lang.String getBottomLeftImage()
Returns the image displayed on the left bottom side of the button

Returns:
image of the bottom left side
See Also:
setBottomLeftImage(String)

setBottomRightImage

public void setBottomRightImage(java.lang.String image)
Sets the image displayed on the bottom right side of the button

Parameters:
image - the name of the image
See Also:
getBottomRightImage()

getBottomRightImage

public java.lang.String getBottomRightImage()
Returns the image displayed on the bottom right side of the button

Returns:
image of the top left side
See Also:
setBottomRightImage(String)

setTopImage

public void setTopImage(java.lang.String image)
Sets the image displayed on the top of the button

Parameters:
image - the name of the image
See Also:
getTopImage()

getTopImage

public java.lang.String getTopImage()
Returns the image displayed on the top of the button

Returns:
the top image of the button
See Also:
setTopImage(String)

setBottomImage

public void setBottomImage(java.lang.String image)
Sets the image displayed on the bottom of the button

Parameters:
image - the name of the image
See Also:
getBottomImage()

getBottomImage

public java.lang.String getBottomImage()
Returns the image displayed on the bottom of the button

Returns:
the bottom image of the button
See Also:
setBottomImage(String)

setOnMouseOver

public void setOnMouseOver(java.lang.String mouseover)
Sets the onMouseOver event value for the button

Parameters:
mouseover - The onMouseOver value
See Also:
getOnMouseOver()

getOnMouseOver

public java.lang.String getOnMouseOver()
Gets the onMouseOver value.

Returns:
onMouseOver value The onMouseOver

setOnMouseOut

public void setOnMouseOut(java.lang.String mouseout)
Sets the onMouseOut event value.

Parameters:
mouseout - The onMouseOut value

getOnMouseOut

public java.lang.String getOnMouseOut()
Gets the onMouseOut value.

Returns:
onMouseOut value The onMouseOut

setOnClick

public void setOnClick(java.lang.String onclick)
Sets the onClick event value.

Parameters:
onclick - The onClick value

getOnClick

public java.lang.String getOnClick()
Gets the onClick value.

Returns:
onClick value

setOnKeyPress

public void setOnKeyPress(java.lang.String onkeypress)
Sets the onKeyPress value

Parameters:
onkeypress - The onKeyPressValue

getOnKeyPress

public java.lang.String getOnKeyPress()
Gets the onKeyPress value.

Returns:
onKeyPress value

setOnBlur

public void setOnBlur(java.lang.String onblur)
Sets the onBlur event value.

Parameters:
value - The onBlur value

getOnBlur

public java.lang.String getOnBlur()
Gets the onBlur value.

Returns:
onBlur value The onBlur

setOnFocus

public void setOnFocus(java.lang.String onfocus)
Sets the onFocus event value.

Parameters:
value - The onFocus value

getOnFocus

public java.lang.String getOnFocus()
Gets the onFocus value.

Returns:
onFocus value The onFocus

setOnMouseDown

public void setOnMouseDown(java.lang.String mousedown)
Sets the onmouseDown event value.

Parameters:
value - The onMouseDown value

getOnMouseDown

public java.lang.String getOnMouseDown()
Gets the onMouseDown value.

Returns:
onMouseDown value The onFocus

setOnMouseUp

public void setOnMouseUp(java.lang.String mouseup)
Sets the onmouseup event value.

Parameters:
value - The onMouseDown value

getOnMouseUp

public java.lang.String getOnMouseUp()
Gets the onmouseup value.

Returns:
onMouseUp value The onFocus

setOnKeyDown

public void setOnKeyDown(java.lang.String onkeydown)
Sets the onKeyDown value

Parameters:
onkeypress - The onKeyDown

getOnKeyDown

public java.lang.String getOnKeyDown()
Gets the onkeydown value.

Returns:
onkeydown value

setOnKeyUp

public void setOnKeyUp(java.lang.String onkeyup)
Sets the onKeyUp value

Parameters:
onkeyup - The onKeyUp value

getOnKeyUp

public java.lang.String getOnKeyUp()
Gets the onkeyup value.

Returns:
onkeyup value

setLabel

public void setLabel(java.lang.String label)
Sets the label of the button

Specified by:
setLabel in interface LabelInterface
Parameters:
label - the label of the button

getLabel

public java.lang.String getLabel()
Returns the label of the button

Specified by:
getLabel in interface LabelInterface
Returns:
the label

setWidth

public void setWidth(int value)
Sets the width of the Button in pixels. If the button is not a dynamic button, the width will be set as in-line style on the BUTTON tag.

Parameters:
value - The width in pixels

getWidth

public int getWidth()
Gets the width of the Button in pixels.

Returns:
The width in pixels

setWidthPercentage

public void setWidthPercentage(int value)
Sets the width of the Button as a percentage

Parameters:
value - The width as a percentage

getWidthPercentage

public int getWidthPercentage()
Gets the width of the Button as a percentage

Returns:
The width as a percentage

setHeight

public void setHeight(int value)
Sets the height of the Button in pixels. If the button is not a dynamic button, the height will be set as in-line style on the BUTTON tag.

Parameters:
value - The height in pixels

getHeight

public int getHeight()
Gets the height of the Button in pixels.

Returns:
The height in pixels

setHeightPercentage

public void setHeightPercentage(int value)
Sets the height of the Button as a percentage

Parameters:
value - The height as a percentage

getHeightPercentage

public int getHeightPercentage()
Gets the height of the Button as a percentage

Returns:
The height as a percentage

getURL

public java.lang.String getURL()
Returns the url associated with the button

Specified by:
getURL in interface URLInterface
Returns:
the url associated with the button

setURL

public void setURL(java.lang.String url)
Sets the url associated with the button

Specified by:
setURL in interface URLInterface
Parameters:
url - the url associated with the button

getTarget

public java.lang.String getTarget()
getTarget returns the value of the TARGET= argument used on the anchor tags generated.

Returns:
TARGET= argument of the anchor tags

setTarget

public void setTarget(java.lang.String value)
Sets the value of the TARGET= argument used on the anchor tags generated.

Parameters:
value - The value of the TARGET= argument on the anchor tag

setTabIndex

public void setTabIndex(int value)
Sets the tabindex.

Parameters:
tabindex - The FormElement tabindex

getTabIndex

public int getTabIndex()
Gets the tabindex.

Returns:
tabindex The tabindex

setAccessKey

public void setAccessKey(java.lang.String value)
Sets the accesskey.

Parameters:
accesskey - The accesskey

getAccessKey

public java.lang.String getAccessKey()
Gets the accesskey.

Returns:
accesskey The accesskey

setTitle

public void setTitle(java.lang.String value)
Sets the title for the href.

Specified by:
setTitle in interface com.sas.servlet.tbeans.TitleInterface
Parameters:
value - The title of the href

getTitle

public java.lang.String getTitle()
Gets the title of the href.

Returns:
accesskey The title

getImage

public java.lang.String getImage()
Returns the image displayed on the button

Specified by:
getImage in interface ImageInterface
Returns:
image displayed on the button

setImage

public void setImage(java.lang.String image)
Sets the image displayed in the button

Specified by:
setImage in interface ImageInterface
Parameters:
image - image displayed in the button

isWrapped

public boolean isWrapped()
Returns whether the label is wrapped or not.

Returns:
true if the label is wrapped; false otherwise

setRolloverImage

public void setRolloverImage(java.lang.String image)
Sets the rollover image for this image.

Parameters:
image - image displayed when mouseover this button

getRolloverImage

public java.lang.String getRolloverImage()
Returns the rollover/mouseOver image of this button

Returns:
the rollover image of this button

setWrap

public void setWrap(boolean wrap)
Sets true or false to determine whether the label in the <td> tag is wrapped.

Parameters:
wrap - true if label is wrapped; false otherwise

getImagePosition

public int getImagePosition()
Returns the position of the button image set by setImage(). imagePosition can be BaseButton.RIGHT or BaseButton.LEFT.

Specified by:
getImagePosition in interface ImagePositionInterface
Returns:
the image position
See Also:
setImagePosition(int)

setImagePosition

public void setImagePosition(int position)
Sets the image position of the image set by setImage

Specified by:
setImagePosition in interface ImagePositionInterface
Parameters:
position - of the image
See Also:
getImagePosition()

isEnabled

public boolean isEnabled()
Returns the enabled state of the button.

Specified by:
isEnabled in interface EnabledInterface
Returns:
the enabled state of the button - true means enabled
See Also:
setEnabled(boolean)

setEnabled

public void setEnabled(boolean enabled)
Sets the enable state of the button

Specified by:
setEnabled in interface EnabledInterface
Parameters:
enable - state of the button
See Also:
isEnabled()

getAlternateText

public java.lang.String getAlternateText()
Returns the ALT attribute to provide tooltip text when hovering over the image.

Specified by:
getAlternateText in interface AlternateTextInterface
Returns:
The alternate text of the image
See Also:
setAlternateText(String)

setAlternateText

public void setAlternateText(java.lang.String value)
Sets the ALT attribute to provide tooltip text

Specified by:
setAlternateText in interface AlternateTextInterface
Parameters:
value - The text that provides tooltip when hovering over the image.
See Also:
getAlternateText()

getDisabledImage

public java.lang.String getDisabledImage()
Returns the image displayed on the button when the button is disabled

Specified by:
getDisabledImage in interface DisabledImageInterface
Returns:
image displayed on the button
See Also:
setDisabledImage(String)

setDisabledImage

public void setDisabledImage(java.lang.String image)
Sets the image displayed in the button when the button is in disabled state

Specified by:
setDisabledImage in interface DisabledImageInterface
Parameters:
image - image displayed in the button
See Also:
getDisabledImage()

getDisabledAlternateText

public java.lang.String getDisabledAlternateText()
Returns the ALT attribute to provide tooltip text when hovering over the disabled image.

Returns:
The alternate text of the image

setDisabledAlternateText

public void setDisabledAlternateText(java.lang.String value)
Sets the ALT attribute to provide tooltip text when hovering over the disabled image

Parameters:
value - The text that provides tooltip when hovering over the image.
See Also:
getDisabledAlternateText(), setAlternateText(String), getAlternateText()

setFocus

public void setFocus(boolean value)
Sets the focus state of the Button. If there are multiple buttons on a page, the focus will be on the last button

Parameters:
value - the focus state of the button
See Also:
isFocused()

isFocused

public boolean isFocused()
Returns the focus state of the button

Returns:
true or false - the focus state of the button
See Also:
setFocus(boolean)

setVerifyEnabled

public void setVerifyEnabled(boolean value)
Sets a flag indicating that additional verification is needed to determine if the button is in disabled or enabled state.

Parameters:
value - true or false
See Also:
isVerifyEnabled()

isVerifyEnabled

public boolean isVerifyEnabled()
Returns a boolean value indicating that the additional verification flag is turned on. If true, a JavaScript function sas_Button_setState('button',true/false) will be called. The method adds a setEnabled JavaScript function which will then be checked before calling the onClick, onMouseOver, etc.. functions.

Returns:
true or false
See Also:
setVerifyEnabled(boolean)

setDynamicRootName

public void setDynamicRootName(java.lang.String value)
The dynamicRootName is the used as a prefix for the nine images used in this button when rollover the button or when the button is disabled dynamically. For instance, if image root is button, on rollover, the left image will be set to button_left_rollover.gif and when the button is disabled, it'll be set to button_left_disabled.gif

Parameters:
value - The image root value
See Also:
getDynamicRootName()

getDynamicRootName

public java.lang.String getDynamicRootName()
Returns the dynamicRootName name for the button

Returns:
the dynamicRootName name
See Also:
setDynamicRootName(String)

setImageLocation

public void setImageLocation(java.lang.String value)
The image location used for a dynamic button (dynamicButtonArea is not NONE). This location will be used for the images that made up the button's borders and background (topImage, bottomImage, topRightImage, etc..). The imageLocation will not be honored for the center button image set via setImage().

Parameters:
value - The imageLocation value
See Also:
getImageLocation()

getImageLocation

public java.lang.String getImageLocation()
Returns the image location used for the dynamic button area.

Returns:
imageLocation
See Also:
setImageLocation(String)

setDynamicButtonArea

public void setDynamicButtonArea(int area)
If dynamicButtonArea is not NONE, the images and styles of the button will be updated based on the state of the button. The naming conventions for the button images should be as follows:
<imageLocation><dynamicRootName>_<position>_<state>.gif
Where imageLocation is set by setImageLocation(). The default is /images.
dynamicRootName is set by setDynamicRootName. The default is button. position is Left,Right,TopLeft,TopRight,Top,BottomLeft,BottomRight or BottomLeft.
state is (empty) for the default/enabled button, 'rollover', 'active' or 'disabled'.
Valid area values are:
Button.LEFT, RIGHT, TOP_LEFT, TOP_RIGHT, TOP, BOTTOM_LEFT, BOTTOM_RIGHT, BOTTOM, BOTTOM_ALL (makes all the bottom images active), TOP_ALL and/or CENTER_ALL

Parameters:
area - the area of the button to be change dynamically when rollover, disabled and enabled.
See Also:
getDynamicButtonArea()

getDynamicButtonArea

public int getDynamicButtonArea()
Returns the dynamicButtonArea

Returns:
dynamicButtonArea
See Also:
setDynamicButtonArea(int)

setActive

public void setActive(boolean value)
Sets the status of the button. If button is active, the BUTTON_CENTER_ACTIVE style specified on the styleMap will be used.

Parameters:
value - true if button is active, false otherwise
See Also:
isActive()

isActive

public boolean isActive()
Returns the status of the button.

Returns:
boolean value indicating whether the button is active or not.
See Also:
setActive(boolean)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.