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
StandardListComponentimplementation.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROPERTY_DATASET_RUNstatic java.lang.StringPROPERTY_IGNORE_WIDTHstatic java.lang.StringPROPERTY_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.Objectclone()ListContentsgetContents()Returns the list item contents.JRDatasetRungetDatasetRun()Returns the subdataset run information that will be used by this list.JRPropertyChangeSupportgetEventSupport()Returns the property change support object for this instance.java.lang.BooleangetIgnoreWidth()Returns the flag that determines whether the element width is to be ignored when filling this list.PrintOrderEnumgetPrintOrderValue()Returns the print order of the list cells.voidsetContents(ListContents contents)Sets the list item contents.voidsetDatasetRun(JRDatasetRun datasetRun)Sets the subdataset run information that will be used by this list.voidsetIgnoreWidth(boolean ignoreWidth)Sets the list ignore width flag.voidsetIgnoreWidth(java.lang.Boolean ignoreWidth)Sets the list ignore width flag.voidsetPrintOrderValue(PrintOrderEnum printOrderValue)Sets the list cell print order.voidvisit(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:ListComponentReturns 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:
getDatasetRunin interfaceDatasetRunHolder- Specified by:
getDatasetRunin 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:ListComponentReturns 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:
getContentsin 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:
clonein interfaceJRCloneable- Overrides:
clonein classjava.lang.Object
-
getPrintOrderValue
public PrintOrderEnum getPrintOrderValue()
Description copied from interface:ListComponentReturns 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:
getPrintOrderValuein 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:JRChangeEventsSupportReturns the property change support object for this instance.- Specified by:
getEventSupportin interfaceJRChangeEventsSupport- Returns:
- the property change support object for this instance
-
getIgnoreWidth
public java.lang.Boolean getIgnoreWidth()
Description copied from interface:ListComponentReturns 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:
getIgnoreWidthin 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:
visitin interfaceJRVisitable
-
-