Class GuiToolbarWidgets


  • public class GuiToolbarWidgets
    extends BaseGuiWidgets
    This class contains the widgets for the GUI elements of a GUI Plugin
    • Constructor Detail

      • GuiToolbarWidgets

        public GuiToolbarWidgets()
    • Method Detail

      • createToolbarWidgets

        public void createToolbarWidgets​(org.eclipse.swt.widgets.Composite parent,
                                         String root)
      • enableToolbarItem

        public void enableToolbarItem​(String id,
                                      boolean enabled)
      • enableToolbarItem

        public org.eclipse.swt.widgets.ToolItem enableToolbarItem​(IHopFileType fileType,
                                                                  String id,
                                                                  String permission)
        Find the toolbar item with the given ID. Check the capability in the given file type Enable or disable accordingly.
        Parameters:
        fileType -
        id - The ID of the widget to look for
        permission -
        Returns:
        The toolbar item or null if nothing is found
      • enableToolbarItem

        public org.eclipse.swt.widgets.ToolItem enableToolbarItem​(IHopFileType fileType,
                                                                  String id,
                                                                  String permission,
                                                                  boolean active)
        Find the toolbar item with the given ID. Check the capability in the given file type Enable or disable accordingly.
        Parameters:
        fileType -
        id - The ID of the widget to look for
        permission -
        active - The state if the permission is available
        Returns:
        The toolbar item or null if nothing is found
      • findToolItem

        public org.eclipse.swt.widgets.ToolItem findToolItem​(String id)
      • refreshComboItemList

        public void refreshComboItemList​(String id)
      • selectComboItem

        public void selectComboItem​(String id,
                                    String string)
      • getListener

        protected org.eclipse.swt.widgets.Listener getListener​(GuiToolbarItem toolbarItem)
      • getWidgetsMap

        public Map<String,​org.eclipse.swt.widgets.Control> getWidgetsMap()
        Gets widgetsMap
        Returns:
        value of widgetsMap
      • setWidgetsMap

        public void setWidgetsMap​(Map<String,​org.eclipse.swt.widgets.Control> widgetsMap)
        Parameters:
        widgetsMap - The widgetsMap to set
      • getToolItemMap

        public Map<String,​org.eclipse.swt.widgets.ToolItem> getToolItemMap()
        Gets toolItemMap
        Returns:
        value of toolItemMap
      • setToolItemMap

        public void setToolItemMap​(Map<String,​org.eclipse.swt.widgets.ToolItem> toolItemMap)
        Parameters:
        toolItemMap - The toolItemMap to set
      • getGuiToolBarMap

        public Map<String,​GuiToolbarItem> getGuiToolBarMap()
        Gets guiToolBarMap
        Returns:
        value of guiToolBarMap
      • setGuiToolBarMap

        public void setGuiToolBarMap​(Map<String,​GuiToolbarItem> guiToolBarMap)
        Parameters:
        guiToolBarMap - The guiToolBarMap to set
      • getItemBackgroundColor

        public org.eclipse.swt.graphics.Color getItemBackgroundColor()
        Gets itemBackgroundColor
        Returns:
        value of itemBackgroundColor
      • setItemBackgroundColor

        public void setItemBackgroundColor​(org.eclipse.swt.graphics.Color itemBackgroundColor)
        Sets itemBackgroundColor
        Parameters:
        itemBackgroundColor - value of itemBackgroundColor