Skip to main content
summaryrefslogtreecommitdiffstats
blob: b40bdaef7924ce1f5d03476e7503c98d07c854c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*******************************************************************************
 * Copyright (c) 2006 Sybase, Inc. and others.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Sybase, Inc. - initial API and implementation
 *******************************************************************************/
package org.eclipse.jst.jsf.common.ui.internal.dialogfield;


/**
 * @author mengbo
 */
public class BooleanComboDialogField extends ComboDialogField {
	final public static int USE_YESNO = 0;

	final public static int USE_TRUEFALSE = 1;

	/**
	 * 
	 * @param type
	 */
	public void setType(int type) {
		if (type == USE_YESNO) {
			setItems(new String[] { "", "yes", "no" });
		} else if (type == USE_TRUEFALSE) {
			setItems(new String[] { "", "true", "false" });
		}
	}

	/**
	 * @param flags
	 */
	public BooleanComboDialogField(int flags) {
		super(flags);
		setType(USE_TRUEFALSE);
	}
}

Back to the top