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 String
m_ID
the ID to use for display.protected BaseTable
m_Table
the associated table.protected boolean
m_Visible
whether 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 BaseTable
getComponent()
Returns the stored component.int
getDatabaseID()
Returns the database ID of the payload, if available.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).String
getID()
Returns the ID used for display.Report
getReport()
Returns the payload as Report object.boolean
hasComponent()
Checks whether a component is stored.boolean
hasDatabaseID()
Checks whether a database ID is available.protected void
initialize()
Initializes members.protected void
invalidate()
For invalidating cached data.boolean
isVisible()
Returns whether the instance is visible.void
setComponent(BaseTable value)
Sets the component to associate.void
setID(String value)
Sets the ID to use for display.void
setVisible(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:
initialize
in classAbstractContainer
-
invalidate
protected void invalidate()
For invalidating cached data.
Resets the cached Table.- Overrides:
invalidate
in 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:
setID
in interfaceMutableIDHandler
- Specified by:
setID
in interfaceNamedContainer
- Parameters:
value
- the ID
-
getID
public String getID()
Returns the ID used for display.- Specified by:
getID
in interfaceIDHandler
- Specified by:
getID
in 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:
getDisplayID
in 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:
getDatabaseID
in interfaceDatabaseIDHandler
- Returns:
- the DB ID,
Constants.NO_ID
if not available
-
hasComponent
public boolean hasComponent()
Checks whether a component is stored.- Specified by:
hasComponent
in interfaceContainerWithComponent<BaseTable>
- Returns:
- true if a component is available
-
setComponent
public void setComponent(BaseTable value)
Sets the component to associate.- Specified by:
setComponent
in interfaceContainerWithComponent<BaseTable>
- Parameters:
value
- the component
-
getComponent
public BaseTable getComponent()
Returns the stored component.- Specified by:
getComponent
in interfaceContainerWithComponent<BaseTable>
- Returns:
- the component, null if none available
-
-