Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IlvButton

IlvObject
   |
   +--IlvEmptyView
      |
      +--IlvButton

Category:
Common component
JavaScript File:
IlvButton.js
Description:
IlvButton is a DHTML button component that will call some JavaScript code or function when clicked. The button images are scaled to fit the button bounds specified in the constructor or by the setBounds method.

Constructor Summary
Constructor Attributes Constructor Name and Description
 
IlvButton(left, top, width, height, image, action)
Method Summary
Method Attributes Method Name and Description
 
childrenToHTML(parentNode)
Creates the HTML for this component's children.
 
Disposes of all resources being used by the button.
 
This method is invoked when the user clicks the button.
 
Returns the action to be triggered each time this button is pressed.
 
return the baseTextDirection.
 
Returns the cursor of the button.
 
 
Returns the image of the button.
 
Returns the message to be displayed when the mouse is over the button.
 
Returns the message panel where the messages will be displayed.
 
Returns the rollover image of the button.
 
Returns the selected image of the button.
 
Returns the tooltip text of the button.
 
 
Returns whether this button is enabled.
 
Indicates whether or not this button is selected.
 
Indicates whether or not this button is in toggle mode.
 
This method is invoked when the mouse is pressed.
 
This method is invoked when the mouse leaves the button.
 
This method is invoked when the mouse is over the button.
 
mouseUp(e)
This method is invoked when the mouse is released.
 
setAction(action)
Sets the action to be triggered each time this button is pressed.
 
setBaseTextDirection(baseTextDirection)
Sets the baseTextDirection.
 
setChildrenBounds(left, top, width, height)
Changes the size of the button's child views.
 
setCursor(cursor)
Changes the cursor of the button.
 
setEnabled(enabled)
Sets whether this button is enabled.
 
setImage(image)
Sets the image of the button.
 
setMessage(message)
Sets the message to be displayed when the mouse is over the button.
 
setMessagePanel(ilvHTMLPanel)
Sets the message panel where the message will be displayed.
 
Sets the rollover image of the button.
 
setSelected(selected)
Sets the button in selected mode.
 
Sets the selected image of the button.
 
setToggleButton(selected)
Sets or removes the toggle mode for the button.
 
setToolTipText(string)
Sets the tooltip text of the button.
Methods inherited from class IlvEmptyView
addSizeListener, getBounds, getLeft, getLocation, getSize, getTop, isStateInCookie, removeSizeListener, restoreState, saveState, setBounds, setLocation, setSize, setStateInCookie, toHTML
Methods inherited from class IlvObject
getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvButton
IlvButton(left, top, width, height, image, action)
Parameters:
left - The absolute x position of the button on the page.
top - The absolute y position of the button on the page.
width - The width of the button.
height - The height of the button.
image - The URL of an image representing the button.
action - A String representing some JavaScript code or a JavaScript function.
Method Detail
childrenToHTML
childrenToHTML(parentNode)
Creates the HTML for this component's children. Warning: This method is considered to be part of an IlvButton's internal implementation and is not a public API.
Parameters:
parentNode

dispose
dispose()
Disposes of all resources being used by the button. Make sure to call IlvObject.callDispose() function on the onunload event of the page:
 <body onunload="IlvObject.callDispose()">

doClick
doClick()
This method is invoked when the user clicks the button. It can be called directly to simulate a button click.

getAction
getAction()
Returns the action to be triggered each time this button is pressed.

getBaseTextDirection
getBaseTextDirection()
return the baseTextDirection.
Since:
8.8

getCursor
getCursor()
Returns the cursor of the button. The default value is "auto".

getHeight
getHeight()

getImage
getImage()
Returns the image of the button.

getMessage
getMessage()
Returns the message to be displayed when the mouse is over the button.

getMessagePanel
getMessagePanel()
Returns the message panel where the messages will be displayed.
Returns:
An instance of IlvHTMLPanel or null.

getRolloverImage
getRolloverImage()
Returns the rollover image of the button.

getSelectedImage
getSelectedImage()
Returns the selected image of the button.

getToolTipText
getToolTipText()
Returns the tooltip text of the button.

getWidth
getWidth()

isEnabled
isEnabled()
Returns whether this button is enabled.
Since:
JViews 8.0

isSelected
isSelected()
Indicates whether or not this button is selected.

isToggleButton
isToggleButton()
Indicates whether or not this button is in toggle mode.

mouseDown
mouseDown(e)
This method is invoked when the mouse is pressed.
Parameters:
e

mouseOut
mouseOut(e)
This method is invoked when the mouse leaves the button.
Parameters:
e

mouseOver
mouseOver(e)
This method is invoked when the mouse is over the button.
Parameters:
e

mouseUp
mouseUp(e)
This method is invoked when the mouse is released.
Parameters:
e

setAction
setAction(action)
Sets the action to be triggered each time this button is pressed.
Parameters:
action - A String representing a JavaScript code or a JavaScript function.

setBaseTextDirection
setBaseTextDirection(baseTextDirection)
Sets the baseTextDirection.
Parameters:
baseTextDirection
Since:
8.8

setChildrenBounds
setChildrenBounds(left, top, width, height)
Changes the size of the button's child views. Warning: This method is considered to be part of an IlvButton's internal implementation and is not a public API.
Parameters:
left - The absolute x position of the button on the page.
top - The absolute y position of the button on the page.
width - The width of the button.
height - The height of the button.

setCursor
setCursor(cursor)
Changes the cursor of the button.
Parameters:
cursor - The cursor name.

setEnabled
setEnabled(enabled)
Sets whether this button is enabled.
Parameters:
enabled - The enabled flag.
Since:
JViews 8.0

setImage
setImage(image)
Sets the image of the button.
Parameters:
image - The URL of the image.

setMessage
setMessage(message)
Sets the message to be displayed when the mouse is over the button. The message is displayed in the status window of the browser and in the panel set using the setMessagePanel method.
Parameters:
message - The message.

setMessagePanel
setMessagePanel(ilvHTMLPanel)
Sets the message panel where the message will be displayed.
Parameters:
ilvHTMLPanel - An instance of IlvHTMLPanel.

setRolloverImage
setRolloverImage(image)
Sets the rollover image of the button.
Parameters:
image - The URL of the image.

setSelected
setSelected(selected)
Sets the button in selected mode.
Parameters:
selected - A Boolean value.

setSelectedImage
setSelectedImage(image)
Sets the selected image of the button.
Parameters:
image - The URL of the image.

setToggleButton
setToggleButton(selected)
Sets or removes the toggle mode for the button.
Parameters:
selected - A Boolean value.

setToolTipText
setToolTipText(string)
Sets the tooltip text of the button.
Parameters:
string - A string.

©Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.