Class UIToolBarItemImpl
java.lang.Object
com.biglybt.ui.swt.pifimpl.UIToolBarItemImpl
- All Implemented Interfaces:
UIToolBarItem, ToolBarItem
A Toolbar item implementation, independent of UI (SWT)
-
Nested Class Summary
Nested classes/interfaces inherited from interface ToolBarItem
ToolBarItem.ToolBarItemListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate UIToolBarActivationListenerprivate Stringprivate Stringprivate Stringprivate longprivate Stringprivate List<ToolBarItem.ToolBarItemListener> private Stringprivate StringFields inherited from interface UIToolBarItem
STATE_DOWN, STATE_ENABLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetID()Retrieve the ID of the toolbar itemGet the ID of the image usedlonggetState()Return the message bundle ID for the button textbooleanReturns if the toolbar item is always available (enabled)voidvoidsetAlwaysAvailable(boolean alwaysAvailable) voidsetDefaultActivationListener(UIToolBarActivationListener defaultActivation) voidsetGroupID(String groupID) voidsetImageID(String id) Sets the toolbar item to use the specified imagevoidsetState(long state) voidSets the button's text to a messagebundle value looked up using the idvoidsetToolTip(String text) voidsetToolTipID(String tooltipID) private voidbooleantriggerToolBarItem(long activationType, Object datasource)
-
Field Details
-
id
-
imageID
-
textID
-
alwaysAvailable
private boolean alwaysAvailable -
state
private long state -
defaultActivation
-
tooltipID
-
groupID
-
toolBarItemListeners
-
toolTip
-
-
Constructor Details
-
UIToolBarItemImpl
-
-
Method Details
-
addToolBarItemListener
- Specified by:
addToolBarItemListenerin interfaceToolBarItem
-
removeToolBarItemListener
- Specified by:
removeToolBarItemListenerin interfaceToolBarItem
-
triggerFieldChange
private void triggerFieldChange() -
getID
Description copied from interface:UIToolBarItemRetrieve the ID of the toolbar item- Specified by:
getIDin interfaceUIToolBarItem
-
getTextID
Description copied from interface:UIToolBarItemReturn the message bundle ID for the button text- Specified by:
getTextIDin interfaceUIToolBarItem
-
setTextID
Description copied from interface:UIToolBarItemSets the button's text to a messagebundle value looked up using the id- Specified by:
setTextIDin interfaceUIToolBarItem- Parameters:
id-
-
getImageID
Description copied from interface:UIToolBarItemGet the ID of the image used- Specified by:
getImageIDin interfaceUIToolBarItem
-
setImageID
Description copied from interface:UIToolBarItemSets the toolbar item to use the specified image- Specified by:
setImageIDin interfaceUIToolBarItem
-
isAlwaysAvailable
public boolean isAlwaysAvailable()Description copied from interface:UIToolBarItemReturns if the toolbar item is always available (enabled)- Specified by:
isAlwaysAvailablein interfaceUIToolBarItem
-
setAlwaysAvailable
public void setAlwaysAvailable(boolean alwaysAvailable) - Specified by:
setAlwaysAvailablein interfaceToolBarItem
-
getState
public long getState()- Specified by:
getStatein interfaceUIToolBarItem
-
setState
public void setState(long state) - Specified by:
setStatein interfaceUIToolBarItem
-
triggerToolBarItem
- Specified by:
triggerToolBarItemin interfaceToolBarItem- Specified by:
triggerToolBarItemin interfaceUIToolBarItem
-
setDefaultActivationListener
- Specified by:
setDefaultActivationListenerin interfaceToolBarItem- Specified by:
setDefaultActivationListenerin interfaceUIToolBarItem
-
getDefaultActivationListener
- Specified by:
getDefaultActivationListenerin interfaceToolBarItem
-
getToolTipID
- Specified by:
getToolTipIDin interfaceUIToolBarItem
-
setToolTipID
- Specified by:
setToolTipIDin interfaceUIToolBarItem- Parameters:
tooltipID-
-
getGroupID
- Specified by:
getGroupIDin interfaceUIToolBarItem- Returns:
- Group that item belongs to
-
setGroupID
- Specified by:
setGroupIDin interfaceUIToolBarItem- Parameters:
groupID-
-
setToolTip
- Specified by:
setToolTipin interfaceUIToolBarItem
-
getToolTip
- Specified by:
getToolTipin interfaceUIToolBarItem- Returns:
-