01: /*
02: * Copyright 2000,2005 wingS development team.
03: *
04: * This file is part of wingS (http://wingsframework.org).
05: *
06: * wingS is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU Lesser General Public License
08: * as published by the Free Software Foundation; either version 2.1
09: * of the License, or (at your option) any later version.
10: *
11: * Please see COPYING for the complete licence.
12: */
13: package org.wings.border;
14:
15: import org.wings.style.CSSProperty;
16:
17: import java.awt.*;
18:
19: /**
20: * Draw a line border around a component.
21: * <span style="border-style: solid; border-width: 3px;">LABEL</span>
22: *
23: * @author <a href="mailto:haaf@mercatis.de">Armin Haaf</a>
24: * @author <a href="mailto:andre@lison.de">Andre Lison</a>
25: */
26: public class SLineBorder extends SAbstractBorder {
27:
28: public static final String DOTTED = "dotted";
29: public static final String DASHED = "dashed";
30: public static final String SOLID = "solid";
31:
32: private String borderStyle = SOLID;
33:
34: public SLineBorder(int thickness) {
35: super (thickness);
36: setBorderStyle(SOLID);
37: }
38:
39: public SLineBorder(Color c) {
40: super (c);
41: setBorderStyle(SOLID);
42: }
43:
44: public SLineBorder(Color c, int thickness) {
45: super (c, thickness, null);
46: setBorderStyle(SOLID);
47: }
48:
49: public SLineBorder(Color c, int thickness, Insets insets) {
50: super (c, thickness, insets);
51: setBorderStyle(SOLID);
52: }
53:
54: public SLineBorder(int thickness, Insets insets) {
55: super (Color.black, thickness, insets);
56: setBorderStyle(SOLID);
57: }
58:
59: public void setBorderStyle(String style) {
60: this .borderStyle = style;
61: setStyle(style);
62: }
63:
64: public final String getBorderStyle() {
65: return borderStyle;
66: }
67: }
|