ToolBarButton Class

ToolBarButton Class

This Package | All Packages

Object
  |
  +--ToolBarButton
public class ToolBarButton
extends Object
implements ICommandExecutor, IConstructable

Represents a button on a toolbar.

Constructors
Name Description
ToolBarButton() Topic under construction.
ToolBarButton(boolean enabled, int imageIndex, boolean indeterminate, Menu menu, boolean pushed, int style, Object tag, String text, String toolTipText) Topic under construction.

Methods
Name Description
addOnClick(EventHandler value) Adds an listener for the Click event on this toolbar button.
dispose() Topic under construction.
execute() Topic under construction.
finalize() Topic under construction.
getConstructorArgs() Topic under construction.
getEnabled() Retrieves the Enabled property.
getImageIndex() Retrieves the ImageIndex property.
getIndeterminate() Retrieves the Indeterminate property.
getMenu() Retrieves the Menu property.
getPushed() Retrieves the Pushed property.
getStyle() Retrieves the Style property.
getTag() Retrieves the Tag property.
getText() Retrieves the Text property.
getToolTipText() Retrieves the ToolTipText property.
onClick(Event e) The Click event.
removeOnClick(EventHandler value) Removes a Click event handler.
setEnabled(boolean value) Sets the Enabled property.
setImageIndex(int index) Sets the ImageIndex property.
setIndeterminate(boolean value) Sets the Indeterminate property.
setMenu(Menu menu) Sets the Menu property.
setPushed(boolean value) Sets the Pushed property.
setStyle(int value) Sets the Style property.
setTag(Object value) Sets the Tag property.
setText(String text) Sets the Text property.
setToolTipText(String value) Sets the ToolTipText property.

Constructors

ToolBarButton.ToolBarButton

Syntax 1
public ToolBarButton();
Description

Topic under construction.



Syntax 2
public ToolBarButton( boolean enabled, int imageIndex, boolean indeterminate, Menu menu, boolean pushed, int style, Object tag, String text, String toolTipText );
Description

Topic under construction.

Methods

ToolBarButton.addOnClick

Syntax
public void addOnClick( EventHandler value );
Parameters
value
The Click event handler to add.
Description

Adds an listener for the Click event on this toolbar button.

ToolBarButton.dispose

Syntax
public void dispose();
Description

Topic under construction.

ToolBarButton.execute

Syntax
public void execute();
Description

Topic under construction.

ToolBarButton.finalize

Syntax
public void finalize();
Description

Topic under construction.

ToolBarButton.getConstructorArgs

Syntax
public ConstructorArg[] getConstructorArgs();
Description

Topic under construction.

ToolBarButton.getEnabled

Syntax
public boolean getEnabled();
Return Value

Returns the Enabled property state.

Description

Retrieves the Enabled property. This property specifies whether the button is usable.

ToolBarButton.getImageIndex

Syntax
public int getImageIndex();
Return Value

Returns the index of the image.

Description

Retrieves the ImageIndex property. This property specifies an image to use for the toolbar button.

ToolBarButton.getIndeterminate

Syntax
public boolean getIndeterminate();
Return Value

Returns the Indeterminate property state.

Description

Retrieves the Indeterminate property. This property specifies whether the button is dimmed.

ToolBarButton.getMenu

Syntax
public Menu getMenu();
Return Value

Returns a Menu object.

Description

Retrieves the Menu property. The Menu is used for drop-down toolbar buttons.

ToolBarButton.getPushed

Syntax
public boolean getPushed();
Return Value

Returns the Pushed state.

Description

Retrieves the Pushed property. This property applies to buttons of the style STYLE_CHECK.

ToolBarButton.getStyle

Syntax
public int getStyle();
Return Value

Returns the Style property.

Description

Retrieves the Style property.

ToolBarButton.getTag

Syntax
public Object getTag();
Return Value

Returns the Tag object.

Description

Retrieves the Tag property. This is user-defined data.

ToolBarButton.getText

Syntax
public String getText();
Return Value

Returns a string containing the text.

Description

Retrieves the Text property. The text is what sits next to or below the toolbar button image.

ToolBarButton.getToolTipText

Syntax
public String getToolTipText();
Return Value

Returns the string.

Description

Retrieves the ToolTipText property. This text is displayed when the user holds the mouse over the toolbar button.

ToolBarButton.onClick

Syntax
protected void onClick( Event e );
Parameters
e
The event data.
Description

The Click event.

ToolBarButton.removeOnClick

Syntax
public void removeOnClick( EventHandler value );
Parameters
value
The event handler to remove.
Description

Removes a Click event handler.

ToolBarButton.setEnabled

Syntax
public void setEnabled( boolean value );
Parameters
value
The new Enabled property state.
Description

Sets the Enabled property. This property specifies whether the button is usable.

ToolBarButton.setImageIndex

Syntax
public void setImageIndex( int index );
Parameters
index
The index of the image.
Description

Sets the ImageIndex property. This property specifies an image to use for the toolbar button.

ToolBarButton.setIndeterminate

Syntax
public void setIndeterminate( boolean value );
Parameters
value
The new Indeterminate property state.
Description

Sets the Indeterminate property. This property specifies whether the button is dimmed.

ToolBarButton.setMenu

Syntax
public void setMenu( Menu menu );
Parameters
menu
A Menu object.
Description

Sets the Menu property. The Menu is used for drop-down toolbar buttons.

ToolBarButton.setPushed

Syntax
public void setPushed( boolean value );
Parameters
value
The pushed state.
Description

Sets the Pushed property. This property applies to buttons of the style STYLE_CHECK.

ToolBarButton.setStyle

Syntax
public void setStyle( int value );
Parameters
value
The new style.
Description

Sets the Style property.

ToolBarButton.setTag

Syntax
public void setTag( Object value );
Parameters
value
The new Tag object.
Description

Sets the Tag property. This is for user-defined data.

ToolBarButton.setText

Syntax
public void setText( String text );
Parameters
text
The text value.
Description

Sets the Text property.

ToolBarButton.setToolTipText

Syntax
public void setToolTipText( String value );
Parameters
value
The string.
Description

Sets the ToolTipText property. This text is displayed when the user holds the mouse over the toolbar button.