net.sf.jasperreports.components.list
Class StandardListComponent

java.lang.Object
  extended by net.sf.jasperreports.components.list.StandardListComponent
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ListComponent, Component, JRChangeEventsSupport, JRCloneable

public class StandardListComponent
extends java.lang.Object
implements java.io.Serializable, ListComponent, JRChangeEventsSupport

Standard ListComponent implementation.

Version:
$Id: StandardListComponent.java 3715 2010-04-08 18:08:49Z teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
Serialized Form

Field Summary
static java.lang.String PROPERTY_IGNORE_WIDTH
           
static java.lang.String PROPERTY_PRINT_ORDER
           
 
Constructor Summary
StandardListComponent()
           
StandardListComponent(ListComponent list, JRBaseObjectFactory baseFactory)
           
 
Method Summary
 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.
 java.lang.Byte getPrintOrder()
          Deprecated. Replaced by getPrintOrderValue().
 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 setPrintOrder(byte printOrder)
          Deprecated. Replaced by setPrintOrderValue(PrintOrderEnum).
 void setPrintOrder(java.lang.Byte printOrder)
          Deprecated. Replaced by setPrintOrderValue(PrintOrderEnum).
 void setPrintOrderValue(PrintOrderEnum printOrderValue)
          Sets the list cell print order.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
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 interface ListComponent
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 interface ListComponent
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 interface JRCloneable
Overrides:
clone in class java.lang.Object

getPrintOrder

public java.lang.Byte getPrintOrder()
Deprecated. Replaced by getPrintOrderValue().

Specified by:
getPrintOrder in interface ListComponent

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 interface ListComponent
Returns:
the list print order if set, one of
See Also:
ListContents.getWidth()

setPrintOrder

public void setPrintOrder(java.lang.Byte printOrder)
Deprecated. Replaced by setPrintOrderValue(PrintOrderEnum).


setPrintOrder

public void setPrintOrder(byte printOrder)
Deprecated. Replaced by setPrintOrderValue(PrintOrderEnum).


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 interface JRChangeEventsSupport
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 interface ListComponent
See Also:
ListComponent.getPrintOrder(), 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


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com