All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.servlet.tbeans.html
Class Button

    com.sas.servlet.tbeans.html.Button

All Implemented Interfaces:
  com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, AlternateTextInterface, ComplexStyleInterface, DisabledImageInterface, com.sas.servlet.tbeans.DisabledImageKeyInterface, EnabledInterface, ButtonStyleAreaKeysInterface, 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

    @SASScope(value="ALL")
    public class Button

implements ButtonStyleAreaKeysInterface, ComplexStyleInterface

The Button is a TransformationBean™ that generates the appropriate HTML 4.0 and JavaScript for a button look by setting images and a label. topLeftImage, topRightImage, bottomLeftImage, etc.. may be set to give the button different looks. The actions of the buttons may be specified using the onClick or onKeyPress events. Default Buttom style classes:

buttonTopLeft | buttonTop | buttonTopRight
buttonLeft | button | buttonRight
buttonBottomLeft | buttonBottom | buttonBottomRight

Button Images:

topLeftImage | topImage | topRightImage
leftImage | image | rightImage
bottomLeftImage | bottomImage | bottomRightImage

IDs used inside for images and label

button_tl | button_t | button_tr
button_l | button_img (and button_label for the span tag that's wrapping the label) | button_r
button_bl | button_b | button_br

The Button is one of several TransformationBeans™ that rely on a set of style classes that are used by default when generating the resulting markup language. For more information on style sheets and the default style classes that apply to this TransformationBean™, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Cascading Style Sheets, Images, and TransformationBeans™ as well as the TransformationBeans™ Style Sheet Reference.

The Button is one of several TransformationBeans™ that rely on JavaScript to provide some of its functionality. These JavaScript files are including automatically by the tbean. See JavaScriptIncludeHandler for more information about how these files are included and how to customize this behavior. The Button uses the following JavaScript files:

  sas_Button.js

For More Information:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Examples for this class may be found on the Examples Site.

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:
  `BaseButton`, Serialized Form

Field Summary
`static int` | `ANCHOR`
`static int` | `BUTTON`

Fields inherited from class com.sas.servlet.tbeans.BaseButton
`BOTTOM, BOTTOM_ALL, BOTTOM_LEFT, BOTTOM_RIGHT, CENTER_ALL, DEFAULT_DYNAMIC_BUTTON_ROOT_KEY, DEFAULT_DYNAMIC_BUTTON_ROOT_NAME, imageLocation, LEFT, NONE, RIGHT, TOP, TOP_ALL, TOP_LEFT, TOP_RIGHT`

Fields inherited from interface com.sas.servlet.tbeans.html.ButtonStyleAreaKeysInterface
`BUTTON_BOTTOM, BUTTON_BOTTOM_LEFT, BUTTON_BOTTOM_RIGHT, BUTTON_CENTER, BUTTON_CENTER_ACTIVE, BUTTON_CENTER_DISABLED, BUTTON_CONTAINER, BUTTON_LEFT, BUTTON_RIGHT, BUTTON_ROLLOVER_STYLE, BUTTON_STYLE, BUTTON_TOP, BUTTON_TOP_LEFT, BUTTON_TOP_RIGHT`

Constructor Summary
`Button()` Constructor of the button
`Button(java.lang.String label)` Constructor of the button
`Button(java.lang.String label, java.lang.String image)` Constructor of the button

Method Summary
`java.lang.StringBuffer` | `getButtonProperties()` Returns all the JavaScript function names set on the button which will be generated on on the <table> tag.
`int` | `getButtonType()` Returns the valid button type used for this button.
`java.util.Map` | `getStyleMap()` Returns the style map for this button.
`void` | `setButtonType(int type)` Sets the type of the button.
`void` | `write(java.io.PrintWriter out)` Writes the Button

Methods inherited from class com.sas.servlet.tbeans.BaseButton
`getAccessKey, getAlternateText, getBottomImage, getBottomLeftImage, getBottomRightImage, getDisabledAlternateText, getDisabledImage, getDynamicButtonArea, getDynamicRootName, getHeight, getHeightPercentage, getImage, getImageLocation, getImagePosition, getLabel, getLeftImage, getOnBlur, getOnClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseOut, getOnMouseOver, getOnMouseUp, getRightImage, getRolloverImage, getTabIndex, getTarget, getTitle, getTopImage, getTopLeftImage, getTopRightImage, getURL, getWidth, getWidthPercentage, isActive, isEnabled, isFocused, isVerifyEnabled, isWrapped, setAccessKey, setActive, setAlternateText, setBottomImage, setBottomLeftImage, setBottomRightImage, setDisabledAlternateText, setDisabledImage, setDynamicButtonArea, setDynamicRootName, setEnabled, setFocus, setHeight, setHeightPercentage, setImage, setImage, setImageLocation, setImagePosition, setLabel, setLeftImage, setOnBlur, setOnClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseOut, setOnMouseOver, setOnMouseUp, setRightImage, setRolloverImage, setTabIndex, setTarget, setTitle, setTopImage, setTopLeftImage, setTopRightImage, setURL, setVerifyEnabled, setWidth, setWidthPercentage, setWrap`

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`

Field Detail

### BUTTON

    public static final int BUTTON

See Also:
  Constant Field Values

### ANCHOR

    public static final int ANCHOR

See Also:
  Constant Field Values

Constructor Detail

### Button

    public Button()

  Constructor of the button

### Button

    public Button(java.lang.String label)

  Constructor of the button

  Parameters:
    `label` - label of the button

### Button

    public Button(java.lang.String label,
                  java.lang.String image)

  Constructor of the button

  Parameters:
    `label` - label of the button
    `image` - image of the button

Method Detail

### write

    public void write(java.io.PrintWriter out)
               throws java.io.IOException

  Writes the Button

  Specified by:
    `write` in interface `TransformationInterface`
  Specified by:
    `write` in interface `com.sas.util.WriteToPrintWriterInterface`
  Overrides:
    `write` in class `BaseTransformation`
  Parameters:
    `out` - The output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### getButtonProperties

    public java.lang.StringBuffer getButtonProperties()

  Returns all the JavaScript function names set on the button which will be generated on on the <table> tag.

### setButtonType

    public void setButtonType(int type)

  Sets the type of the button. buttonType is used to determine weather to use the <button> or <a> tag. Valid values are Button.ANCHOR and Button.BUTTON

  Parameters:
    `type` - the button type
  See Also:
    `getButtonType()`

### getButtonType

    public int getButtonType()

  Returns the valid button type used for this button.

  Returns:
    button type
  See Also:
    `setButtonType(int)`

### getStyleMap

    public java.util.Map getStyleMap()

  Returns the style map for this button.

  STYLE KEY | DEFAULT STYLE
  BUTTON_CONTAINER | buttonContainer
  BUTTON_TOP | buttonTop
  BUTTON_TOP_RIGHT | buttonTopRight
  BUTTON_TOP_LEFT | buttonTopLeft
  BUTTON_BOTTOM | buttonBottom
  BUTTON_BOTTOM_RIGHT | buttonBottomRight
  BUTTON_BOTTOM_LEFT | buttonBottomLeft
  BUTTON_CENTER | button
  BUTTON_CENTER_DISABLED | buttonDisabled

  Specified by:
    `getStyleMap` in interface `ComplexStyleInterface`
  Returns:
    styles used for this Button

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.