01: /*
02: * WbScrollPane.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.gui.components;
13:
14: import java.awt.Component;
15:
16: import javax.swing.JScrollPane;
17: import javax.swing.border.Border;
18: import javax.swing.border.CompoundBorder;
19: import javax.swing.border.EmptyBorder;
20:
21: import workbench.gui.WbSwingUtilities;
22:
23: /**
24: *
25: * @author support@sql-workbench.net
26: */
27: public class WbScrollPane extends JScrollPane {
28: private static final Border MY_BORDER = new CompoundBorder(
29: WbSwingUtilities.getBevelBorder(), new EmptyBorder(0, 1, 0,
30: 0));
31:
32: public WbScrollPane() {
33: super ();
34: this .initDefaults();
35: }
36:
37: public WbScrollPane(Component view) {
38: super (view);
39: this .initDefaults();
40: }
41:
42: public WbScrollPane(Component view, int vsbPolicy, int hsbPolicy) {
43: super (view, vsbPolicy, hsbPolicy);
44: this .initDefaults();
45: }
46:
47: public WbScrollPane(int vsbPolicy, int hsbPolicy) {
48: super (vsbPolicy, hsbPolicy);
49: this .initDefaults();
50: }
51:
52: private void initDefaults() {
53: this.setBorder(MY_BORDER);
54: }
55:
56: }
|