2 * Copyright (C) 2007 The Android Open Source Project
4 * Licensed under the Eclipse Public License, Version 1.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
8 * http://www.eclipse.org/org/documents/epl-v10.php
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, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package com.android.ide.eclipse.adt.internal.resources.configurations;
19 import com.android.ide.eclipse.adt.internal.editors.IconFactory;
20 import com.android.sdklib.resources.Navigation;
21 import com.android.sdklib.resources.ResourceEnum;
23 import org.eclipse.swt.graphics.Image;
26 * Resource Qualifier for Navigation Method.
28 public final class NavigationMethodQualifier extends EnumBasedResourceQualifier {
30 public static final String NAME = "Navigation Method";
32 private Navigation mValue;
34 public NavigationMethodQualifier() {
38 public NavigationMethodQualifier(Navigation value) {
42 public Navigation getValue() {
47 ResourceEnum getEnumValue() {
52 public String getName() {
57 public String getShortName() {
63 public Image getIcon() {
64 return IconFactory.getInstance().getIcon("navpad"); //$NON-NLS-1$
68 public boolean checkAndSet(String value, FolderConfiguration config) {
69 Navigation method = Navigation.getEnum(value);
71 NavigationMethodQualifier qualifier = new NavigationMethodQualifier(method);
72 config.setNavigationMethodQualifier(qualifier);