Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/exports/ExportSection.java @ 3555:b1912514e0f5
s/container.size() == 0/container.isEmpty()/
flys-artifacts/trunk@5149 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 28 Jul 2012 21:48:15 +0000 |
parents | ca8997aa683e |
children |
rev | line source |
---|---|
2056
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.exports; |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 /** |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 */ |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 public class ExportSection extends TypeSection { |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 public static final String WIDTH_ATTR = "width"; |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 public static final String HEIGHT_ATTR = "height"; |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 public ExportSection() { |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 super("export"); |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 } |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 public void setWidth(int width) { |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 if (width <= 0) { |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 return; |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 } |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 setIntegerValue(WIDTH_ATTR, width); |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 } |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 public Integer getWidth() { |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 return getIntegerValue(WIDTH_ATTR); |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 } |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 public void setHeight(int height) { |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 if (height <= 0) { |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 return; |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 } |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 setIntegerValue(HEIGHT_ATTR, height); |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 } |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 public Integer getHeight() { |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 return getIntegerValue(HEIGHT_ATTR); |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 } |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 } |
76eeb3b4358e
Added an ExportSection to ChartSettings which provides attributes for chart 'width' and 'height'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |