Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IlvToolBar

IlvObject
   |
   +--IlvEmptyView
      |
      +--IlvToolBar

Category:
Common component
JavaScript File:
IlvToolBar.js
Description:
IlvToolBar is a DHTML toolbar. Instances of IlvButton can be added, or sorted in this toolbar. Once the buttons are arranged in the appropriate way, you can create an HTML representation of the toolbar using the toHTML method. This class also offers special support for computing the width and height of the toolbar and the associated notification mechanism.

Constructor Summary
Constructor Attributes Constructor Name and Description
 
IlvToolBar(left, top)
Method Summary
Method Attributes Method Name and Description
 
addButton(button, index)
Adds a button to the toolbar at the specified index.
 
childrenToHTML(parentNode)
Creates the HTML for this toolbar's children.
 
Computes and returns the height of this toolbar in pixels.
 
Computes and returns the width of this toolbar in pixels.
 
Returns the background color of the toolbar.
 
Returns the background image of the toolbar.
 
Returns the color of the toolbar border.
 
Returns the border thickness in pixels.
 
Returns an array containing the buttons in this toolbar.
 
Returns the button spacing in pixels.
 
getIndex(button)
Returns the index of an IlvButton in the toolbar, or -1 if the button is not in the toolbar.
 
Returns the orientation of this toolbar.
 
Sets the background color of the toolbar.
 
Sets the background image of the toolbar.
 
Sets the color of the toolbar border.
 
Sets the border thickness in pixels.
 
setBounds(left, top, width, height)
Changes the size of the toolbar.
 
Sets the button spacing in pixels.
 
setChildrenBounds(left, top, width, height)
Changes the size of the toolbar's children.
 
setOrientation(string)
Sets the orientation of this toolbar.
Methods inherited from class IlvEmptyView
addSizeListener, getBounds, getHeight, getLeft, getLocation, getSize, getTop, getWidth, isStateInCookie, removeSizeListener, restoreState, saveState, setLocation, setSize, setStateInCookie, toHTML
Methods inherited from class IlvObject
dispose, getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvToolBar
IlvToolBar(left, top)
Parameters:
left
top
Method Detail
addButton
addButton(button, index)
Adds a button to the toolbar at the specified index. If no index is specified, the button is added at the end of the toolbar.
Parameters:
button - An IlvButton to be added to the toolbar.
index - The position at which the button should be added to the toolbar. This parameter is optional.

childrenToHTML
childrenToHTML(parentNode)
Creates the HTML for this toolbar's children. Warning: This method is considered to be part of an IlvToolBar's internal implementation and is not a public API.
Parameters:
parentNode

computeHeight
computeHeight()
Computes and returns the height of this toolbar in pixels.

computeWidth
computeWidth()
Computes and returns the width of this toolbar in pixels.

getBackgroundColor
getBackgroundColor()
Returns the background color of the toolbar. The default value is "#CCCCCC".

getBackgroundImage
getBackgroundImage()
Returns the background image of the toolbar. By default a toolbar has no background image and therefore the background color is visible.

getBorderColor
getBorderColor()
Returns the color of the toolbar border. By default, the color of the border is the same as the background color of the toolbar.
Returns:
A string describing the color or null if the color of the border is the same as the color of the toolbar.

getBorderThickness
getBorderThickness()
Returns the border thickness in pixels.

getButtons
getButtons()
Returns an array containing the buttons in this toolbar. Note: You are not allowed to modify this array or its contents. Use addButton to modify the toolbar.

getButtonSpacing
getButtonSpacing()
Returns the button spacing in pixels.

getIndex
getIndex(button)
Returns the index of an IlvButton in the toolbar, or -1 if the button is not in the toolbar.
Parameters:
button - The IlvButton whose index should be returned.

getOrientation
getOrientation()
Returns the orientation of this toolbar.

setBackgroundColor
setBackgroundColor(color)
Sets the background color of the toolbar. The default value is "#CCCCCC".
Parameters:
color - A string describing the color. For example, "#FFFFFF" corresponds to white.

setBackgroundImage
setBackgroundImage(image)
Sets the background image of the toolbar. The image is tiled across the background of the toolbar. By default, a toolbar has no background image and therefore the background color is visible.
Parameters:
image - The URL of an image.

setBorderColor
setBorderColor(color)
Sets the color of the toolbar border. By default, the color of the border is the same as the background color of the toolbar.
Parameters:
color - A string describing the color or null to set the color of the border to be the same as the color of the toolbar.

setBorderThickness
setBorderThickness(pixels)
Sets the border thickness in pixels. The default value is 4.
Parameters:
pixels

setBounds
setBounds(left, top, width, height)
Changes the size of the toolbar. This method is overridden because toolbars automatically calculate their width and height from the buttons they contain.
Parameters:
left - The absolute x position of the toolbar on the page.
top - The absolute y position of the toolbar on the page.
width - The width of the toolbar. This argument is ignored.
height - The height of the toolbar. This argument is ignored.

setButtonSpacing
setButtonSpacing(pixels)
Sets the button spacing in pixels. The default value is 0.
Parameters:
pixels

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

setOrientation
setOrientation(string)
Sets the orientation of this toolbar. The value can be IlvToolBar.VERTICAL or IlvToolBar.HORIZONTAL. The default value is IlvToolBar.HORIZONTAL.
Parameters:
string

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