|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.BaseButton
public abstract class BaseButton
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 .
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. |
Field Detail |
---|
protected java.lang.String imageLocation
public static final java.lang.String DEFAULT_DYNAMIC_BUTTON_ROOT_KEY
public static final java.lang.String DEFAULT_DYNAMIC_BUTTON_ROOT_NAME
public static final int NONE
public static final int TOP_RIGHT
public static final int TOP
public static final int TOP_LEFT
public static final int LEFT
public static final int RIGHT
public static final int BOTTOM_LEFT
public static final int BOTTOM
public static final int BOTTOM_RIGHT
public static final int TOP_ALL
public static final int BOTTOM_ALL
public static final int CENTER_ALL
Constructor Detail |
---|
public BaseButton()
Method Detail |
---|
public void setImage(java.lang.String image, int width, int height)
image
- the name of the imagewidth
- the width of the imageheight
- the height of the imagegetImage()
public void setLeftImage(java.lang.String image)
image
- the name of the imagegetLeftImage()
public java.lang.String getLeftImage()
setLeftImage(String)
public void setRightImage(java.lang.String image)
image
- the name of the imagegetRightImage()
public java.lang.String getRightImage()
setRightImage(String)
public void setTopLeftImage(java.lang.String image)
image
- the name of the imagegetTopLeftImage()
public java.lang.String getTopLeftImage()
setTopLeftImage(String)
public void setTopRightImage(java.lang.String image)
image
- the name of the imagegetTopRightImage()
public java.lang.String getTopRightImage()
setTopRightImage(String)
public void setBottomLeftImage(java.lang.String image)
image
- the name of the imagegetBottomLeftImage()
public java.lang.String getBottomLeftImage()
setBottomLeftImage(String)
public void setBottomRightImage(java.lang.String image)
image
- the name of the imagegetBottomRightImage()
public java.lang.String getBottomRightImage()
setBottomRightImage(String)
public void setTopImage(java.lang.String image)
image
- the name of the imagegetTopImage()
public java.lang.String getTopImage()
setTopImage(String)
public void setBottomImage(java.lang.String image)
image
- the name of the imagegetBottomImage()
public java.lang.String getBottomImage()
setBottomImage(String)
public void setOnMouseOver(java.lang.String mouseover)
mouseover
- The onMouseOver valuegetOnMouseOver()
public java.lang.String getOnMouseOver()
public void setOnMouseOut(java.lang.String mouseout)
mouseout
- The onMouseOut valuepublic java.lang.String getOnMouseOut()
public void setOnClick(java.lang.String onclick)
onclick
- The onClick valuepublic java.lang.String getOnClick()
public void setOnKeyPress(java.lang.String onkeypress)
onkeypress
- The onKeyPressValuepublic java.lang.String getOnKeyPress()
public void setOnBlur(java.lang.String onblur)
value
- The onBlur valuepublic java.lang.String getOnBlur()
public void setOnFocus(java.lang.String onfocus)
value
- The onFocus valuepublic java.lang.String getOnFocus()
public void setOnMouseDown(java.lang.String mousedown)
value
- The onMouseDown valuepublic java.lang.String getOnMouseDown()
public void setOnMouseUp(java.lang.String mouseup)
value
- The onMouseDown valuepublic java.lang.String getOnMouseUp()
public void setOnKeyDown(java.lang.String onkeydown)
onkeypress
- The onKeyDownpublic java.lang.String getOnKeyDown()
public void setOnKeyUp(java.lang.String onkeyup)
onkeyup
- The onKeyUp valuepublic java.lang.String getOnKeyUp()
public void setLabel(java.lang.String label)
setLabel
in interface LabelInterface
label
- the label of the buttonpublic java.lang.String getLabel()
getLabel
in interface LabelInterface
public void setWidth(int value)
value
- The width in pixelspublic int getWidth()
public void setWidthPercentage(int value)
value
- The width as a percentagepublic int getWidthPercentage()
public void setHeight(int value)
value
- The height in pixelspublic int getHeight()
public void setHeightPercentage(int value)
value
- The height as a percentagepublic int getHeightPercentage()
public java.lang.String getURL()
getURL
in interface URLInterface
public void setURL(java.lang.String url)
setURL
in interface URLInterface
url
- the url associated with the buttonpublic java.lang.String getTarget()
public void setTarget(java.lang.String value)
value
- The value of the TARGET= argument on the anchor tagpublic void setTabIndex(int value)
tabindex
- The FormElement tabindexpublic int getTabIndex()
public void setAccessKey(java.lang.String value)
accesskey
- The accesskeypublic java.lang.String getAccessKey()
public void setTitle(java.lang.String value)
setTitle
in interface com.sas.servlet.tbeans.TitleInterface
value
- The title of the hrefpublic java.lang.String getTitle()
public java.lang.String getImage()
getImage
in interface ImageInterface
public void setImage(java.lang.String image)
setImage
in interface ImageInterface
image
- image displayed in the buttonpublic boolean isWrapped()
public void setRolloverImage(java.lang.String image)
image
- image displayed when mouseover this buttonpublic java.lang.String getRolloverImage()
public void setWrap(boolean wrap)
wrap
- true if label is wrapped; false otherwisepublic int getImagePosition()
getImagePosition
in interface ImagePositionInterface
setImagePosition(int)
public void setImagePosition(int position)
setImagePosition
in interface ImagePositionInterface
position
- of the imagegetImagePosition()
public boolean isEnabled()
isEnabled
in interface EnabledInterface
setEnabled(boolean)
public void setEnabled(boolean enabled)
setEnabled
in interface EnabledInterface
enable
- state of the buttonisEnabled()
public java.lang.String getAlternateText()
getAlternateText
in interface AlternateTextInterface
setAlternateText(String)
public void setAlternateText(java.lang.String value)
setAlternateText
in interface AlternateTextInterface
value
- The text that provides tooltip when hovering over the image.getAlternateText()
public java.lang.String getDisabledImage()
getDisabledImage
in interface DisabledImageInterface
setDisabledImage(String)
public void setDisabledImage(java.lang.String image)
setDisabledImage
in interface DisabledImageInterface
image
- image displayed in the buttongetDisabledImage()
public java.lang.String getDisabledAlternateText()
public void setDisabledAlternateText(java.lang.String value)
value
- The text that provides tooltip when hovering over the image.getDisabledAlternateText()
,
setAlternateText(String)
,
getAlternateText()
public void setFocus(boolean value)
value
- the focus state of the buttonisFocused()
public boolean isFocused()
setFocus(boolean)
public void setVerifyEnabled(boolean value)
value
- true or falseisVerifyEnabled()
public boolean isVerifyEnabled()
setVerifyEnabled(boolean)
public void setDynamicRootName(java.lang.String value)
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
value
- The image root valuegetDynamicRootName()
public java.lang.String getDynamicRootName()
setDynamicRootName(String)
public void setImageLocation(java.lang.String value)
value
- The imageLocation valuegetImageLocation()
public java.lang.String getImageLocation()
setImageLocation(String)
public void setDynamicButtonArea(int area)
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
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'.
area
- the area of the button to be change dynamically when rollover, disabled and enabled.getDynamicButtonArea()
public int getDynamicButtonArea()
setDynamicButtonArea(int)
public void setActive(boolean value)
value
- true if button is active, false otherwiseisActive()
public boolean isActive()
setActive(boolean)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |