2 import java
.awt
.Dimension
;
3 import java
.awt
.Graphics2D
;
4 import java
.awt
.GradientPaint
;
9 private int width
= 50;
10 private int height
= 40;
11 private int arrowLength
= 30;
12 private boolean hasParent
= true;
14 public void setX(int xPos
) {
22 public void setY(int yPos
) {
30 public int getWidth() {
34 public int getHeight() {
38 public int getArrowLength() {
42 public void setHasParent(boolean hasParent
) {
43 this.hasParent
= hasParent
;
46 public boolean hasParent() {
47 return this.hasParent
;
50 public void paintCommit(Graphics2D g2d
) {
51 Color color1
= Color
.LIGHT_GRAY
;
52 Color color2
= color1
.darker();
53 GradientPaint gp
= new GradientPaint(
55 xPos
, yPos
+ height
, color2
);
57 g2d
.fillRect(xPos
, yPos
, width
, height
);
58 g2d
.setColor(Color
.GRAY
);
59 g2d
.drawRect(xPos
, yPos
, width
, height
);
62 g2d
.drawLine(xPos
+ width
/ 2, yPos
+ height
,
63 xPos
+ width
/ 2, yPos
+ height
+ arrowLength
);