configtool/com.nokia.S60CT.CenRep.edit/src/s60cenrep/provider/BrowserKeyByValue.java
changeset 0 30eb2d538f02
equal deleted inserted replaced
-1:000000000000 0:30eb2d538f02
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 package s60cenrep.provider;
       
    18 
       
    19 import org.eclipse.emf.common.notify.AdapterFactory;
       
    20 
       
    21 import cenrep.Key;
       
    22 
       
    23 public class BrowserKeyByValue extends BrowserKeyAbstract {
       
    24 
       
    25 	public BrowserKeyByValue(AdapterFactory adapterFactory) {
       
    26 		super(adapterFactory);
       
    27 	}
       
    28 
       
    29 	@Override
       
    30 	public String getText(Object object) {
       
    31 		String result = ((Key)object).getIdent();
       
    32 		return result == null || result.length() == 0 ?
       
    33 				getString("_UI_No_Value") :
       
    34 					result;
       
    35 	}
       
    36 
       
    37 }