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 org.eclipse.swt.layout.GridLayout;
19  import org.seasar.uruma.annotation.ComponentAttribute;
20  import org.seasar.uruma.annotation.ComponentElement;
21  import org.seasar.uruma.annotation.FieldDescription;
22  import org.seasar.uruma.annotation.RenderingPolicy;
23  import org.seasar.uruma.annotation.RenderingPolicy.ConversionType;
24  import org.seasar.uruma.annotation.RenderingPolicy.TargetType;
25  import org.seasar.uruma.component.LayoutInfo;
26  import org.seasar.uruma.component.base.AbstractUIElement;
27  
28  /**
29   * {@link GridLayout} に関する情報を保持するクラスです。<br />
30   * 
31   * @author y-komori
32   */
33  @ComponentElement
34  public class GridLayoutInfo extends AbstractUIElement implements
35          LayoutInfo<GridDataInfo> {
36      private GridDataInfo commonGridDataInfo;
37  
38      @RenderingPolicy(targetType = TargetType.FIELD, conversionType = ConversionType.INT)
39      @ComponentAttribute
40      @FieldDescription("horizontalSpacing 属性")
41      public String horizontalSpacing;
42  
43      @RenderingPolicy(targetType = TargetType.FIELD, conversionType = ConversionType.BOOLEAN)
44      @ComponentAttribute
45      @FieldDescription("makeColumnsEqualWidth 属性")
46      public String makeColumnsEqualWidth;
47  
48      @RenderingPolicy(targetType = TargetType.FIELD, conversionType = ConversionType.INT)
49      @ComponentAttribute
50      @FieldDescription("marginBottom 属性")
51      public String marginBottom;
52  
53      @RenderingPolicy(targetType = TargetType.FIELD, conversionType = ConversionType.INT)
54      @ComponentAttribute
55      @FieldDescription("marginHeight 属性")
56      public String marginHeight;
57  
58      @RenderingPolicy(targetType = TargetType.FIELD, conversionType = ConversionType.INT)
59      @ComponentAttribute
60      @FieldDescription("marginLeft 属性")
61      public String marginLeft;
62  
63      @RenderingPolicy(targetType = TargetType.FIELD, conversionType = ConversionType.INT)
64      @ComponentAttribute
65      @FieldDescription("marginRight 属性")
66      public String marginRight;
67  
68      @RenderingPolicy(targetType = TargetType.FIELD, conversionType = ConversionType.INT)
69      @ComponentAttribute
70      @FieldDescription("marginTop 属性")
71      public String marginTop;
72  
73      @RenderingPolicy(targetType = TargetType.FIELD, conversionType = ConversionType.INT)
74      @ComponentAttribute
75      @FieldDescription("marginWidth 属性")
76      public String marginWidth;
77  
78      @RenderingPolicy(targetType = TargetType.FIELD, conversionType = ConversionType.INT)
79      @ComponentAttribute
80      @FieldDescription("numColumns 属性")
81      public String numColumns;
82  
83      @RenderingPolicy(targetType = TargetType.FIELD, conversionType = ConversionType.INT)
84      @ComponentAttribute
85      @FieldDescription("verticalSpacing 属性")
86      public String verticalSpacing;
87  
88      /*
89       * @see org.seasar.uruma.component.LayoutInfo#getCommonLayoutDataInfo()
90       */
91      public GridDataInfo getCommonLayoutDataInfo() {
92          return commonGridDataInfo;
93      }
94  
95      /*
96       * @see org.seasar.uruma.component.LayoutInfo#setCommonLayoutDataInfo(org.seasar.uruma.component.LayoutDataInfo)
97       */
98      public void setCommonLayoutDataInfo(final GridDataInfo layoutDataInfo) {
99          this.commonGridDataInfo = layoutDataInfo;
100     }
101 }