Class StandardListComponent
- java.lang.Object
-
- net.sf.jasperreports.components.list.StandardListComponent
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,ListComponent
,Component
,DatasetRunHolder
,JRChangeEventsSupport
,JRCloneable
,JRVisitable
public class StandardListComponent extends java.lang.Object implements java.io.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 java.lang.String
PROPERTY_DATASET_RUN
static java.lang.String
PROPERTY_IGNORE_WIDTH
static java.lang.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 java.lang.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.java.lang.Boolean
getIgnoreWidth()
Returns the flag that determines whether the element width is to be ignored when filling this list.PrintOrderEnum
getPrintOrderValue()
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(java.lang.Boolean ignoreWidth)
Sets the list ignore width flag.void
setPrintOrderValue(PrintOrderEnum printOrderValue)
Sets the list cell print order.void
visit(JRVisitor visitor)
-
-
-
Field Detail
-
PROPERTY_PRINT_ORDER
public static final java.lang.String PROPERTY_PRINT_ORDER
- See Also:
- Constant Field Values
-
PROPERTY_IGNORE_WIDTH
public static final java.lang.String PROPERTY_IGNORE_WIDTH
- See Also:
- Constant Field Values
-
PROPERTY_DATASET_RUN
public static final java.lang.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 java.lang.Object clone()
- Specified by:
clone
in interfaceJRCloneable
- Overrides:
clone
in classjava.lang.Object
-
getPrintOrderValue
public PrintOrderEnum getPrintOrderValue()
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:
getPrintOrderValue
in interfaceListComponent
- Returns:
- the list print order if set, one of
- See Also:
ListContents.getWidth()
-
setPrintOrderValue
public void setPrintOrderValue(PrintOrderEnum printOrderValue)
Sets the list cell print order.- Parameters:
printOrderValue
- the cell print oder, null or one of- See Also:
getPrintOrderValue()
-
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 java.lang.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.getPrintOrderValue()
,JRCrosstab.setIgnoreWidth(Boolean)
-
setIgnoreWidth
public void setIgnoreWidth(java.lang.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
-
-