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 java.awt.*;
16:
17: /**
18: * Draw a etched border around a component.
19: * <span style="border-style: ridge; border-width: 3px;">RAISED</span>
20: * <span style="border-style: groove; border-width: 3px;">LOWERED</span>
21: *
22: * @author <a href="mailto:haaf@mercatis.de">Armin Haaf</a>
23: * @author <a href="mailto:andre@lison.de">Andre Lison</a>
24: */
25: public class SEtchedBorder extends SAbstractBorder {
26: public static final int RAISED = 0;
27: public static final int LOWERED = 1;
28:
29: int etchedType = RAISED;
30:
31: public SEtchedBorder() {
32: this (RAISED);
33: }
34:
35: public SEtchedBorder(int etchedType) {
36: this (etchedType, null);
37: }
38:
39: public SEtchedBorder(int etchedType, Insets insets) {
40: super (Color.GRAY, 2, insets);
41: setEtchedType(etchedType);
42: }
43:
44: public void setEtchedType(int etchedType) {
45: this .etchedType = etchedType;
46: setStyle(etchedType == RAISED ? "ridge" : "groove");
47: }
48:
49: public int getEtchedType() {
50: return etchedType;
51: }
52: }
|