Class StandardListComponent
- java.lang.Object
-
- net.sf.jasperreports.components.list.StandardListComponent
-
- All Implemented Interfaces:
Serializable
,Cloneable
,ListComponent
,Component
,DatasetRunHolder
,JRChangeEventsSupport
,JRCloneable
,JRVisitable
public class StandardListComponent extends Object implements Serializable, ListComponent, JRChangeEventsSupport
StandardListComponent
implementation.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROPERTY_DATASET_RUN
static String
PROPERTY_IGNORE_WIDTH
static String
PROPERTY_PRINT_ORDER
-
Constructor Summary
Constructors Constructor Description StandardListComponent()
StandardListComponent(ListComponent list, JRBaseObjectFactory baseFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
ListContents
getContents()
Returns the list item contents.JRDatasetRun
getDatasetRun()
Returns the subdataset run information that will be used by this list.JRPropertyChangeSupport
getEventSupport()
Returns the property change support object for this instance.Boolean
getIgnoreWidth()
Returns the flag that determines whether the element width is to be ignored when filling this list.PrintOrderEnum
getPrintOrder()
Returns the print order of the list cells.void
setContents(ListContents contents)
Sets the list item contents.void
setDatasetRun(JRDatasetRun datasetRun)
Sets the subdataset run information that will be used by this list.void
setIgnoreWidth(boolean ignoreWidth)
Sets the list ignore width flag.void
setIgnoreWidth(Boolean ignoreWidth)
Sets the list ignore width flag.void
setPrintOrder(PrintOrderEnum printOrder)
Sets the list cell print order.void
visit(JRVisitor visitor)
-
-
-
Field Detail
-
PROPERTY_PRINT_ORDER
public static final String PROPERTY_PRINT_ORDER
- See Also:
- Constant Field Values
-
PROPERTY_IGNORE_WIDTH
public static final String PROPERTY_IGNORE_WIDTH
- See Also:
- Constant Field Values
-
PROPERTY_DATASET_RUN
public static final String PROPERTY_DATASET_RUN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StandardListComponent
public StandardListComponent()
-
StandardListComponent
public StandardListComponent(ListComponent list, JRBaseObjectFactory baseFactory)
-
-
Method Detail
-
getDatasetRun
public JRDatasetRun getDatasetRun()
Description copied from interface:ListComponent
Returns the subdataset run information that will be used by this list.This information is required to instantiate a subdataset from the report. The data produced by the subdataset is fed to the list item contents.
- Specified by:
getDatasetRun
in interfaceDatasetRunHolder
- Specified by:
getDatasetRun
in interfaceListComponent
- Returns:
- the subdataset run information
-
setDatasetRun
public void setDatasetRun(JRDatasetRun datasetRun)
Sets the subdataset run information that will be used by this list.- Parameters:
datasetRun
- the subdataset run information- See Also:
getDatasetRun()
-
getContents
public ListContents getContents()
Description copied from interface:ListComponent
Returns the list item contents.Each record produced by the list subdataset is used to fill the list item contents and the result is included in the generated report.
- Specified by:
getContents
in interfaceListComponent
- Returns:
- the list item contents
-
setContents
public void setContents(ListContents contents)
Sets the list item contents.- Parameters:
contents
- the list item contents- See Also:
getContents()
-
clone
public Object clone()
- Specified by:
clone
in interfaceJRCloneable
- Overrides:
clone
in classObject
-
getPrintOrder
public PrintOrderEnum getPrintOrder()
Description copied from interface:ListComponent
Returns the print order of the list cells.The list cells can be either printed vertically one beneath another (on a single column), or horizontally on rows of 2 or more columns.
The default print order (used when no explicit order has been set) is vertical.
- Specified by:
getPrintOrder
in interfaceListComponent
- Returns:
- the list print order if set, one of
- See Also:
ListContents.getWidth()
-
setPrintOrder
public void setPrintOrder(PrintOrderEnum printOrder)
Sets the list cell print order.- Parameters:
printOrder
- the cell print oder, null or one of- See Also:
getPrintOrder()
-
getEventSupport
public JRPropertyChangeSupport getEventSupport()
Description copied from interface:JRChangeEventsSupport
Returns the property change support object for this instance.- Specified by:
getEventSupport
in interfaceJRChangeEventsSupport
- Returns:
- the property change support object for this instance
-
getIgnoreWidth
public Boolean getIgnoreWidth()
Description copied from interface:ListComponent
Returns the flag that determines whether the element width is to be ignored when filling this list.This flag only applies to horizontally filled reports. If the flag is set, the list will be filled on a single row.
By default, the flag is not set.
- Specified by:
getIgnoreWidth
in interfaceListComponent
- See Also:
ListComponent.getPrintOrder()
,JRCrosstab.setIgnoreWidth(Boolean)
-
setIgnoreWidth
public void setIgnoreWidth(Boolean ignoreWidth)
Sets the list ignore width flag.- Parameters:
ignoreWidth
- the ignore width flag
-
setIgnoreWidth
public void setIgnoreWidth(boolean ignoreWidth)
Sets the list ignore width flag.- Parameters:
ignoreWidth
- the ignore width flag
-
visit
public void visit(JRVisitor visitor)
- Specified by:
visit
in interfaceJRVisitable
-
-