Package com.biglybt.ui.swt.pifimpl
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 com.biglybt.ui.common.ToolBarItem
ToolBarItem.ToolBarItemListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private UIToolBarActivationListener
private String
private String
private String
private long
private String
private List<ToolBarItem.ToolBarItemListener>
private String
private String
Fields inherited from interface com.biglybt.pif.ui.toolbar.UIToolBarItem
STATE_DOWN, STATE_ENABLED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
getID()
Retrieve the ID of the toolbar itemGet the ID of the image usedlong
getState()
Return the message bundle ID for the button textboolean
Returns if the toolbar item is always available (enabled)void
void
setAlwaysAvailable
(boolean alwaysAvailable) void
setDefaultActivationListener
(UIToolBarActivationListener defaultActivation) void
setGroupID
(String groupID) void
setImageID
(String id) Sets the toolbar item to use the specified imagevoid
setState
(long state) void
Sets the button's text to a messagebundle value looked up using the idvoid
setToolTip
(String text) void
setToolTipID
(String tooltipID) private void
boolean
triggerToolBarItem
(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:
addToolBarItemListener
in interfaceToolBarItem
-
removeToolBarItemListener
- Specified by:
removeToolBarItemListener
in interfaceToolBarItem
-
triggerFieldChange
private void triggerFieldChange() -
getID
Description copied from interface:UIToolBarItem
Retrieve the ID of the toolbar item- Specified by:
getID
in interfaceUIToolBarItem
-
getTextID
Description copied from interface:UIToolBarItem
Return the message bundle ID for the button text- Specified by:
getTextID
in interfaceUIToolBarItem
-
setTextID
Description copied from interface:UIToolBarItem
Sets the button's text to a messagebundle value looked up using the id- Specified by:
setTextID
in interfaceUIToolBarItem
-
getImageID
Description copied from interface:UIToolBarItem
Get the ID of the image used- Specified by:
getImageID
in interfaceUIToolBarItem
-
setImageID
Description copied from interface:UIToolBarItem
Sets the toolbar item to use the specified image- Specified by:
setImageID
in interfaceUIToolBarItem
-
isAlwaysAvailable
public boolean isAlwaysAvailable()Description copied from interface:UIToolBarItem
Returns if the toolbar item is always available (enabled)- Specified by:
isAlwaysAvailable
in interfaceUIToolBarItem
-
setAlwaysAvailable
public void setAlwaysAvailable(boolean alwaysAvailable) - Specified by:
setAlwaysAvailable
in interfaceToolBarItem
-
getState
public long getState()- Specified by:
getState
in interfaceUIToolBarItem
-
setState
public void setState(long state) - Specified by:
setState
in interfaceUIToolBarItem
-
triggerToolBarItem
- Specified by:
triggerToolBarItem
in interfaceToolBarItem
- Specified by:
triggerToolBarItem
in interfaceUIToolBarItem
-
setDefaultActivationListener
- Specified by:
setDefaultActivationListener
in interfaceToolBarItem
- Specified by:
setDefaultActivationListener
in interfaceUIToolBarItem
-
getDefaultActivationListener
- Specified by:
getDefaultActivationListener
in interfaceToolBarItem
-
getToolTipID
- Specified by:
getToolTipID
in interfaceUIToolBarItem
-
setToolTipID
- Specified by:
setToolTipID
in interfaceUIToolBarItem
-
getGroupID
- Specified by:
getGroupID
in interfaceUIToolBarItem
- Returns:
- Group that item belongs to
-
setGroupID
- Specified by:
setGroupID
in interfaceUIToolBarItem
-
setToolTip
- Specified by:
setToolTip
in interfaceUIToolBarItem
-
getToolTip
- Specified by:
getToolTip
in interfaceUIToolBarItem
- Returns:
-