Coverage Report - org.seasar.uruma.component.jface.ToolItemComponent
 
Classes in this File Line Coverage Branch Coverage Complexity
ToolItemComponent
100%
7/7
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.ToolItem;
 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.EnablesDependable;
 26  
 import org.seasar.uruma.component.base.AbstractItemComponent;
 27  
 
 28  
 /**
 29  
  * {@link ToolItem} を表すコンポーネントです。<br />
 30  
  * 
 31  
  * @author bskuroneko
 32  
  */
 33  
 @ComponentElement
 34  84
 public class ToolItemComponent extends AbstractItemComponent implements
 35  
         EnablesDependable {
 36  
 
 37  
     @RenderingPolicy(conversionType = ConversionType.IMAGE)
 38  
     @ComponentAttribute
 39  
     @FieldDescription("選択不可時イメージパス")
 40  
     public String disabledImage;
 41  
 
 42  
     @RenderingPolicy(conversionType = ConversionType.BOOLEAN)
 43  
     @ComponentAttribute
 44  
     @FieldDescription("選択可能状態")
 45  
     public String enabled;
 46  
 
 47  
     @RenderingPolicy(conversionType = ConversionType.IMAGE)
 48  
     @ComponentAttribute
 49  
     @FieldDescription("選択時イメージパス")
 50  
     public String hotImage;
 51  
 
 52  
     @RenderingPolicy(conversionType = ConversionType.BOOLEAN)
 53  
     @ComponentAttribute
 54  
     @FieldDescription("選択状態")
 55  
     public String selection;
 56  
 
 57  
     @RenderingPolicy(conversionType = ConversionType.TEXT)
 58  
     @ComponentAttribute
 59  
     @FieldDescription("ツールチップテキスト")
 60  
     public String toolTipText;
 61  
 
 62  
     @RenderingPolicy(conversionType = ConversionType.INT)
 63  
     @ComponentAttribute
 64  
     @FieldDescription("幅")
 65  
     public String width;
 66  
 
 67  
     @RenderingPolicy(targetType = TargetType.NONE)
 68  
     @ComponentAttribute
 69  
     @FieldDescription("依存先コンポーネントのID")
 70  
     public String enablesDependingId;
 71  
 
 72  
     @RenderingPolicy(targetType = TargetType.NONE)
 73  
     @ComponentAttribute
 74  
     @FieldDescription("依存方法")
 75  
     public String enablesFor;
 76  
 
 77  
     /*
 78  
      * @see org.seasar.uruma.component.EnablesDependable#getEnablesDependingId()
 79  
      */
 80  
     public String getEnablesDependingId() {
 81  84
         return this.enablesDependingId;
 82  
     }
 83  
 
 84  
     /**
 85  
      * 依存先コンポーネントの ID を設定します。<br />
 86  
      * 
 87  
      * @param enablesDependingId
 88  
      *            依存先コンポーネントの ID
 89  
      */
 90  
     public void setEnablesDependingId(final String enablesDependingId) {
 91  20
         this.enablesDependingId = enablesDependingId;
 92  20
     }
 93  
 
 94  
     /*
 95  
      * @see org.seasar.uruma.component.EnablesDependable#getEnablesForType()
 96  
      */
 97  
     public String getEnablesFor() {
 98  84
         return this.enablesFor;
 99  
     }
 100  
 
 101  
     /**
 102  
      * 依存方法を設定します。<br />
 103  
      * 
 104  
      * @param enablesFor
 105  
      *            依存方法
 106  
      */
 107  
     public void setEnablesFor(final String enablesFor) {
 108  20
         this.enablesFor = enablesFor;
 109  20
     }
 110  
 }