James Moger
2011-04-04 fc84260e4238fda10842c1bd3b9fb0cb74b95426
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * Created on Dec 11, 2007
 */
package com.codecommit.wicket;
 
import java.awt.Color;
 
/**
 * @author Daniel Spiewak
 */
public class LinearStripesFill implements ILinearStripesFill {
    private int angle = -1;
    private Color[] colors;
    private double[] widths;
    
    public LinearStripesFill(int angle, Color[] colors, double[] widths) {
        if (colors.length != widths.length) {
            throw new IllegalArgumentException("Must be same number of colors as widths");
        }
        
        this.angle = angle;
        this.colors = colors;
        this.widths = widths;
    }
    
    public int getAngle() {
        return angle;
    }
 
    public Color[] getColors() {
        return colors;
    }
 
    public double[] getWidths() {
        return widths;
    }
 
    public void setAngle(int angle) {
        this.angle = angle;
    }
 
    public void setColors(Color[] colors) {
        this.colors = colors;
    }
 
    public void setWidths(double[] widths) {
        this.widths = widths;
    }
}