summaryrefslogtreecommitdiff
path: root/reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@sun.com>2009-11-19 09:03:57 +0100
committerOcke Janssen [oj] <Ocke.Janssen@sun.com>2009-11-19 09:03:57 +0100
commit78155803fd8f1e7d6eb9f0af390a4a928d2fb9cd (patch)
treeccbf1863a72b8c39a7301c2ea856e77c95fdd933 /reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java
parent563af76127ad7c1d20b21c1e8433b6122b34608f (diff)
dba33d: #i102563# use rootURL to resolve the given URI and some refactoring
Diffstat (limited to 'reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java')
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java108
1 files changed, 52 insertions, 56 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java b/reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java
index df1de0154e6a..a3c9838be19d 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/model/ReportElement.java
@@ -27,8 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
-
package com.sun.star.report.pentaho.model;
import java.util.ArrayList;
@@ -47,69 +45,67 @@ import java.util.List;
*/
public abstract class ReportElement extends Element
{
- private final List formatConditions;
- protected ReportElement()
- {
- formatConditions = new ArrayList();
- }
+ private final List formatConditions;
- /**
- * Checks the current group and prints this element only if the current row is
- * the first row for that particular group.
- *
- * @return true, if the element should only be printed in the first row of the
- * current group, false otherwise.
- */
- public boolean isPrintWhenGroupChanges()
- {
- return OfficeToken.TRUE.equals(getAttribute
- (OfficeNamespaces.OOREPORT_NS, "print-when-group-changes"));
- }
+ protected ReportElement()
+ {
+ formatConditions = new ArrayList();
+ }
- public void setPrintWhenGroupChanges(final boolean printWhenGroupChanges)
- {
- setAttribute(OfficeNamespaces.OOREPORT_NS, "print-when-group-changes",
- String.valueOf(printWhenGroupChanges));
- }
+ /**
+ * Checks the current group and prints this element only if the current row is
+ * the first row for that particular group.
+ *
+ * @return true, if the element should only be printed in the first row of the
+ * current group, false otherwise.
+ */
+ public boolean isPrintWhenGroupChanges()
+ {
+ return OfficeToken.TRUE.equals(getAttribute(OfficeNamespaces.OOREPORT_NS, "print-when-group-changes"));
+ }
- /**
- * Checks, whether the printed value has been changed since the last run. The
- * element will only be printed, if there was at least one change.
- *
- * @return true, if repeated values should be printed, false if repeated
- * values should be surpressed.
- */
- public boolean isPrintRepeatedValues()
- {
- return OfficeToken.TRUE.equals(getAttribute
- (OfficeNamespaces.OOREPORT_NS, "print-repeated-values"));
- }
+ public void setPrintWhenGroupChanges(final boolean printWhenGroupChanges)
+ {
+ setAttribute(OfficeNamespaces.OOREPORT_NS, "print-when-group-changes",
+ String.valueOf(printWhenGroupChanges));
+ }
- public void setPrintRepeatedValues(final boolean printRepeatedValues)
- {
- setAttribute(OfficeNamespaces.OOREPORT_NS, "print-repeated-values",
- String.valueOf(printRepeatedValues));
- }
+ /**
+ * Checks, whether the printed value has been changed since the last run. The
+ * element will only be printed, if there was at least one change.
+ *
+ * @return true, if repeated values should be printed, false if repeated
+ * values should be surpressed.
+ */
+ public boolean isPrintRepeatedValues()
+ {
+ return OfficeToken.TRUE.equals(getAttribute(OfficeNamespaces.OOREPORT_NS, "print-repeated-values"));
+ }
- public void addFormatCondition(final FormatCondition formatCondition)
- {
- if (formatCondition == null)
+ public void setPrintRepeatedValues(final boolean printRepeatedValues)
{
- throw new NullPointerException();
+ setAttribute(OfficeNamespaces.OOREPORT_NS, "print-repeated-values",
+ String.valueOf(printRepeatedValues));
}
- this.formatConditions.add(formatCondition);
- }
+ public void addFormatCondition(final FormatCondition formatCondition)
+ {
+ if (formatCondition == null)
+ {
+ throw new NullPointerException();
+ }
+
+ this.formatConditions.add(formatCondition);
+ }
- public FormatCondition[] getFormatConditions ()
- {
- return (FormatCondition[]) this.formatConditions.toArray
- (new FormatCondition[this.formatConditions.size()]);
- }
+ public FormatCondition[] getFormatConditions()
+ {
+ return (FormatCondition[]) this.formatConditions.toArray(new FormatCondition[this.formatConditions.size()]);
+ }
- public int getFormatConditionCount ()
- {
- return formatConditions.size();
- }
+ public int getFormatConditionCount()
+ {
+ return formatConditions.size();
+ }
}