Class MasterButtonPanel

    • Constructor Detail

      • MasterButtonPanel

        public MasterButtonPanel​(int verticalAlignment,
                                 boolean groupButtons)
        Master button panel with configurable vertical alignment of the buttons.
        Parameters:
        verticalAlignment - SwingConstants.TOP or SwingConstants.BOTTOM
        groupButtons - should buttons be grouped?
      • MasterButtonPanel

        public MasterButtonPanel()
        Master button panel with SwingConstants.TOP vertical alignment of the buttons. By default the buttons are grouped.
    • Method Detail

      • doClickIfNotSelected

        public void doClickIfNotSelected​(String id)
        Click on a master button, if it is not already selected.
        Parameters:
        id - action id of the action/button you want to click
      • doClick

        public void doClick​(String id)
        Click on a master button.
        Parameters:
        id - action id of the action/button you want to click
      • doClick

        public void doClick​(int index)
        Click on a master button.
        Parameters:
        index - index in layout
      • setSelectedButton

        public void setSelectedButton​(int index)
      • getSelectedButton

        public int getSelectedButton()
      • isSelectOnDrag

        public boolean isSelectOnDrag()
        Is dragging onto a button equivalent to selecting/clicking it?
        Returns:
        true or false
      • setSelectOnDrag

        public void setSelectOnDrag​(boolean selectOnDrag)
        If set to true, dragging an item onto one of the buttons is like selecting/clicking it.
        Parameters:
        selectOnDrag - true or false