sysmodelmgr/com.symbian.smt.gui/src/com/symbian/smt/gui/ResourcesEnums.java
changeset 0 522a326673b6
equal deleted inserted replaced
-1:000000000000 0:522a326673b6
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 package com.symbian.smt.gui;
       
    17 
       
    18 public enum ResourcesEnums {
       
    19 	BORDER_SHAPES("Border Shapes"), BORDER_STYLES("Border Styles"), COLOURS(
       
    20 			"Colours"), DEPENDENCIES("Dependencies"), LEVELS("Levels"), LOCALISATION(
       
    21 			"Localisation"), PATTERNS("Patterns"), SHAPES("Shapes"), SYSTEM_INFO(
       
    22 			"System Info"), S12_XML("S12 XML");
       
    23 
       
    24 	public static ResourcesEnums getResourcesEnums(String arg) {
       
    25 		ResourcesEnums[] enums = values();
       
    26 
       
    27 		for (int i = 0; i < enums.length; i++) {
       
    28 			if (enums[i].arg().equals(arg)) {
       
    29 				return enums[i];
       
    30 			}
       
    31 		}
       
    32 
       
    33 		throw new IllegalArgumentException("Unknown ResourcesEnum with arg = ["
       
    34 				+ arg + "]");
       
    35 	}
       
    36 
       
    37 	private final String value;
       
    38 
       
    39 	ResourcesEnums(String value) {
       
    40 		this.value = value;
       
    41 	}
       
    42 
       
    43 	public String arg() {
       
    44 		return value;
       
    45 	}
       
    46 }