OverviewSingleDeprecated

jsx3.gui

class Button

Object
->jsx3.lang.Object
  ->jsx3.app.Model
    ->jsx3.gui.Painted
      ->jsx3.gui.Block
        ->jsx3.gui.Button

All Implemented Interfaces:

jsx3.gui.Form, jsx3.gui.Interactive, jsx3.util.EventDispatcher

class Button
extends jsx3.gui.Block
Provides a object-oriented interface for a standard command button.

This class publishes the following model events:

Field Summary
static String
DEFAULTBACKGROUNDCOLOR
#e8e8f5
static String
DEFAULTCLASSNAME
jsx30button
static int
DEFAULTHEIGHT
18
static String
DEFAULTHIGHLIGHT
#f6f6ff
static String
DEFAULTSHADOW
#a6a6af
Constructor Summary
void
init(strName : String, intLeft : int, intTop : int, intWidth : int, strText : String)
instance initializer
Method Summary
void
Deprecated. use doExecute() instead
void
Invokes the EXECUTE model event of this button.
int
Sets the validation state for the button and returns the validation state; always returns jsx3.gui.Form.STATEVALID (as buttons can only be valid)
String
Because it implements the jsx3.gui.Form class, the jsx3.gui.Button class implements various form-related methods (validate, getValue, disable, etc); in the case of 'getValue', this method will return the button's text (caption)
static String
Deprecated.
String
Returns the DHTML, used for this object's on-screen view.
Methods Inherited From jsx3.gui.Form
doKeyBinding, doReset, getDisabledBackgroundColor, getDisabledColor, getEnabled, getKeyBinding, getRequired, getValidationState, setDisabledBackgroundColor, setDisabledColor, setEnabled, setKeyBinding, setRequired, setValidationState, setValue
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, getCSSOverride, getClassName, getColor, getCursor, getDimensions, getDisplay, getFontName, getFontSize, getFontWeight, getHeight, getIndex, getLeft, getMargin, getOverflow, getPadding, getRelativePosition, getTagName, getText, getTextAlign, getTip, getTop, getVisibility, getWidth, getZIndex, hideMask, setBackground, setBackgroundColor, setBorder, setCSSOverride, setClassName, setColor, setCursor, setDimensions, setDisplay, setFontName, setFontSize, setFontWeight, setHeight, setIndex, setLeft, setMargin, setOverflow, setPadding, setRelativePosition, setTagName, setText, setTextAlign, setTip, setTop, setVisibility, setWidth, setZIndex, showMask
Methods Inherited From jsx3.gui.Interactive
doEvent, getCanDrag, getCanDrop, getCanMove, getCanSpy, getEvent, getEvents, getMenu, hasEvent, registerHotKey, removeEvent, removeEvents, setCanDrag, setCanDrop, setCanMove, setCanSpy, setEvent, setMenu, setSpyStyles, showSpy
Methods Inherited From jsx3.gui.Painted
focus, getAbsolutePosition, getAttribute, getAttributes, getDynamicProperty, getRendered, insertHTML, onAfterPaint, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, repaint, setAttribute, setDynamicProperty
Methods Inherited From jsx3.app.Model
adoptChild, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, setChild, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Field Detail

DEFAULTBACKGROUNDCOLOR

static String DEFAULTBACKGROUNDCOLOR
#e8e8f5

DEFAULTCLASSNAME

static String DEFAULTCLASSNAME
jsx30button

DEFAULTHEIGHT

static int DEFAULTHEIGHT
18

DEFAULTHIGHLIGHT

static String DEFAULTHIGHLIGHT
#f6f6ff

DEFAULTSHADOW

static String DEFAULTSHADOW
#a6a6af
Constructor Detail

init

void init(strName : String, intLeft : int, intTop : int, intWidth : int, strText : String)
instance initializer

Parameters:

strNameunique name distinguishing this object from all other JSX GUI objects in the JSX application
intLeftleft position (in pixels) of the object relative to its parent container; not required if button is one of: jsx3.gui.Button.SYSTEMOPEN, jsx3.gui.Button.DIALOGCLOSE, jsx3.gui.Button.DIALOGALPHA, jsx3.gui.Button.DIALOGSHADE
intToptop position (in pixels) of the object relative to its parent container; not required if button is one of: jsx3.gui.Button.SYSTEMOPEN, jsx3.gui.Button.DIALOGCLOSE, jsx3.gui.Button.DIALOGALPHA, jsx3.gui.Button.DIALOGSHADE
intWidthwidth (in pixels) of the object; not required if button is one of: jsx3.gui.Button.SYSTEMOPEN, jsx3.gui.Button.DIALOGCLOSE, jsx3.gui.Button.DIALOGALPHA, jsx3.gui.Button.DIALOGSHADE
strTexttext to display in the given button; if null JSXTABLEHEADERCELL.DEFAULTTEXT is used
Method Detail

doClick

void doClick()
Deprecated. use doExecute() instead
call to fire the execute event for the button; fires any bound 'jsxexecute' event (jsx3.gui.Interactive.EXECUTE)

See Also:

doExecute()

doExecute

void doExecute(objEvent : jsx3.gui.Event)
Invokes the EXECUTE model event of this button. Note that because the model event is invoked programmatically rather than by user interaction the objEVENT event parameter will be null if the objEvent parameter is undefined.

Parameters:

objEventthe browser event that caused the execution of this button. This argument is optional and should only be provided if the execute of this button is the result of a browser event. This parameter will be passed along to the model event as objEVENT.

doValidate

int doValidate()
Sets the validation state for the button and returns the validation state; always returns jsx3.gui.Form.STATEVALID (as buttons can only be valid)

Returns:

jsx3.gui.Form.STATEVALID  

Overrides:

doValidate in jsx3.gui.Form

getValue

String getValue()
Because it implements the jsx3.gui.Form class, the jsx3.gui.Button class implements various form-related methods (validate, getValue, disable, etc); in the case of 'getValue', this method will return the button's text (caption)

Returns:

 

Overrides:

getValue in jsx3.gui.Form

getVersion

static String getVersion()
Deprecated.
Returns the release/build for the class (i.e., "2.2.00")

Returns:

 

paint

String paint()
Returns the DHTML, used for this object's on-screen view.

Returns:

DHTML  

Overrides:

paint in jsx3.gui.Block