FileDocCategorySizeDatePackage
AlignmentEditor.javaAPI DocExample1670Sat Jan 24 10:44:38 GMT 2004je3.beans

AlignmentEditor

public class AlignmentEditor extends PropertyEditorSupport
This PropertyEditor defines the enumerated values of the alignment property so that a bean box or IDE can present those values to the user for selection

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringgetJavaInitializationString()
This is an important method for code generation.

	Object o = getValue();
	if (o == Alignment.LEFT)
	    return "je3.beans.Alignment.LEFT";
	if (o == Alignment.CENTER)
	    return "je3.beans.Alignment.CENTER";
	if (o == Alignment.RIGHT)
	    return "je3.beans.Alignment.RIGHT";
	return null;
    
public java.lang.String[]getTags()
Return the list of value names for the enumerated type.

	return new String[] { "left", "center", "right" };
    
public voidsetAsText(java.lang.String s)
Convert each of those value names into the actual value.

	if (s.equals("left")) setValue(Alignment.LEFT);
	else if (s.equals("center")) setValue(Alignment.CENTER);
	else if (s.equals("right")) setValue(Alignment.RIGHT);
	else throw new IllegalArgumentException(s);