Class ActionBarSingleButtonItem
- java.lang.Object
-
- com._1c.g5.v8.dt.common.ui.controls.ActionBarSingleButtonItem
-
- All Implemented Interfaces:
IActionBarItem
public class ActionBarSingleButtonItem extends Object implements IActionBarItem
Native button-based implementation of an action bar item.
-
-
Constructor Summary
Constructors Constructor Description ActionBarSingleButtonItem(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.forms.widgets.FormToolkit toolkit, String name, int style)
Creates an instance of the action bar item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addActionListener(IActionListener listener)
Adds action listener to the item.org.eclipse.swt.widgets.Control
getControl()
Gets the control associated with the item to perform actiob bar processing (like layouts) on it.String
getId()
Gets the indetifier of the action bar item.void
removeActionListener(IActionListener listener)
Removes action listener from the item.void
setImage(org.eclipse.swt.graphics.Image image)
Sets the image decorator for the item.void
setToolTipText(String toolTip)
Sets the tooltip text for the itme.
-
-
-
Constructor Detail
-
ActionBarSingleButtonItem
public ActionBarSingleButtonItem(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.forms.widgets.FormToolkit toolkit, String name, int style)
Creates an instance of the action bar item.- Parameters:
parent
- Parent composite which holds this button.toolkit
- Form toolkit reference.name
- Name of the item.style
- Inherited style.
-
-
Method Detail
-
addActionListener
public void addActionListener(IActionListener listener)
Adds action listener to the item.}- Specified by:
addActionListener
in interfaceIActionBarItem
- Parameters:
listener
- The listener to add.
-
removeActionListener
public void removeActionListener(IActionListener listener)
Removes action listener from the item.}- Specified by:
removeActionListener
in interfaceIActionBarItem
- Parameters:
listener
- The listener to remove.
-
getControl
public org.eclipse.swt.widgets.Control getControl()
Gets the control associated with the item to perform actiob bar processing (like layouts) on it.}- Specified by:
getControl
in interfaceIActionBarItem
- Returns:
- The control associated with widget.
-
getId
public String getId()
Gets the indetifier of the action bar item.}- Specified by:
getId
in interfaceIActionBarItem
- Returns:
- The identifier of the button.
-
setImage
public void setImage(org.eclipse.swt.graphics.Image image)
Sets the image decorator for the item.}- Specified by:
setImage
in interfaceIActionBarItem
- Parameters:
image
- Image to set.
-
setToolTipText
public void setToolTipText(String toolTip)
Sets the tooltip text for the itme.}- Specified by:
setToolTipText
in interfaceIActionBarItem
- Parameters:
toolTip
- Text to set.
-
-