Class AbstractContainerList<M extends AbstractContainerManager,​C extends AbstractContainer>

    • Constructor Detail

      • AbstractContainerList

        public AbstractContainerList()
    • Method Detail

      • initialize

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

        protected void initGUI()
        For initializing the GUI.
        Overrides:
        initGUI in class BasePanel
      • createTable

        protected ContainerTable<M,​C> createTable()
        Creates a new table.
        Returns:
        the new table
      • createModel

        protected ContainerModel<M,​C> createModel​(M manager)
        Creates a new model.
        Parameters:
        manager - the manager to use for the model
        Returns:
        the new model
      • configureModel

        protected void configureModel​(ContainerModel<M,​C> model)
        Configures the model.
        Parameters:
        model - the model to configure
      • newModel

        protected ContainerModel<M,​C> newModel​(M manager)
        Creates a new model.
        Parameters:
        manager - the manager to base the model on
        Returns:
        the model
      • getContainerModel

        public ContainerModel<M,​C> getContainerModel()
        Returns the underlying container model.
        Returns:
        the container model, null if of different type
      • setManager

        public void setManager​(M value)
        Sets the manager with the containers to use for display.
        Parameters:
        value - the manager
      • getManager

        public M getManager()
        Returns the current manager, can be null.
        Returns:
        the manager or null if not set
      • getTable

        public ContainerTable<M,​C> getTable()
        Returns the table.
        Returns:
        the table
      • setPopupMenuSupplier

        public void setPopupMenuSupplier​(ContainerListPopupMenuSupplier<M,​C> value)
        Sets the popup menu supplier, if the user right-clicks on the table cells.
        Parameters:
        value - the supplier, can be null to turn off menu
      • getPopupMenuSupplier

        public ContainerListPopupMenuSupplier<M,​C> getPopupMenuSupplier()
        Returns the current popup menu supplier.
        Returns:
        the supplier, can be null if turned off
      • setDisplayVisibility

        public void setDisplayVisibility​(boolean value)
        Whether to display the visibility column (if possible).
        Parameters:
        value - if true then the column will be displayed where possible
      • getDisplayVisibility

        public boolean getDisplayVisibility()
        Returns whether the visibility column will be displayed where possible.
        Returns:
        true if the column will be displayed where possible
      • setDisplayDatabaseID

        public void setDisplayDatabaseID​(boolean value)
        Whether to display the database ID column (if possible).
        Parameters:
        value - if true then the column will be displayed where possible
      • getDisplayDatabaseID

        public boolean getDisplayDatabaseID()
        Returns whether the database ID column will be displayed where possible.
        Returns:
        true if the column will be displayed where possible
      • hasTitle

        public boolean hasTitle()
        Returns whether a title has been set.
        Returns:
        true if a title was set
      • setTitle

        public void setTitle​(String value)
        Sets the title of the container list.
        Parameters:
        value - the title, use empty string or null to remove
      • updateTitle

        protected void updateTitle()
        Updates the title, including the number of containers in the list.
      • getTitle

        public String getTitle()
        Returns the title.
        Returns:
        the title, null if none set
      • updateTableColumnWidths

        protected void updateTableColumnWidths()
        Gets called when the table data changes. Re-calculates the column widths of the table.
        See Also:
        tableChanged(TableModelEvent)
      • tableChanged

        public void tableChanged​(TableModelEvent e)
        Gets called when the underlying data model changes.

        Default implementation notifies all the TableModelListener with the even that this method receives.
        Specified by:
        tableChanged in interface TableModelListener
        Parameters:
        e - the event
        See Also:
        m_TableModelListeners
      • addTableModelListener

        public void addTableModelListener​(TableModelListener l)
        Adds the given listener to the internal list.
        Parameters:
        l - the listener to add
      • removeTableModelListener

        public void removeTableModelListener​(TableModelListener l)
        Removes the given listener from the internal list.
        Parameters:
        l - the listener to remove
      • addListSelectionListener

        public void addListSelectionListener​(ListSelectionListener l)
        Adds the given listener to the internal list.
        Parameters:
        l - the listener to add
      • removeListSelectionListener

        public void removeListSelectionListener​(ListSelectionListener l)
        Removes the given listener from the internal list.
        Parameters:
        l - the listener to remove
      • dataChanged

        public void dataChanged​(DataChangeEvent e)
        Gets called if the data of the container list has changed.
        Specified by:
        dataChanged in interface DataChangeListener
        Parameters:
        e - the event that the container list sent
      • setAllowSearch

        public void setAllowSearch​(boolean value)
        Sets whether the entry list is searchable.
        Parameters:
        value - true if to make the list searchable
      • getAllowSearch

        public boolean getAllowSearch()
        Returns whether the entry list is searchable.
        Returns:
        true if list is searchable
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface CleanUpHandler