Class AbstractComponentWithButtons<T extends Component>

    • Field Detail

      • m_Component

        protected T extends Component m_Component
        the component.
      • m_PanelAll

        protected JPanel m_PanelAll
        the panel encompassing the component and the information.
      • m_PanelInfo

        protected JPanel m_PanelInfo
        the panel for the information JLabel.
      • m_LabelInfo

        protected JLabel m_LabelInfo
        the label for selection information, etc.
      • m_ScrollPane

        protected BaseScrollPane m_ScrollPane
        the scroll pane, if in use.
    • Constructor Detail

      • AbstractComponentWithButtons

        public AbstractComponentWithButtons()
    • Method Detail

      • requiresScrollPane

        public abstract boolean requiresScrollPane()
        Returns whether the component requires a JScrollPane around it.
        Returns:
        true if the component requires a JScrollPane
      • getScrollPane

        public JScrollPane getScrollPane()
        Returns the scroll pane in use for the component.
        Returns:
        the scroll pane, null if not used
        See Also:
        requiresScrollPane()
      • createComponent

        protected abstract T createComponent()
        Creates the component to use in the panel. If a
        Returns:
        the component
      • getComponent

        public T getComponent()
        Returns the underlying component.
        Returns:
        the underlying component
      • addKeyListener

        public void addKeyListener​(KeyListener l)
        Adds the key listener to the component.
        Overrides:
        addKeyListener in class Component
        Parameters:
        l - the listener to add
      • removeKeyListener

        public void removeKeyListener​(KeyListener l)
        Removes the key listener from the component.
        Overrides:
        removeKeyListener in class Component
        Parameters:
        l - the listener to remove
      • setInfoVisible

        public void setInfoVisible​(boolean value)
        Whether to display the information JLabel or not. public synchronized void addKeyListener(KeyListener l) {
        Parameters:
        value - if true then the information is being displayed
      • isInfoVisible

        public boolean isInfoVisible()
        Returns whether the information panel/JLabel is visible or not.
        Returns:
        true if the information is being displayed
      • updateInfo

        public void updateInfo​(String msg)
        Updates the information being displayed with the given string.
        Parameters:
        msg - the information to display