Coverage Report - org.seasar.uruma.component.jface.ControlComponent
 
Classes in this File Line Coverage Branch Coverage Complexity
ControlComponent
60%
6/10
N/A
0
 
 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.widgets.Control;
 19  
 import org.seasar.uruma.annotation.ComponentAttribute;
 20  
 import org.seasar.uruma.annotation.FieldDescription;
 21  
 import org.seasar.uruma.annotation.RenderingPolicy;
 22  
 import org.seasar.uruma.annotation.RenderingPolicy.ConversionType;
 23  
 import org.seasar.uruma.annotation.RenderingPolicy.TargetType;
 24  
 import org.seasar.uruma.component.EnablesDependable;
 25  
 import org.seasar.uruma.component.LayoutDataInfo;
 26  
 import org.seasar.uruma.component.UIControlComponent;
 27  
 import org.seasar.uruma.component.base.AbstractUIComponent;
 28  
 
 29  
 /**
 30  
  * {@link Control} を表す基底コンポーネントクラスです。<br />
 31  
  * 
 32  
  * @author y-komori
 33  
  */
 34  1360
 public abstract class ControlComponent extends AbstractUIComponent implements
 35  
         UIControlComponent, EnablesDependable {
 36  
     private LayoutDataInfo layoutDataInfo;
 37  
 
 38  
     @RenderingPolicy(conversionType = ConversionType.COLOR)
 39  
     @ComponentAttribute
 40  
     @FieldDescription("背景色")
 41  
     public String background;
 42  
 
 43  
     @RenderingPolicy(targetType = TargetType.NONE)
 44  
     @ComponentAttribute
 45  
     @FieldDescription("背景イメージパス")
 46  
     public String backgroundImage;
 47  
 
 48  
     @RenderingPolicy(conversionType = ConversionType.BOOLEAN)
 49  
     @ComponentAttribute
 50  
     @FieldDescription("イネーブル状態")
 51  
     public String enabled;
 52  
 
 53  
     @RenderingPolicy(targetType = TargetType.NONE)
 54  
     @ComponentAttribute
 55  
     @FieldDescription("フォント高さ")
 56  
     public String fontHeight;
 57  
 
 58  
     @RenderingPolicy(targetType = TargetType.NONE)
 59  
     @ComponentAttribute
 60  
     @FieldDescription("フォント名称")
 61  
     public String fontName;
 62  
 
 63  
     @RenderingPolicy(targetType = TargetType.NONE)
 64  
     @ComponentAttribute
 65  
     @FieldDescription("フォントスタイル")
 66  
     public String fontStyle;
 67  
 
 68  
     @RenderingPolicy(conversionType = ConversionType.COLOR)
 69  
     @ComponentAttribute
 70  
     @FieldDescription("前景色")
 71  
     public String foreground;
 72  
 
 73  
     @RenderingPolicy(targetType = TargetType.NONE)
 74  
     @ComponentAttribute
 75  
     @FieldDescription("高さ")
 76  
     public String height;
 77  
 
 78  
     @RenderingPolicy(conversionType = ConversionType.TEXT)
 79  
     @ComponentAttribute
 80  
     @FieldDescription("ツールチップテキスト")
 81  
     public String toolTipText;
 82  
 
 83  
     @RenderingPolicy(conversionType = ConversionType.BOOLEAN)
 84  
     @ComponentAttribute
 85  
     @FieldDescription("可視状態")
 86  
     public String visible;
 87  
 
 88  
     @RenderingPolicy(targetType = TargetType.NONE)
 89  
     @ComponentAttribute
 90  
     @FieldDescription("幅")
 91  
     public String width;
 92  
 
 93  
     @RenderingPolicy(targetType = TargetType.NONE)
 94  
     @ComponentAttribute
 95  
     @FieldDescription("X座標")
 96  
     public String x;
 97  
 
 98  
     @RenderingPolicy(targetType = TargetType.NONE)
 99  
     @ComponentAttribute
 100  
     @FieldDescription("Y座標")
 101  
     public String y;
 102  
 
 103  
     @RenderingPolicy(targetType = TargetType.NONE)
 104  
     @ComponentAttribute
 105  
     @FieldDescription("メニューのID")
 106  
     public String menu;
 107  
 
 108  
     @RenderingPolicy(targetType = TargetType.NONE)
 109  
     @ComponentAttribute
 110  
     @FieldDescription("依存先コンポーネントのID")
 111  
     public String enablesDependingId;
 112  
 
 113  
     @RenderingPolicy(targetType = TargetType.NONE)
 114  
     @ComponentAttribute
 115  
     @FieldDescription("依存方法")
 116  
     public String enablesFor;
 117  
 
 118  
     /*
 119  
      * @see org.seasar.uruma.component.EnablesDependable#getEnablesDependingId()
 120  
      */
 121  
     public String getEnablesDependingId() {
 122  1260
         return this.enablesDependingId;
 123  
     }
 124  
 
 125  
     /**
 126  
      * 依存先コンポーネントの ID を設定します。<br />
 127  
      * 
 128  
      * @param enablesDependingId
 129  
      *            依存先コンポーネントの ID
 130  
      */
 131  
     public void setEnablesDependingId(final String enablesDependingId) {
 132  0
         this.enablesDependingId = enablesDependingId;
 133  0
     }
 134  
 
 135  
     /*
 136  
      * @see org.seasar.uruma.component.EnablesDependable#getEnablesForType()
 137  
      */
 138  
     public String getEnablesFor() {
 139  1260
         return this.enablesFor;
 140  
     }
 141  
 
 142  
     /**
 143  
      * 依存方法を設定します。<br />
 144  
      * 
 145  
      * @param enablesFor
 146  
      *            依存方法
 147  
      */
 148  
     public void setEnablesFor(final String enablesFor) {
 149  0
         this.enablesFor = enablesFor;
 150  0
     }
 151  
 
 152  
     /*
 153  
      * @see org.seasar.uruma.component.UIControlComponent#getLayoutDataInfo()
 154  
      */
 155  
     public LayoutDataInfo getLayoutDataInfo() {
 156  1636
         return this.layoutDataInfo;
 157  
     }
 158  
 
 159  
     /*
 160  
      * @see org.seasar.uruma.component.UIControlComponent#setLayoutDataInfo(org.seasar.uruma.component.LayoutDataInfo)
 161  
      */
 162  
     public void setLayoutDataInfo(final LayoutDataInfo layoutDataInfo) {
 163  608
         this.layoutDataInfo = layoutDataInfo;
 164  608
     }
 165  
 }