KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > wings > SSeparator


1 /*
2  * $Id: SSeparator.java,v 1.4 2004/12/01 07:54:07 hengels Exp $
3  * Copyright 2000,2005 wingS development team.
4  *
5  * This file is part of wingS (http://www.j-wings.org).
6  *
7  * wingS is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License
9  * as published by the Free Software Foundation; either version 2.1
10  * of the License, or (at your option) any later version.
11  *
12  * Please see COPYING for the complete licence.
13  */

14 package org.wings;
15
16 import org.wings.plaf.SeparatorCG;
17
18 /**
19  * This is a separator. Example: <hr>
20  *
21  * @version $Revision: 1.4 $
22  */

23 public class SSeparator
24         extends SComponent {
25     /**
26      * shaded rule?
27      */

28     protected boolean shade = true;
29
30     /**
31      * width of the rule
32      */

33     protected int width = 0;
34
35     /**
36      * size of the rule (percent?)
37      */

38     protected int size = 0;
39
40     /**
41      * the aligment
42      */

43     protected int alignment = SConstants.NO_ALIGN;
44
45
46     /**
47      * Creates s new separator. Shade is enabled, width and size = 0.
48      */

49     public SSeparator() {
50     }
51
52
53     /**
54      * sets the alignment
55      */

56     public void setAlignment(int al) {
57         alignment = al;
58     }
59
60     /**
61      * returns the alignment
62      */

63     public int getAlignment() {
64         return alignment;
65     }
66
67     /**
68      * sets the size of the rule
69      */

70     public void setSize(int s) {
71         size = s;
72     }
73
74     /**
75      * returns the size of the rule
76      *
77      * @return the size
78      */

79     public int getSize() {
80         return size;
81     }
82
83     /**
84      * sets the width of the rule
85      *
86      * @param s the width
87      */

88     public void setWidth(int s) {
89         width = s;
90     }
91
92     /**
93      * returns the width of the rule
94      *
95      * @return the width
96      */

97     public int getWidth() {
98         return width;
99     }
100
101     /**
102      * enable or disable shading of the rule
103      *
104      * @param s shade yes or no
105      */

106     public void setShade(boolean s) {
107         shade = s;
108     }
109
110     /**
111      * returns the shading
112      *
113      * @return yes or no
114      */

115     public boolean getShade() {
116         return shade;
117     }
118
119     public void setCG(SeparatorCG cg) {
120         super.setCG(cg);
121     }
122 }
123
124
125
Popular Tags