1 package org.catacomb.druid.gui.base;
2
3 import org.catacomb.report.E;
4
5
6 public class DruFlowPanel extends DruPanel {
7
8 static final long serialVersionUID = 1001;
9
10 public final static int LEFT = 9;
11 public final static int CENTER = 10;
12 public final static int RIGHT = 11;
13
14
15 public DruFlowPanel() {
16 this(CENTER, 0, 0);
17 }
18
19
20 public DruFlowPanel(int dir) {
21 this(dir, 0, 0);
22 }
23
24
25 public DruFlowPanel(int dir, int dx, int dy) {
26 super();
27 applyLayout(dir, dx, dy);
28 }
29
30
31
32 public void applyLayout(int dir, int dx, int dy) {
33 if (dir == LEFT) {
34 setFlowLeft(dx, dy);
35
36 } else if (dir == RIGHT) {
37 setFlowRight(dx, dy);
38
39 } else if (dir == CENTER) {
40 setFlowCenter(dx, dy);
41 } else {
42 E.error("unrecognized direction " + dir);
43 setFlowCenter(dx, dy);
44 }
45 }
46
47
48 }