jdbreport.model
Interface Group

All Superinterfaces:
Iterable<TableRow>
All Known Subinterfaces:
GroupsGroup, RowsGroup
All Known Implementing Classes:
AbstractGroup, BaseRowGroup, DetailGroup, RootGroup, RootRowGroup, RootRowGroup.RowsGroup, TemplateRootGroup, TreeRowGroup

public interface Group
extends Iterable<TableRow>

Version:
1.1 03/09/08
Author:
Andrey Kholmanskih

Field Summary
static int GROUP_DETAIL
           
static int ROW_DETAIL
           
static int ROW_FOOTER
           
static int ROW_GROUP_FOOTER
           
static int ROW_GROUP_HEADER
           
static int ROW_NONE
           
static int ROW_PAGE_FOOTER
           
static int ROW_PAGE_HEADER
           
static int ROW_TITLE
           
static String[] typeNames
           
 
Method Summary
 void clear()
          Removes all groups and rows from group
 Object getChild(int index)
           
 int getChildCount()
           
 int getChildIndex(Object child)
           
 TableRow getFirstGroupRow()
           
 RowsGroup getGroup(TableRow row)
           
 int getHeight()
          Returns group's height in pixels
 int[] getIndexPath()
           
 int getLevel()
           
 GroupsGroup getParent()
           
 Group[] getPath()
           
 int getRowCount()
          Returns all TableRow objects in group
 double getTotalResult(int func, int column)
          Calculates the grand total by column and all rows
 int getType()
           
 String getTypeName()
           
 Iterator<TableRow> getVisibleRowIterator()
          Returns all visible rows
 boolean isVisible()
           
 Iterator<TableRow> iterator()
          Returns all rows
 boolean remove(Object child)
           
 void setVisible(boolean visible)
           
 

Field Detail

typeNames

static final String[] typeNames

ROW_NONE

static final int ROW_NONE
See Also:
Constant Field Values

ROW_TITLE

static final int ROW_TITLE
See Also:
Constant Field Values

ROW_PAGE_HEADER

static final int ROW_PAGE_HEADER
See Also:
Constant Field Values

ROW_GROUP_HEADER

static final int ROW_GROUP_HEADER
See Also:
Constant Field Values

ROW_DETAIL

static final int ROW_DETAIL
See Also:
Constant Field Values

ROW_GROUP_FOOTER

static final int ROW_GROUP_FOOTER
See Also:
Constant Field Values

ROW_PAGE_FOOTER

static final int ROW_PAGE_FOOTER
See Also:
Constant Field Values

ROW_FOOTER

static final int ROW_FOOTER
See Also:
Constant Field Values

GROUP_DETAIL

static final int GROUP_DETAIL
See Also:
Constant Field Values
Method Detail

getType

int getType()

getTypeName

String getTypeName()

getChildCount

int getChildCount()

getGroup

RowsGroup getGroup(TableRow row)

getParent

GroupsGroup getParent()

getChildIndex

int getChildIndex(Object child)

remove

boolean remove(Object child)

getLevel

int getLevel()

getRowCount

int getRowCount()
Returns all TableRow objects in group

Returns:
all TableRow objects

getFirstGroupRow

TableRow getFirstGroupRow()

isVisible

boolean isVisible()

setVisible

void setVisible(boolean visible)

iterator

Iterator<TableRow> iterator()
Returns all rows

Specified by:
iterator in interface Iterable<TableRow>

getVisibleRowIterator

Iterator<TableRow> getVisibleRowIterator()
Returns all visible rows

Returns:
all visible rows

getHeight

int getHeight()
Returns group's height in pixels

Returns:
the group's height in pixels

getTotalResult

double getTotalResult(int func,
                      int column)
Calculates the grand total by column and all rows

Parameters:
func - - the total functions (sum, min, max, avg)
column - - the column's number
Returns:
the grand total by column

clear

void clear()
Removes all groups and rows from group


getIndexPath

int[] getIndexPath()

getPath

Group[] getPath()

getChild

Object getChild(int index)