package kr.co.icontrols.ilp300_700.admin.setting;

import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.util.Log;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
import android.widget.RelativeLayout;

import kr.co.icontrols.ilp300_700.MainActivity;
import kr.co.icontrols.ilp300_700.R;
import kr.co.icontrols.ilp300_700.global.Configure.ConfigValue;
import kr.co.icontrols.ilp300_700.global.DataClasses.POSITION;
import kr.co.icontrols.ilp300_700.global.Declare;
import kr.co.icontrols.ilp300_700.global.Enumeration.DATAINPUTSCREEN;
import kr.co.icontrols.ilp300_700.global.Enumeration.DATAINPUTSTEP;
import kr.co.icontrols.ilp300_700.global.Global;
import kr.co.icontrols.ilp300_700.global.ID;
import kr.co.icontrols.wallpadsupport.WpadImageView;
import kr.co.icontrols.wallpadsupport.WpadScreen;
import kr.co.icontrols.wallpadsupport.WpadTextView;

public class AdminSet_Setting_SyncSetupInfo extends WpadScreen {

    static final String TAG = "AdminSet_Setting_SyncSetupInfo";

    protected final boolean DEBUG_LOG_ON = false;
    boolean bLOG = true;   // true, false
    boolean bLOG_DEBUG = false;   // true, false
    boolean bLOG_INFO = false;   // true, false
    Context mContext;
    WpadImageView Image_Background;
    WpadTextView Text_Title;
    WpadTextView Text_Line_01_Item;
    WpadTextView Text_Line_02_Item;
    WpadTextView Text_Line_03_Item;
    WpadTextView Text_Line_04_Item;
    WpadTextView Text_Line_05_Item;
    WpadTextView Text_Line_06_Item;
    WpadTextView Text_Line_01_Input;
    WpadTextView Text_Line_02_Input;
    WpadTextView Text_Line_03_Input;
    WpadTextView Text_Line_04_Input;
    WpadTextView Text_Line_05_Input;
    WpadTextView Text_Line_06_Input;
    int TextColor_Normal = Color.WHITE;
    int TextColor_Highlight = Color.GREEN;
    int nFontSize_Instruction = 28;
    boolean bFontNonBold = false;
    boolean bFontBold = true;
    String strText_Title = "메인/서브 설정";
    String strText_Line_01_Item = "1] 메인";
    String strText_Line_02_Item = "2] 서브";
    String strText_Line_03_Item = "서브 로비폰 개수";
    String strText_Line_04_Item = "순서 ( 1 )";
    String strText_Line_05_Item = "서브 로비폰 ID";
    String strText_Line_06_Item = "메인 로비폰 ID";
    String strText_Line_01_Input = "";
    String strText_Line_02_Input = "";
    String strText_Line_03_Input = "";
    String strText_Line_04_Input = "";
    String strText_Line_05_Input = "";
    String strText_Line_06_Input = "";
    int nLineNum = 0;
    public AdminSet_Setting_SyncSetupInfo(Context context, RelativeLayout layout) {
        super(context, layout);
        try {
            Log.d(TAG, "------------------ [START - AdminSet_Setting_SyncSetupInfo] -------------------");

            mContext = context;

            Initialize();

            Image_Background = new WpadImageView(context, 0, Declare.DeviceInfo.getScreenSizeFullW(ConfigValue.DEVICE_MODELTYPE), Declare.DeviceInfo.getScreenSizeFullH(ConfigValue.DEVICE_MODELTYPE), R.drawable.bg_back, 0, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.IMAGES.BACKGROUND);
            ViewRegistration(layout, Image_Background, 0, 0);

            Text_Title = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.TITLE).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.TITLE).H, Gravity.CENTER, Color.WHITE, nFontSize_Instruction, bFontBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.TITLE);
            ViewRegistration(layout, Text_Title, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.TITLE).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.TITLE).Y);
            Text_Title.setText(strText_Title);

            Text_Line_01_Item = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_01_Item).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_01_Item).H, Gravity.LEFT, Color.WHITE, nFontSize_Instruction, bFontNonBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_01_Item);
            ViewRegistration(layout, Text_Line_01_Item, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_01_Item).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_01_Item).Y);
            Text_Line_01_Item.setText(strText_Line_01_Item);

            Text_Line_02_Item = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_02_Item).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_02_Item).H, Gravity.LEFT, Color.WHITE, nFontSize_Instruction, bFontNonBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_02_Item);
            ViewRegistration(layout, Text_Line_02_Item, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_02_Item).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_02_Item).Y);
            Text_Line_02_Item.setText(strText_Line_02_Item);

            Text_Line_03_Item = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_03_Item).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_03_Item).H, Gravity.LEFT, Color.WHITE, nFontSize_Instruction, bFontNonBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_03_Item);
            ViewRegistration(layout, Text_Line_03_Item, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_03_Item).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_03_Item).Y);
            Text_Line_03_Item.setText(strText_Line_03_Item);

            Text_Line_04_Item = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_04_Item).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_04_Item).H, Gravity.LEFT, Color.WHITE, nFontSize_Instruction, bFontNonBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_04_Item);
            ViewRegistration(layout, Text_Line_04_Item, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_04_Item).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_04_Item).Y);
            Text_Line_04_Item.setText(strText_Line_04_Item);

            Text_Line_05_Item = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_05_Item).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_05_Item).H, Gravity.LEFT, Color.WHITE, nFontSize_Instruction, bFontNonBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_05_Item);
            ViewRegistration(layout, Text_Line_05_Item, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_05_Item).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_05_Item).Y);
            Text_Line_05_Item.setText(strText_Line_05_Item);

            Text_Line_06_Item = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_06_Item).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_06_Item).H, Gravity.LEFT, Color.WHITE, nFontSize_Instruction, bFontNonBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_06_Item);
            ViewRegistration(layout, Text_Line_06_Item, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_06_Item).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_06_Item).Y);
            Text_Line_06_Item.setText(strText_Line_06_Item);

            Text_Line_01_Input = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_01_Input).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_01_Input).H, Gravity.LEFT, Color.WHITE, nFontSize_Instruction, bFontNonBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_01_Input);
            ViewRegistration(layout, Text_Line_01_Input, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_01_Input).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_01_Input).Y);
            Text_Line_01_Input.setText("( " + strText_Line_01_Input + " )");

            Text_Line_02_Input = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_02_Input).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_02_Input).H, Gravity.LEFT, Color.WHITE, nFontSize_Instruction, bFontNonBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_02_Input);
            ViewRegistration(layout, Text_Line_02_Input, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_02_Input).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_02_Input).Y);
            Text_Line_02_Input.setText("[ " + strText_Line_02_Input + " ]");

            Text_Line_03_Input = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_03_Input).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_03_Input).H, Gravity.LEFT, Color.WHITE, nFontSize_Instruction, bFontNonBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_03_Input);
            ViewRegistration(layout, Text_Line_03_Input, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_03_Input).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_03_Input).Y);
            Text_Line_03_Input.setText("[ " + strText_Line_03_Input + " ]");

            Text_Line_04_Input = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_04_Input).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_04_Input).H, Gravity.LEFT, Color.WHITE, nFontSize_Instruction, bFontNonBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_04_Input);
            ViewRegistration(layout, Text_Line_04_Input, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_04_Input).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_04_Input).Y);
            Text_Line_04_Input.setText("[ " + strText_Line_04_Input + " ]");

            Text_Line_05_Input = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_05_Input).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_05_Input).H, Gravity.LEFT, Color.WHITE, nFontSize_Instruction, bFontNonBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_05_Input);
            ViewRegistration(layout, Text_Line_05_Input, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_05_Input).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_05_Input).Y);
            Text_Line_05_Input.setText("[ " + strText_Line_05_Input + " ]");

            Text_Line_06_Input = new WpadTextView(context, false, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_06_Input).W, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_06_Input).H, Gravity.LEFT, Color.WHITE, nFontSize_Instruction, bFontNonBold, ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_06_Input);
            ViewRegistration(layout, Text_Line_06_Input, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_06_Input).X, getPosition(ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_06_Input).Y);
            Text_Line_06_Input.setText("[ " + strText_Line_06_Input + " ]");

            UpdateScreen();
            ((MainActivity) mContext).setAutoScreenChange(ID.SCREENS.Main, MainActivity.nAdminScreenTimeout);
        } catch (Exception e) {
            Log.d(TAG, "[Exception] AdminSet_Setting_SyncSetupInfo(...) : " + e);
        }
    }

    private void LOG(String log) {
        if (bLOG) Log.v(TAG, log);
    }

    private void LOG_DEBUG(String log) {
        if (bLOG_DEBUG) Log.d(TAG, log);
    }

    private void LOG_INFO(String log) {
        if (bLOG_INFO) Log.i(TAG, log);
    }

    protected void DebugLogOutput(String s) {
        if (!this.DEBUG_LOG_ON) {
            return;
        }
        Log.d(TAG, s);
    }

    protected void Initialize() {
        // 해당 Screen을 초기화하기위한 함수
//      Log.d(TAG, "[Initialize] Start!!");
        try {
            Global.DataInputScreen = DATAINPUTSCREEN.DETAIL_02;

            strText_Line_01_Input = ConfigValue.strDevice_Dong;
            strText_Line_02_Input = String.valueOf(ConfigValue.LineInfo.getCnt());
        } catch (Exception e) {
            Log.d(TAG, "[Exception] Initialize() : " + e);
        }
    }

    @Override
    protected void onClose() {
        Log.d(TAG, "------------------ [onClose - AdminSet_Setting_SyncSetupInfo] -------------------");
        try {
        } catch (Exception e) {
            Log.d(TAG, "[Exception] onClose() : " + e);
        }
        super.onClose();
    }

    @Override
    protected void onBrReceive(Intent intent) {
        Log.d(TAG, "[onBrReceive] Start!!");
        try {
            Log.d(TAG, "[onBrReceive] Intent : " + intent);
        } catch (Exception e) {
            Log.d(TAG, "[Exception] onBrReceive(...) : " + e);
        }
        super.onBrReceive(intent);
    }

    @Override
    protected void onKeyDown(int keyCode, KeyEvent event) {
        try {
//            Log.d(TAG, "[onKeyDown] keyCode [" + keyCode + "], event [" + event + "]");

            if (Declare.Button.NUMBER_00 <= keyCode && keyCode <= Declare.Button.NUMBER_09) {
                if (Global.DataInputScreen == DATAINPUTSCREEN.DETAIL_01) {
                    if (Global.DataInputStep == DATAINPUTSTEP.INPUT_02) {
                        strText_Line_02_Input += keyCode - 7;

                        if (strText_Line_02_Input.length() > 2) {
                            strText_Line_02_Input = String.valueOf(Integer.parseInt(strText_Line_02_Input.substring(1)));
                        }
                    }
                } else if (Global.DataInputScreen == DATAINPUTSCREEN.DETAIL_02) {
                    if (Global.DataInputStep == DATAINPUTSTEP.INPUT_03) {
                        strText_Line_01_Input += keyCode - 7;

                        if (strText_Line_01_Input.length() > 2) {
                            strText_Line_01_Input = strText_Line_01_Input.substring(1);
                        }
                    } else if (Global.DataInputStep == DATAINPUTSTEP.INPUT_04) {
                        strText_Line_02_Input += keyCode - 7;

                        if (strText_Line_02_Input.length() > 2) {
                            strText_Line_02_Input = String.valueOf(Integer.parseInt(strText_Line_02_Input.substring(1)));
                        }
                    } else if (Global.DataInputStep == DATAINPUTSTEP.INPUT_05) {
                        strText_Line_03_Input += keyCode - 7;

                        if (strText_Line_03_Input.length() > 2) {
                            strText_Line_03_Input = String.valueOf(Integer.parseInt(strText_Line_03_Input.substring(1)));
                        }
                    }
                }
                UpdateScreen();
            } else if (keyCode == Declare.Button.STAR) {
                if (Global.DataInputScreen == DATAINPUTSCREEN.DETAIL_02) {
                    if (Global.DataInputStep == DATAINPUTSTEP.INPUT_03) {
                        Global.DataInputStep = DATAINPUTSTEP.INPUT_04;
                    } else if (Global.DataInputStep == DATAINPUTSTEP.INPUT_04) {
                        Global.DataInputStep = DATAINPUTSTEP.INPUT_05;
                    } else if (Global.DataInputStep == DATAINPUTSTEP.INPUT_03) {
                        Global.DataInputStep = DATAINPUTSTEP.INPUT_01;
                    }
                }
                UpdateScreen();
            } else if (keyCode == Declare.Button.GUARD) {
                // 설정정보를 저장하는 기능을 정의한다.
                if (Global.DataInputScreen == DATAINPUTSCREEN.DETAIL_01) {
                    nLineNum = Integer.parseInt(strText_Line_02_Input);
                    Global.DataInputScreen = DATAINPUTSCREEN.DETAIL_02;
                    UpdateScreen();
                } else if (Global.DataInputScreen == DATAINPUTSCREEN.DETAIL_02) {
                    // 입력값을 저장합니다.
                }
            } else if (keyCode == Declare.Button.CANCEL || keyCode == Declare.Button.TACT_CANCEL) {
                if (Global.DataInputScreen == DATAINPUTSCREEN.DETAIL_01) {
                    super.setChangeScreen(ID.SCREENS.AdminSet_Setting);
                } else if (Global.DataInputScreen == DATAINPUTSCREEN.DETAIL_02) {
                    strText_Line_02_Input = String.valueOf(nLineNum);
                    Global.DataInputScreen = DATAINPUTSCREEN.DETAIL_01;
                    UpdateScreen();
                }
            }
        } catch (Exception e) {
            Log.d(TAG, "[Exception] onKeyDown(...) : " + e);
        }
        super.onKeyDown(keyCode, event);
    }

    protected void UpdateVisibility() {
//        Log.d(TAG, "[UpdateVisibility] Start!!");
        try {
            if (Global.DataInputScreen == DATAINPUTSCREEN.DETAIL_01) {
                Text_Line_01_Item.setVisibility(View.VISIBLE);
                Text_Line_02_Item.setVisibility(View.VISIBLE);
                Text_Line_03_Item.setVisibility(View.INVISIBLE);
                Text_Line_04_Item.setVisibility(View.INVISIBLE);
                Text_Line_05_Item.setVisibility(View.INVISIBLE);

                Text_Line_01_Input.setVisibility(View.VISIBLE);
                Text_Line_02_Input.setVisibility(View.VISIBLE);
                Text_Line_03_Input.setVisibility(View.INVISIBLE);
                Text_Line_04_Input.setVisibility(View.INVISIBLE);
                Text_Line_05_Input.setVisibility(View.INVISIBLE);
            } else if (Global.DataInputScreen == DATAINPUTSCREEN.DETAIL_02) {
                Text_Line_01_Item.setVisibility(View.INVISIBLE);
                Text_Line_02_Item.setVisibility(View.INVISIBLE);
                Text_Line_03_Item.setVisibility(View.VISIBLE);
                Text_Line_04_Item.setVisibility(View.VISIBLE);
                Text_Line_05_Item.setVisibility(View.VISIBLE);

                Text_Line_01_Input.setVisibility(View.INVISIBLE);
                Text_Line_02_Input.setVisibility(View.INVISIBLE);
                Text_Line_03_Input.setVisibility(View.VISIBLE);
                Text_Line_04_Input.setVisibility(View.VISIBLE);
                Text_Line_05_Input.setVisibility(View.VISIBLE);
            }
        } catch (Exception e) {
            Log.d(TAG, "[Exception] UpdateVisibility() : " + e);
        }
    }

    protected void UpdateScreen() {
//        Log.d(TAG, "[updateScreen] Start!!");
        try {
            if (Global.DataInputScreen == DATAINPUTSCREEN.DETAIL_01) {
                UpdateVisibility();

                Text_Line_02_Input.setText("[ " + strText_Line_02_Input + " ]");

                Text_Line_01_Item.setTextColor(TextColor_Normal);
                Text_Line_02_Item.setTextColor(TextColor_Highlight);
                Text_Line_01_Input.setTextColor(TextColor_Normal);
                Text_Line_02_Input.setTextColor(TextColor_Highlight);
            } else if (Global.DataInputScreen == DATAINPUTSCREEN.DETAIL_02) {
                UpdateVisibility();

                if (Global.DataInputStep == DATAINPUTSTEP.INPUT_03) {
                    Text_Line_03_Input.setText("[ " + strText_Line_03_Input + " ]");

                    Text_Line_03_Item.setTextColor(TextColor_Highlight);
                    Text_Line_04_Item.setTextColor(TextColor_Normal);
                    Text_Line_05_Item.setTextColor(TextColor_Normal);
                    Text_Line_03_Input.setTextColor(TextColor_Highlight);
                    Text_Line_04_Input.setTextColor(TextColor_Normal);
                    Text_Line_05_Input.setTextColor(TextColor_Normal);
                } else if (Global.DataInputStep == DATAINPUTSTEP.INPUT_04) {
                    Text_Line_04_Input.setText("[ " + strText_Line_04_Input + " ]");

                    Text_Line_03_Item.setTextColor(TextColor_Normal);
                    Text_Line_04_Item.setTextColor(TextColor_Highlight);
                    Text_Line_05_Item.setTextColor(TextColor_Normal);
                    Text_Line_03_Input.setTextColor(TextColor_Normal);
                    Text_Line_04_Input.setTextColor(TextColor_Highlight);
                    Text_Line_05_Input.setTextColor(TextColor_Normal);
                } else if (Global.DataInputStep == DATAINPUTSTEP.INPUT_05) {
                    Text_Line_05_Input.setText("[ " + strText_Line_05_Input + " ]");

                    Text_Line_03_Item.setTextColor(TextColor_Normal);
                    Text_Line_04_Item.setTextColor(TextColor_Normal);
                    Text_Line_05_Item.setTextColor(TextColor_Highlight);
                    Text_Line_03_Input.setTextColor(TextColor_Normal);
                    Text_Line_04_Input.setTextColor(TextColor_Normal);
                    Text_Line_05_Input.setTextColor(TextColor_Highlight);
                } else {
                    Text_Line_03_Item.setTextColor(TextColor_Normal);
                    Text_Line_04_Item.setTextColor(TextColor_Normal);
                    Text_Line_05_Item.setTextColor(TextColor_Normal);
                    Text_Line_03_Input.setTextColor(TextColor_Normal);
                    Text_Line_04_Input.setTextColor(TextColor_Normal);
                    Text_Line_05_Input.setTextColor(TextColor_Normal);
                }
            }
        } catch (Exception e) {
            Log.d(TAG, "[Exception] updateScreen() : " + e);
        }
    }

    public POSITION getPosition(int nID) {
//        Log.d(TAG, "[getPosition] Start!!");

        POSITION position = new POSITION();
        position.SetPosition(0, 0, 480, 272);

        try {
            switch (nID) {
                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.IMAGES.BACKGROUND:
                    position.SetPosition(0, 0, 480, 272);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.TITLE:
                    position.SetPosition(0, 24, 480, 40);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_01_Item:
                    position.SetPosition(50, 104, 145, 40);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_02_Item:
                    position.SetPosition(50, 154, 145, 40);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_03_Item:
                    position.SetPosition(30, 84, 165, 40);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_04_Item:
                    position.SetPosition(30, 134, 165, 40);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_05_Item:
                    position.SetPosition(30, 184, 165, 40);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_06_Item:
                    position.SetPosition(30, 184, 165, 40);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_01_Input:
                    position.SetPosition(205, 104, 205, 40);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_02_Input:
                    position.SetPosition(205, 154, 205, 40);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_03_Input:
                    position.SetPosition(205, 84, 245, 40);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_04_Input:
                    position.SetPosition(205, 134, 245, 40);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_05_Input:
                    position.SetPosition(205, 184, 245, 40);
                    return position;

                case ID.SCREENS.ADMINSET_SETTING_MAINSUB.ELEMENTS.TEXTS.LINE_06_Input:
                    position.SetPosition(205, 184, 245, 40);
                    return position;

                default:
                    return position;
            }
        } catch (Exception e) {
            Log.d(TAG, "[Exception] getPosition() : " + e);
            return position;
        }
    }


}