Package adams.gui.visualization.report
Class ReportContainer
- java.lang.Object
-
- adams.gui.visualization.container.AbstractContainer
-
- adams.gui.visualization.report.ReportContainer
-
- All Implemented Interfaces:
DatabaseIDHandler,IDHandler,MutableIDHandler,ContainerWithComponent<BaseTable>,DatabaseContainer,NamedContainer,Serializable,Comparable<AbstractContainer>
public class ReportContainer extends AbstractContainer implements NamedContainer, ContainerWithComponent<BaseTable>, DatabaseContainer
A container for Report objects.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringm_IDthe ID to use for display.protected BaseTablem_Tablethe associated table.protected booleanm_Visiblewhether the instance is visible.-
Fields inherited from class adams.gui.visualization.container.AbstractContainer
m_Manager, m_Payload, m_Updating
-
-
Constructor Summary
Constructors Constructor Description ReportContainer(ReportContainerManager manager, Report report)Initializes the container.ReportContainer(ReportContainerManager manager, ReportHandler handler)Initializes the container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BaseTablegetComponent()Returns the stored component.intgetDatabaseID()Returns the database ID of the payload, if available.StringgetDisplayID()Returns an ID to be used in the GUI (the DB ID with added single quotes to make it unique among the chromatograms in the container manager).StringgetID()Returns the ID used for display.ReportgetReport()Returns the payload as Report object.booleanhasComponent()Checks whether a component is stored.booleanhasDatabaseID()Checks whether a database ID is available.protected voidinitialize()Initializes members.protected voidinvalidate()For invalidating cached data.booleanisVisible()Returns whether the instance is visible.voidsetComponent(BaseTable value)Sets the component to associate.voidsetID(String value)Sets the ID to use for display.voidsetVisible(boolean value)Sets the instance's visibility.-
Methods inherited from class adams.gui.visualization.container.AbstractContainer
assign, compareTo, copy, equals, getManager, getPayload, postProcessPayload, setManager, setPayload, toString
-
-
-
-
Constructor Detail
-
ReportContainer
public ReportContainer(ReportContainerManager manager, Report report)
Initializes the container.- Parameters:
manager- the manager this container belongs toreport- the report of this container
-
ReportContainer
public ReportContainer(ReportContainerManager manager, ReportHandler handler)
Initializes the container.- Parameters:
manager- the manager this container belongs tohandler- the report handler of this container
-
-
Method Detail
-
initialize
protected void initialize()
Initializes members.- Overrides:
initializein classAbstractContainer
-
invalidate
protected void invalidate()
For invalidating cached data.
Resets the cached Table.- Overrides:
invalidatein classAbstractContainer- See Also:
m_Table
-
getReport
public Report getReport()
Returns the payload as Report object.- Returns:
- the report
-
setVisible
public void setVisible(boolean value)
Sets the instance's visibility.- Parameters:
value- if true then the instance will be visible
-
isVisible
public boolean isVisible()
Returns whether the instance is visible.- Returns:
- true if the instance is visible
-
setID
public void setID(String value)
Sets the ID to use for display.- Specified by:
setIDin interfaceMutableIDHandler- Specified by:
setIDin interfaceNamedContainer- Parameters:
value- the ID
-
getID
public String getID()
Returns the ID used for display.- Specified by:
getIDin interfaceIDHandler- Specified by:
getIDin interfaceNamedContainer- Returns:
- the ID
-
getDisplayID
public String getDisplayID()
Returns an ID to be used in the GUI (the DB ID with added single quotes to make it unique among the chromatograms in the container manager).- Specified by:
getDisplayIDin interfaceNamedContainer- Returns:
- a short ID for the GUI
-
hasDatabaseID
public boolean hasDatabaseID()
Checks whether a database ID is available.- Returns:
- true if a database ID is available
-
getDatabaseID
public int getDatabaseID()
Returns the database ID of the payload, if available.- Specified by:
getDatabaseIDin interfaceDatabaseIDHandler- Returns:
- the DB ID,
Constants.NO_IDif not available
-
hasComponent
public boolean hasComponent()
Checks whether a component is stored.- Specified by:
hasComponentin interfaceContainerWithComponent<BaseTable>- Returns:
- true if a component is available
-
setComponent
public void setComponent(BaseTable value)
Sets the component to associate.- Specified by:
setComponentin interfaceContainerWithComponent<BaseTable>- Parameters:
value- the component
-
getComponent
public BaseTable getComponent()
Returns the stored component.- Specified by:
getComponentin interfaceContainerWithComponent<BaseTable>- Returns:
- the component, null if none available
-
-