Coverage Report - org.seasar.uruma.binding.enables.EnablesDependingDef
 
Classes in this File Line Coverage Branch Coverage Complexity
EnablesDependingDef
100%
8/8
N/A
1
 
 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.binding.enables;
 17  
 
 18  
 import org.seasar.uruma.context.WidgetHandle;
 19  
 
 20  
 /**
 21  
  * 他コンポーネントの選択状態によってイネーブル状態が変化するコントロールを表すクラスです。<br />
 22  
  * 
 23  
  * @author bskuroneko
 24  
  */
 25  
 public class EnablesDependingDef {
 26  
 
 27  
     private WidgetHandle handle;
 28  
 
 29  
     private String targetId;
 30  
 
 31  
     private EnablesForType type;
 32  
 
 33  
     /**
 34  
      * {@link EnablesDependingDef} オブジェクトを構築します。<br />
 35  
      * <code>targetId</code> で指定した id を持つコンポーネントが、<code>type</code>
 36  
      * の表す状態になった場合、<code>handle</code> がイネーブルとなります。
 37  
      * 
 38  
      * @param handle
 39  
      *            イネーブル状態を変更するウィジットを保持する {@link WidgetHandle}
 40  
      * @param targetId
 41  
      *            監視するターゲットコンポーネントの id
 42  
      * @param type
 43  
      *            <code>handle</code> をイネーブルにする条件となるターゲットコンポーネントの状態
 44  
      */
 45  
     public EnablesDependingDef(final WidgetHandle handle,
 46  40
             final String targetId, final EnablesForType type) {
 47  40
         this.handle = handle;
 48  40
         this.targetId = targetId;
 49  40
         this.type = type;
 50  40
     }
 51  
 
 52  
     /**
 53  
      * 依存先コンポーネントのIDを取得します。<br />
 54  
      * 
 55  
      * @return 依存先コンポーネントのID
 56  
      */
 57  
     public String getTargetId() {
 58  40
         return this.targetId;
 59  
     }
 60  
 
 61  
     /**
 62  
      * イネーブル条件を取得します。<br />
 63  
      * 
 64  
      * @return イネーブル条件
 65  
      */
 66  
     public EnablesForType getType() {
 67  40
         return this.type;
 68  
     }
 69  
 
 70  
     /**
 71  
      * {@link WidgetHandle} を取得します。<br />
 72  
      * 
 73  
      * @return {@link WidgetHandle} オブジェクト
 74  
      */
 75  
     public WidgetHandle getWidgetHandle() {
 76  40
         return this.handle;
 77  
     }
 78  
 }