01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.swinglets.border;
06:
07: import java.util.*;
08: import java.awt.*;
09: import java.io.*;
10:
11: import com.javelin.swinglets.*;
12: import com.javelin.swinglets.plaf.*;
13:
14: /**
15: * SMatterBorder is used to render a flat border around an SComponent.
16: * <p>
17: * This components uses a Table to create a border.
18: *
19: * @author Dino Fancellu
20: */
21:
22: public class SMatteBorder extends SBorder {
23: /**
24: * Constructs a new SMatteBorder, with each width specified. Minu numbers
25: * indicate a percentage.
26: */
27: public SMatteBorder(int top, int left, int bottom, int right,
28: SColor color) {
29: this .top = top;
30: this .left = left;
31: this .bottom = bottom;
32: this .right = right;
33: this .color = color;
34: }
35:
36: /**
37: * Constructs a new SMatteBorder, with a fixed width.
38: */
39: public SMatteBorder(int width, SColor color) {
40: this .top = width;
41: this .left = width;
42: this .bottom = width;
43: this .right = width;
44: this .color = color;
45: }
46:
47: /**
48: * Returns the name of the L&F class that renders this border.
49: */
50: public Class getUIClass() {
51: return SMatteBorder.class;
52: }
53:
54: /**
55: * Get the color.
56: */
57: public SColor getColor() {
58: return color;
59: }
60:
61: /**
62: * Set the color.
63: */
64: public void setColor(SColor color) {
65: this .color = color;
66: }
67:
68: // PRIVATE /////////////////////////////////////////////////////////////
69:
70: public int top = 1;
71: public int left = 1;
72: public int bottom = 1;
73: public int right = 1;
74:
75: protected SColor color;
76:
77: }
|