Class ToolBarPanel

    • Constructor Detail

      • ToolBarPanel

        public ToolBarPanel()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class BasePanel
      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class BasePanel
      • initActions

        protected abstract void initActions()
        Sets up all the actions.
        See Also:
        AbstractBaseAction
      • initToolBar

        protected abstract void initToolBar()
        Sets up the toolbar, using the actions.
        See Also:
        initActions()
      • setToolBarLocation

        public void setToolBarLocation​(ToolBarPanel.ToolBarLocation value)
        Sets the location of the toolbar.
        Parameters:
        value - the location of the toolbar
      • addToToolBar

        public JButton addToToolBar​(Action action)
        Adds the specified action to the toolbar.
        Parameters:
        action - the action to add
      • addToToolBar

        public Component addToToolBar​(JComponent comp)
        Adds the specified component to the toolbar.
        Parameters:
        comp - the component to add
      • removeFromToolBar

        public void removeFromToolBar​(JComponent comp)
        Removes the specified component from the toolbar.
        Parameters:
        comp - the component to remove
      • addSeparator

        public void addSeparator()
        Adds a separator to the toolbar.
      • getToolBarComponentCount

        public int getToolBarComponentCount()
        Returns the number of components in the toolbar.
        Returns:
        the number of components
      • getToolBarComponentAtIndex

        public Component getToolBarComponentAtIndex​(int index)
        Returns the component at the specified index.
        Parameters:
        index - the index of the component to retrieve
        Returns:
        the component at the index
      • getToolBar

        public JToolBar getToolBar()
        Returns the underlying toolbar.
        Returns:
        the toolbar
      • getContentPanel

        public BasePanel getContentPanel()
        Returns the content panel.
        Returns:
        the content panel
      • setFloatable

        public void setFloatable​(boolean value)
        Sets whether the toolbar is to be floatable or not, i.e., whether the user can move the toolbar around.
        Parameters:
        value - if true the user will be able to move the toolbar
      • isFloatable

        public boolean isFloatable()
        Returns whether the toolbar is floatable or not, i.e., whether the user can move the toolbar around.
        Returns:
        true if the user can move the toolbar
      • updateActions

        protected abstract void updateActions()
        Updates the enabled state of the actions.