1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22/* 23 * ident "%Z%%M% %I% %E% SMI" 24 * 25 * Copyright (c) 2000 by Sun Microsystems, Inc. 26 * All rights reserved. 27 */ 28 29/* 30 * Copyright (C) 1996 Active Software, Inc. 31 * All rights reserved. 32 * 33 * @(#) AlignmentEnum.java 1.9 - last change made 06/18/97 34 */ 35 36package sunsoft.jws.visual.rt.type; 37 38import java.awt.Label; 39 40/** 41 * A class that knows the alignment attributes of labels, and in an 42 * instantiation, can store a single alignment selection. 43 * 44 * @see Label 45 * @version 1.9, 06/18/97 46 */ 47public class AlignmentEnum extends BaseEnum { 48 private static BaseEnumHelper helper = new BaseEnumHelper(); 49 50 static { 51 helper.add(Label.LEFT, /* NOI18N */"left"); 52 helper.add(Label.CENTER, /* NOI18N */"center"); 53 helper.add(Label.RIGHT, /* NOI18N */"right"); 54 helper.setDefaultChoice(Label.LEFT); 55 } 56 57 /** 58 * Creates an instance with the choice set to LEFT. 59 */ 60 public AlignmentEnum() { 61 super(); 62 } 63 64 /** 65 * Creates an instance with the choice set to the given int value. 66 * 67 * @param choice Label.LEFT, Label.CENTER, or Label.RIGHT 68 */ 69 public AlignmentEnum(int choice) { 70 super(choice); 71 } 72 73 /** 74 * Creates an instance with the choice set to the given string. 75 * 76 * @param choice "left", "center", or "right" 77 */ 78 public AlignmentEnum(String choice) { 79 super(choice); 80 } 81 82 protected BaseEnumHelper getHelper() { 83 return (helper); 84 } 85} 86