Class Index

Global Variables

Classes


Class MVToolBar

MVToolBar defines a draggable toolbar that acts as a placeholder of multiple control buttons. Each control button controls an Oracle Maps built-in tool or a custom tool and responses to mouse clicks by invoking event handlers associated with the tool. The toolbar can be displayed in two orientations, vertical or horizontal.

The following built-in tools are supported: Redline tool, Distance tool, Circle tool, Rectangle tool and Marquee Zoom tool. The application can choose to display control buttons for all or some of these built-in tools in the toolbar.

The tool bar can also hold custom tool buttons that controls application defined operations.

A tool button can be defined in one of the following two types:

Multiple buttons can organized as a button group, where at most one button can be in the pushed DOWN state at any time. Pushing down a button will automatically pop up the other pushed DOWN button if there is any. All built-in tool buttons, except the Marquee Zoom button, are TOGGLE buttons organized in the same button group. The Marquee Zoom button is a TOGGLE button, but does not belong to any button group.

Class Summary
Constructor Attributes Constructor Name and Description
 
MVToolBar(toolBarID, builtInButtons, orientation)
Method Summary
Method Attributes Method Name and Description
 
addBuiltInButton(btObject)
This method add a Built-In button to the tool bar.
 
addButton(btObject)
This method add a tool button to the tool bar.
 
This method adds a button group to the tool bar.
 
addSeparator(buttonID)
This method internally creates a MVToolButton of SEPARATOR type and adds it to the tool bar.
 
This method gets the specified built-in tool button instance, which has been added to the map toolbar object.
 
This method returns the MVButtonGroup object that contains all built-in tool buttons.
 
This method gets the specified built-in tool instance, which has been added to the map toolbar object.
 
getButton(itemId)
This method gets a button object from the tool bar.
 
This method checks whether the toolbar is visible.
 
removeButton(btObject)
This method deletes a button from the tool bar.
 
This method removes a button group from the tool bar.
 
setPosition(left, top, xOffset, yOffset)
This method sets the position of the map toolbar object.
 
setVisible(visible)
This method shows or hides the map toolbar by changing its visibility.
Class Detail
MVToolBar(toolBarID, builtInButtons, orientation)
Parameters:
{String} toolBarID
A string that specifies the id of the toolbar.
{array} builtInButtons
An array that specifies the built-in tool buttons to be included in the tool bar. Each array element specifies one built-in tool bar to be included. It can be one of the following values, MVToolBar.BUILTIN_CIRCLE, MVToolBar.BUILTIN_RECTANGLE, MVToolBar.BUILTIN_REDLINE, MVToolBar.BUILTIN_DISTANCE, MVToolBar.BUILTIN_MARQUEE_ZOOM, MVToolBar.BUILTIN_ALL. To include all built-in tool buttons, you can use an array with a single MVToolBar.BUILTIN_ALL element.
{int} orientation
This parameter specifies the orientation of the tool bar. It can be MVToolBar.VERTICAL or MVToolBar.HORIZONTAL.
Returns:
The newly created MVDistanceTool object.
Method Detail
{void} addBuiltInButton(btObject)
This method add a Built-In button to the tool bar.
Parameters:
{MVToolButton} btObject
btObject specifies the button object to be added.
Returns:
None

{void} addButton(btObject)
This method add a tool button to the tool bar.
Parameters:
{MVToolButton} btObject
btObject specifies the button object to be added.
Returns:
None

{void} addButtonGroup(group)
This method adds a button group to the tool bar.
Parameters:
{MVButtonGroup} group
a MVButtonGroup object that specifies the button group.
Returns:
None

{void} addSeparator(buttonID)
This method internally creates a MVToolButton of SEPARATOR type and adds it to the tool bar.
Parameters:
{string} buttonID
buttonID specifies the id of the newly created SEPARATOR button. This id is used to delete this SEPARATOR button if needed.
Returns:
None

{Object} getBuiltInButton(tool)
This method gets the specified built-in tool button instance, which has been added to the map toolbar object.
Parameters:
{int} tool
tool specifies the built-in tool button to be returned. It can be one of the following values: MVToolBar.BUILTIN_CLEAR, MVToolBar.BUILTIN_CIRCLE, MVToolBar.BUILTIN_RECTANGLE, MVToolBar.BUILTIN_REDLINE, MVToolBar.BUILTIN_DISTANCE MVToolBar.BUILTIN_MARQUEE_ZOOM.
Returns:
the built-in tool button instance

{void} getBuiltInButtonGroup()
This method returns the MVButtonGroup object that contains all built-in tool buttons.
Returns:
None

{Object} getBuiltInTool(tool)
This method gets the specified built-in tool instance, which has been added to the map toolbar object.
Parameters:
{int} tool
tool specifies the built-in tool to be returned. It can be one of the following values: MVToolBar.BUILTIN_CIRCLE, MVToolBar.BUILTIN_RECTANGLE, MVToolBar.BUILTIN_REDLINE, or MVToolBar.BUILTIN_DISTANCE.
Returns:
the built-in tool instance

{MVToolButton} getButton(itemId)
This method gets a button object from the tool bar.
Parameters:
{string} itemId
itemId specifies the id of the button.
Returns:
button object

{Boolean} isVisible()
This method checks whether the toolbar is visible.
Returns:
a boolean the specifies whether the toolbar is visible.

{void} removeButton(btObject)
This method deletes a button from the tool bar.
Parameters:
{MVToolButton} btObject
btObject specifies the button object to be deleted.
Returns:
None

{void} removeButtonGroup(group)
This method removes a button group from the tool bar.
Parameters:
{MVButtonGroup} group
a MVButtonGroup object that specifies the button group.
Returns:
None

{void} setPosition(left, top, xOffset, yOffset)
This method sets the position of the map toolbar object. The positioning of the toolbar object is specified by its position relative to the upper-left corner from the map. The relative position is not specified in pixels, instead it is specified in the percentage relative to the map window size. The horizontal position is specified by parameter left, which should be a float number in the range of 0-1. The absolute offset of the toolbar bject center from the left map window border in pixels is left*map_window_width.

The vertical position is specified by parameter top, which should be a float number in the range of 0-1. The absolute offset of the toolbar object center from the top map window border in pixels is top*map_window_height.
Parameters:
{float} left
left specifies the horizontal position of the map toolbar object relative to the left border of the map window.
{float} top
top specifies the vertical position of the map toolbar object relative to the top border of the map window.
{int} xOffset
xOffset is an integer that specifies the horizontal offset in pixels
{int} yOffset
yOffset is an integer that specifies the vertical offset in pixels
Returns:
None

{void} setVisible(visible)
This method shows or hides the map toolbar by changing its visibility.
Parameters:
{Boolean} visible
visible is a Boolean value that specifies whether the toolbar should be visible. It can be true(visible) or false(not visible).
Returns:
None

Documentation generated by JsDoc Toolkit 2.1.0 on Fri Feb 25 2011 12:34:47 GMT-0500 (EST)