Class TotalsPanel

All Implemented Interfaces:
Workspace, ImageObserver, MenuContainer, Serializable, Accessible

public class TotalsPanel extends JPanel implements Workspace
A panel containing two expandable accordion sub panels that contain the Grand Totals and (if available) Subtotals of the table and model provided.
See Also:
  • Constructor Details

    • TotalsPanel

      public TotalsPanel(com.fishlib.io.logger.Logger log, DBTableModel model)
      Create a new totals panel to display Totals and Grand totals. Note that no totals are computed until the panel is set visible with setVisible(boolean)
    • TotalsPanel

      public TotalsPanel(com.fishlib.io.logger.Logger log, DBTableModel model, TotalsTableBuilder builder)
  • Method Details

    • getModel

      public DBTableModel getModel()
    • getWorkspaceInfo

      public org.jdom2.Element getWorkspaceInfo()
      Description copied from interface: Workspace
      Serialize the class into an element to be stored in the workspace
      Specified by:
      getWorkspaceInfo in interface Workspace
      Returns:
      An Element containing the data to persist.
    • setWorkspaceInfo

      public void setWorkspaceInfo(org.jdom2.Element workspaceInfo)
      Description copied from interface: Workspace
      Restore the class to the state defined by the data persisted in workspaceInfo
      Specified by:
      setWorkspaceInfo in interface Workspace
      Parameters:
      workspaceInfo - An Element containing the persisted state.
    • setVisible

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class JComponent
    • getTotalsBuilder

      public TotalsTableBuilder getTotalsBuilder()
    • close

      public void close()
      Closes any tables uses by the totals panel.