Package com.biglybt.ui.swt.views.skin
Class ToolBarView
java.lang.Object
com.biglybt.ui.swt.skin.SWTSkinObjectAdapter
com.biglybt.ui.swt.views.skin.SkinView
com.biglybt.ui.swt.views.skin.ToolBarView
- All Implemented Interfaces:
ParameterListener
,ToolBarItem.ToolBarItemListener
,SelectedContentListener
,UIToolBarManagerImpl.ToolBarManagerListener
,SWTSkinObjectListener
public class ToolBarView
extends SkinView
implements SelectedContentListener, UIToolBarManagerImpl.ToolBarManagerListener, ToolBarItem.ToolBarItemListener, ParameterListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
static interface
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ToolBarView.toolbarButtonListener
private static boolean
private boolean
private boolean
private Map<UIToolBarItem,
ToolBarItemSO> private ArrayList<ToolBarView.ToolBarViewListener>
private boolean
private boolean
private FrequencyLimitedDispatcher
private boolean
private boolean
private SWTSkinObject
private UIToolBarManagerCore
Fields inherited from interface com.biglybt.ui.swt.skin.SWTSkinObjectListener
EVENT_CREATE_REQUEST, EVENT_CREATED, EVENT_DATASOURCE_CHANGED, EVENT_DESTROY, EVENT_HIDE, EVENT_LANGUAGE_CHANGE, EVENT_OBFUSCATE, EVENT_SELECT, EVENT_SHOW, NAMES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
private void
addItemListener
(String key) void
private void
addMenus
(org.eclipse.swt.widgets.Composite comp) private void
addNonToolBar
(String skinid, String groupID) private void
addSeperator
(String groupID) private void
addSeperator
(String id, String groupID) private void
build
(Map<UIToolBarItem, ToolBarItemSO> newMap) private void
bulkSetupItems
(Map<UIToolBarItem, ToolBarItemSO> newMap, String groupID, String templatePrefix) private ToolBarItem
createItem
(ToolBarView tbv, String id, String imageid, String textID) private void
createItemSO
(Map<UIToolBarItem, ToolBarItemSO> newMap, ToolBarItem item, String templatePrefix, int position) void
currentlySelectedContentChanged
(ISelectedContent[] currentContent, String viewID) private SWTSkinObjectContainer
getGroupSO
(String groupID) private org.eclipse.swt.widgets.Control
getLastControl
(String groupID) boolean
private void
initSO
(Map<UIToolBarItem, ToolBarItemSO> newMap, SWTSkinObject so, ToolBarItemSO itemSO) protected boolean
protected boolean
moveTop()
void
parameterChanged
(String parameterName) Called, when a parameter has changed.private SWTSkinObjectContainer
peekGroupSO
(String groupID) private void
rebuild()
void
private void
private void
void
void
setShowText
(boolean showText) private void
setupToolBarItems
(boolean uiClassic) skinObjectDestroyed
(SWTSkinObject skinObject, Object params) Skin Object was destroyedskinObjectHidden
(SWTSkinObject skinObject, Object params) Skin Object was hiddenskinObjectInitialShow
(SWTSkinObject skinObject, Object params) skinObjectShown
(SWTSkinObject skinObject, Object params) Skin Object was shownvoid
void
toolbarItemRemoved
(UIToolBarItem toolBarItem) boolean
triggerToolBarItem
(ToolBarItem item, long activationType, Object datasource) private boolean
triggerViewToolBar
(ToolBarItem item, long activationType, Object datasource) void
uiFieldChanged
(ToolBarItem item) Methods inherited from class com.biglybt.ui.swt.views.skin.SkinView
getMainSkinObject, getMdiEntry, getSkin, getSkinObject, isDisposed, isVisible, setMainSkinObject, skinObjectCreated
Methods inherited from class com.biglybt.ui.swt.skin.SWTSkinObjectAdapter
dataSourceChanged, eventOccured, skinObjectSelected, updateLanguage
-
Field Details
-
DEBUG
private static boolean DEBUG -
buttonListener
-
itemMap
-
showText
private boolean showText -
initComplete
private boolean initComplete -
rebuilding
private boolean rebuilding -
rebuild_pending
private boolean rebuild_pending -
showCalled
private boolean showCalled -
listeners
-
tbm
-
firstTimeEver
private boolean firstTimeEver -
visible_items
-
item_listeners
-
refresh_limiter
-
dm_listener_map
-
soLastGroup
-
-
Constructor Details
-
ToolBarView
public ToolBarView()
-
-
Method Details
-
createItem
-
skinObjectInitialShow
- Specified by:
skinObjectInitialShow
in classSkinView
- Returns:
-
build
-
rebuild
private void rebuild() -
addMenus
private void addMenus(org.eclipse.swt.widgets.Composite comp) -
setupToolBarItems
private void setupToolBarItems(boolean uiClassic) -
parameterChanged
Description copied from interface:ParameterListener
Called, when a parameter has changed. The listener could only react if the parameter name is relevant. Or the listener can just read all parameters again.- Specified by:
parameterChanged
in interfaceParameterListener
- Parameters:
parameterName
- the name of the parameter that has changed
-
currentlySelectedContentChanged
- Specified by:
currentlySelectedContentChanged
in interfaceSelectedContentListener
-
skinObjectShown
Description copied from class:SWTSkinObjectAdapter
Skin Object was shown- Overrides:
skinObjectShown
in classSkinView
-
skinObjectHidden
Description copied from class:SWTSkinObjectAdapter
Skin Object was hidden- Overrides:
skinObjectHidden
in classSkinView
-
addActiveListeners
private void addActiveListeners() -
removeActiveListeners
private void removeActiveListeners() -
addItemListener
-
removeItemListeners
private void removeItemListeners() -
skinObjectDestroyed
Description copied from class:SWTSkinObjectAdapter
Skin Object was destroyed- Overrides:
skinObjectDestroyed
in classSkinView
-
triggerToolBarItem
- Specified by:
triggerToolBarItem
in interfaceToolBarItem.ToolBarItemListener
-
moveBottom
protected boolean moveBottom() -
moveTop
protected boolean moveTop() -
refreshCoreToolBarItems
public void refreshCoreToolBarItems() -
_refreshCoreToolBarItems
public void _refreshCoreToolBarItems() -
triggerViewToolBar
-
bulkSetupItems
private void bulkSetupItems(Map<UIToolBarItem, ToolBarItemSO> newMap, String groupID, String templatePrefix) -
getLastControl
-
createItemSO
private void createItemSO(Map<UIToolBarItem, ToolBarItemSO> newMap, ToolBarItem item, String templatePrefix, int position) -
peekGroupSO
-
getGroupSO
-
initSO
private void initSO(Map<UIToolBarItem, ToolBarItemSO> newMap, SWTSkinObject so, ToolBarItemSO itemSO) -
uiFieldChanged
- Specified by:
uiFieldChanged
in interfaceToolBarItem.ToolBarItemListener
-
addSeperator
-
addSeperator
-
addNonToolBar
-
setShowText
public void setShowText(boolean showText) - Parameters:
showText
- the showText to set
-
getShowText
public boolean getShowText()- Returns:
- the showText
-
addListener
-
removeListener
-
toolbarItemRemoved
- Specified by:
toolbarItemRemoved
in interfaceUIToolBarManagerImpl.ToolBarManagerListener
-
toolbarItemAdded
- Specified by:
toolbarItemAdded
in interfaceUIToolBarManagerImpl.ToolBarManagerListener
-