1
2 package org.catacomb.graph.gui;
3
4 import java.awt.Graphics;
5
6 import javax.swing.border.EmptyBorder;
7 import javax.swing.plaf.basic.BasicSplitPaneUI;
8
9 import javax.swing.plaf.basic.BasicSplitPaneDivider;
10
11 class VerticalAxisGraphDivider extends BasicSplitPaneDivider {
12 static final long serialVersionUID = 1001;
13
14 boolean drawLine;
15 AboveBelowSplitPanel absp;
16
17 GraphColors gcols;
18
19 VerticalAxisGraphDivider(BasicSplitPaneUI bspui, AboveBelowSplitPanel ap,
20 GraphColors gc) {
21 super(bspui);
22 absp = ap;
23 gcols = gc;
24 setBorder(new EmptyBorder(0, 0, 0, 0));
25 ap.setDependentDivider(this);
26 }
27
28
29 public void paint(Graphics g) {
30 int w = getWidth();
31 int h = getHeight();
32
33 g.setColor(gcols.getGraphBg());
34 g.fillRect(0, 0, w, h);
35
36 g.setColor(gcols.getBorderFg());
37 int iloc = absp.getDividerLocation();
38 g.drawLine(0, 0, 0, iloc + 2);
39 g.drawLine(0, iloc+2, getWidth(), iloc + 2);
40
41 g.setColor(gcols.getBorderBg());
42 g.fillRect(0, iloc+3, w, h - (iloc+3));
43 }
44
45
46 }
47