View Javadoc

1   /*
2    * Copyright 2004-2008 the Seasar Foundation and the Others.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
13   * either express or implied. See the License for the specific language
14   * governing permissions and limitations under the License.
15   */
16  package org.seasar.uruma.component.jface;
17  
18  import java.util.ArrayList;
19  import java.util.List;
20  
21  import org.seasar.uruma.annotation.ComponentAttribute;
22  import org.seasar.uruma.annotation.ComponentElement;
23  import org.seasar.uruma.annotation.FieldDescription;
24  import org.seasar.uruma.component.base.AbstractUIElement;
25  
26  /**
27   * グラデーション色に関する情報を保持するクラスです。<br />
28   * 
29   * @author y-komori
30   */
31  @ComponentElement
32  public class GradientInfo extends AbstractUIElement {
33      @ComponentAttribute
34      @FieldDescription("グラデーション方向")
35      public String vertical;
36  
37      @ComponentAttribute
38      @FieldDescription("開始色")
39      public String startColor;
40  
41      private List<GradientItem> items = new ArrayList<GradientItem>();
42  
43      /**
44       * {@link GradientItem} を追加します。<br />
45       * 
46       * @param item
47       *            {@link GradientItem} オブジェクト
48       */
49      public void addGradientItem(final GradientItem item) {
50          items.add(item);
51      }
52  
53      /**
54       * {@link GradientItem} のリストを取得します。<br />
55       * 
56       * @return {@link GradientItem} のリスト
57       */
58      public List<GradientItem> getGradientItems() {
59          return items;
60      }
61  }