/*
 * Copyright (C) 2016 Adam Huang <poisondog@gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.walton.cob.settingviewlibrary;

import poisondog.core.Mission;

/**
 * @author Adam Huang <poisondog@gmail.com>
 * @since 2016-12-02
 */
public class ShowAnotherItem implements Mission<SettingItem> {
	private SettingItem mCheck;

	/**
	 * Constructor
	 */
	public ShowAnotherItem(SettingItem check) {
		mCheck = check;
	}

	@Override
	public SettingItem execute(SettingItem item) {
		if(mCheck.getCheck()){
			item.setTitleVisibility(true);
			item.setTextVisibility(true);
			item.setCheckVisibility(true);
		}else{
			item.setTitleVisibility(false);
			item.setTextVisibility(false);
			item.setCheckVisibility(false);
		}
		return item;
	}
}

@@ -848,21 +848,22 @@
 ngItem m
-Check
+Hidden
 ;%0A%0A%09/**%0A
@@ -923,33 +923,36 @@
 tem 
-check
+hidden
 ) %7B%0A%09%09m
-Check = check
+Hidden = hidden
 ;%0A%09%7D
@@ -1021,14 +1021,12 @@
 %09if(
-mCheck
+item
 .get
@@ -1034,28 +1034,31 @@
 heck())%7B%0A%09%09%09
-item
+mHidden
 .setTitleVis
@@ -1071,28 +1071,31 @@
 y(true);%0A%09%09%09
-item
+mHidden
 .setTextVisi
@@ -1107,28 +1107,31 @@
 y(true);%0A%09%09%09
-item
+mHidden
 .setCheckVis
@@ -1153,28 +1153,31 @@
 %09%09%7Delse%7B%0A%09%09%09
-item
+mHidden
 .setTitleVis
@@ -1191,28 +1191,31 @@
 (false);%0A%09%09%09
-item
+mHidden
 .setTextVisi
@@ -1232,20 +1232,23 @@
 se);%0A%09%09%09
-item
+mHidden
 .setChec

update for ShowAnotherItem to switch item