org.jfree.report.function
Class FunctionUtilities

java.lang.Object
  extended byorg.jfree.report.function.FunctionUtilities

public final class FunctionUtilities
extends java.lang.Object

A collection of utility methods relating to functions.

Author:
Thomas Morgner.

Method Summary
static Element findElement(Band band, java.lang.String element)
          Try to find the defined element in the last active root-band.
static Group getCurrentGroup(ReportEvent event)
          Returns the current group instance, based on the given report event.
static boolean isDefinedGroup(java.lang.String groupName, ReportEvent event)
          Returns true if the events current groupname is equal to the group name.
static boolean isDefinedPrepareRunLevel(Function f, ReportEvent event)
          Returns true, if the current run level is defined for the given function and this is a prepare run.
static boolean isLayoutLevel(ReportEvent event)
          Returns true or false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findElement

public static Element findElement(Band band,
                                  java.lang.String element)
Try to find the defined element in the last active root-band.

Parameters:
band - the band that is suspected to contain the element.
element - the element name.
Returns:
the found element or null, if no element could be found.

isDefinedGroup

public static boolean isDefinedGroup(java.lang.String groupName,
                                     ReportEvent event)
Returns true if the events current groupname is equal to the group name.

Parameters:
groupName - the group name.
event - the report event.
Returns:
A boolean.

isDefinedPrepareRunLevel

public static boolean isDefinedPrepareRunLevel(Function f,
                                               ReportEvent event)
Returns true, if the current run level is defined for the given function and this is a prepare run.

Parameters:
f - the function.
event - the event.
Returns:
A boolean.

isLayoutLevel

public static boolean isLayoutLevel(ReportEvent event)
Returns true or false.

Parameters:
event - the report event.
Returns:
A boolean.

getCurrentGroup

public static Group getCurrentGroup(ReportEvent event)
Returns the current group instance, based on the given report event.

Parameters:
event - the event which is base for the action.
Returns:
the current group of the event, never null.